diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml deleted file mode 100644 index 806d41d..0000000 --- a/.github/workflows/codesee-arch-diagram.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This workflow was added by CodeSee. Learn more at https://codesee.io/ -# This is v2.0 of this workflow file -on: - push: - branches: - - main - pull_request_target: - types: [opened, synchronize, reopened] - -name: CodeSee - -permissions: read-all - -jobs: - codesee: - runs-on: ubuntu-latest - continue-on-error: true - name: Analyze the repo with CodeSee - steps: - - uses: Codesee-io/codesee-action@v2 - with: - codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - codesee-url: https://app.codesee.io diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml new file mode 100644 index 0000000..b526171 --- /dev/null +++ b/.github/workflows/sdk_generation.yaml @@ -0,0 +1,30 @@ +name: Generate +permissions: + checks: write + contents: write + pull-requests: write + statuses: write +"on": + workflow_dispatch: + inputs: + force: + description: Force generation of SDKs + type: boolean + default: false + set_version: + description: optionally set a specific SDK version + type: string + schedule: + - cron: 0 0 * * * +jobs: + generate: + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 + with: + force: ${{ github.event.inputs.force }} + mode: pr + set_version: ${{ github.event.inputs.set_version }} + speakeasy_version: latest + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + pypi_token: ${{ secrets.PYPI_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/sdk_publish.yaml b/.github/workflows/sdk_publish.yaml new file mode 100644 index 0000000..cdfbfa8 --- /dev/null +++ b/.github/workflows/sdk_publish.yaml @@ -0,0 +1,20 @@ +name: Publish +permissions: + checks: write + contents: write + pull-requests: write + statuses: write +"on": + push: + branches: + - main + paths: + - RELEASES.md + - '*/RELEASES.md' +jobs: + publish: + uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + pypi_token: ${{ secrets.PYPI_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/speakeasy_sdk_generation.yml b/.github/workflows/speakeasy_sdk_generation.yml deleted file mode 100644 index 15a4194..0000000 --- a/.github/workflows/speakeasy_sdk_generation.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Generate -permissions: - checks: write - contents: write - pull-requests: write - statuses: write -"on": - workflow_dispatch: - inputs: - force: - description: Force generation of SDKs - type: boolean - default: false - push_code_samples_only: - description: Force push only code samples from SDK generation - type: boolean - default: false - schedule: - - cron: 0 0 * * * -jobs: - generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: direct - push_code_samples_only: ${{ fromJSON(github.event.inputs.push_code_samples_only) }} - speakeasy_version: latest - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/tagging.yaml b/.github/workflows/tagging.yaml deleted file mode 100644 index 3ea4a0f..0000000 --- a/.github/workflows/tagging.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Speakeasy Tagging -permissions: - checks: write - contents: write - pull-requests: write - statuses: write -"on": - push: - branches: - - main - paths: [] - workflow_dispatch: {} -jobs: - tag: - uses: speakeasy-api/sdk-generation-action/.github/workflows/tag.yaml@v15 - with: - registry_tags: main - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.gitignore b/.gitignore index 3cdf338..4949179 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.venv/ +pyrightconfig.json +README-PYPI.md venv/ src/*.egg-info/ __pycache__/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ddb126b..66317c4 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,668 +1,1875 @@ lockVersion: 2.0.0 id: 3eeea668-4ef4-464e-a888-bdfa023bedf5 management: - docChecksum: e73920abd3a55e8d249592f2e3090574 + docChecksum: 06023774169418572a5ebabe14a70f3f docVersion: 0.0.3 - speakeasyVersion: 1.314.2 - generationVersion: 2.349.6 - releaseVersion: 0.10.0 - configChecksum: d3ab7f558ab12fa30efdcad9275e01b2 + speakeasyVersion: 1.393.0 + generationVersion: 2.413.0 + releaseVersion: 0.11.0 + configChecksum: 3ab527f680e2959c9663d2d572c3c0e0 repoURL: https://github.com/LukeHagar/plexpy.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexpy.git published: true features: python: - additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.3 - core: 4.6.13 - flattening: 2.81.1 - globalSecurity: 2.83.5 - globalSecurityCallbacks: 0.1.0 - globalSecurityFlattening: 0.1.0 - globalServerURLs: 2.82.2 - globals: 2.82.1 - methodServerURLs: 2.82.1 - nameOverrides: 2.81.2 - nullables: 0.1.0 - responseFormat: 0.1.0 - sdkHooks: 0.1.0 - typeOverrides: 2.81.1 - unions: 2.82.8 + additionalDependencies: 1.0.0 + constsAndDefaults: 1.0.2 + core: 5.5.0 + defaultEnabledRetries: 0.2.0 + deprecations: 3.0.0 + downloadStreams: 1.0.1 + envVarSecurityUsage: 0.3.1 + errors: 3.0.0 + flattening: 3.0.0 + globalSecurity: 3.0.2 + globalSecurityCallbacks: 1.0.0 + globalSecurityFlattening: 1.0.0 + globalServerURLs: 3.0.0 + globals: 3.0.0 + methodServerURLs: 3.0.0 + nameOverrides: 3.0.0 + nullables: 1.0.0 + responseFormat: 1.0.0 + retries: 3.0.2 + sdkHooks: 1.0.0 + unions: 3.0.2 generatedFiles: - - src/plex_api/sdkconfiguration.py - - src/plex_api/server.py - - src/plex_api/media.py - - src/plex_api/video.py - - src/plex_api/activities.py - - src/plex_api/butler.py - - src/plex_api/plex.py - - src/plex_api/hubs.py - - src/plex_api/search.py - - src/plex_api/library.py - - src/plex_api/log.py - - src/plex_api/playlists.py - - src/plex_api/authentication.py - - src/plex_api/statistics.py - - src/plex_api/sessions.py - - src/plex_api/updater.py - - src/plex_api/watchlist.py - - src/plex_api/sdk.py - - py.typed - - pylintrc - - scripts/publish.sh - - setup.py - - src/plex_api/__init__.py - - src/plex_api/utils/__init__.py - - src/plex_api/utils/retries.py - - src/plex_api/utils/utils.py - - src/plex_api/models/errors/sdkerror.py - - src/plex_api/models/operations/getservercapabilities.py - - src/plex_api/models/operations/getserverpreferences.py - - src/plex_api/models/operations/getavailableclients.py - - src/plex_api/models/operations/getdevices.py - - src/plex_api/models/operations/getserveridentity.py - - src/plex_api/models/operations/getmyplexaccount.py - - src/plex_api/models/operations/getresizedphoto.py - - src/plex_api/models/operations/getserverlist.py - - src/plex_api/models/operations/markplayed.py - - src/plex_api/models/operations/markunplayed.py - - src/plex_api/models/operations/updateplayprogress.py - - src/plex_api/models/operations/gettimeline.py - - src/plex_api/models/operations/startuniversaltranscode.py - - src/plex_api/models/operations/getserveractivities.py - - src/plex_api/models/operations/cancelserveractivities.py - - src/plex_api/models/operations/getbutlertasks.py - - src/plex_api/models/operations/startalltasks.py - - src/plex_api/models/operations/stopalltasks.py - - src/plex_api/models/operations/starttask.py - - src/plex_api/models/operations/stoptask.py - - src/plex_api/models/operations/gethomedata.py - - src/plex_api/models/operations/getpin.py - - src/plex_api/models/operations/gettoken.py - - src/plex_api/models/operations/getglobalhubs.py - - src/plex_api/models/operations/getlibraryhubs.py - - src/plex_api/models/operations/performsearch.py - - src/plex_api/models/operations/performvoicesearch.py - - src/plex_api/models/operations/getsearchresults.py - - src/plex_api/models/operations/getfilehash.py - - src/plex_api/models/operations/getrecentlyadded.py - - src/plex_api/models/operations/getlibraries.py - - src/plex_api/models/operations/getlibrary.py - - src/plex_api/models/operations/deletelibrary.py - - src/plex_api/models/operations/getlibraryitems.py - - src/plex_api/models/operations/refreshlibrary.py - - src/plex_api/models/operations/searchlibrary.py - - src/plex_api/models/operations/getmetadata.py - - src/plex_api/models/operations/getmetadatachildren.py - - src/plex_api/models/operations/gettopwatchedcontent.py - - src/plex_api/models/operations/getondeck.py - - src/plex_api/models/operations/logline.py - - src/plex_api/models/operations/logmultiline.py - - src/plex_api/models/operations/enablepapertrail.py - - src/plex_api/models/operations/createplaylist.py - - src/plex_api/models/operations/getplaylists.py - - src/plex_api/models/operations/getplaylist.py - - src/plex_api/models/operations/deleteplaylist.py - - src/plex_api/models/operations/updateplaylist.py - - src/plex_api/models/operations/getplaylistcontents.py - - src/plex_api/models/operations/clearplaylistcontents.py - - src/plex_api/models/operations/addplaylistcontents.py - - src/plex_api/models/operations/uploadplaylist.py - - src/plex_api/models/operations/gettransienttoken.py - - src/plex_api/models/operations/getsourceconnectioninformation.py - - src/plex_api/models/operations/getstatistics.py - - src/plex_api/models/operations/getresourcesstatistics.py - - src/plex_api/models/operations/getbandwidthstatistics.py - - src/plex_api/models/operations/getsessions.py - - src/plex_api/models/operations/getsessionhistory.py - - src/plex_api/models/operations/gettranscodesessions.py - - src/plex_api/models/operations/stoptranscodesession.py - - src/plex_api/models/operations/getupdatestatus.py - - src/plex_api/models/operations/checkforupdates.py - - src/plex_api/models/operations/applyupdates.py - - src/plex_api/models/operations/getwatchlist.py - - src/plex_api/models/errors/getservercapabilities.py - - src/plex_api/models/errors/getserverpreferences.py - - src/plex_api/models/errors/getavailableclients.py - - src/plex_api/models/errors/getdevices.py - - src/plex_api/models/errors/getserveridentity.py - - src/plex_api/models/errors/getmyplexaccount.py - - src/plex_api/models/errors/getresizedphoto.py - - src/plex_api/models/errors/getserverlist.py - - src/plex_api/models/errors/markplayed.py - - src/plex_api/models/errors/markunplayed.py - - src/plex_api/models/errors/updateplayprogress.py - - src/plex_api/models/errors/gettimeline.py - - src/plex_api/models/errors/startuniversaltranscode.py - - src/plex_api/models/errors/getserveractivities.py - - src/plex_api/models/errors/cancelserveractivities.py - - src/plex_api/models/errors/getbutlertasks.py - - src/plex_api/models/errors/startalltasks.py - - src/plex_api/models/errors/stopalltasks.py - - src/plex_api/models/errors/starttask.py - - src/plex_api/models/errors/stoptask.py - - src/plex_api/models/errors/gethomedata.py - - src/plex_api/models/errors/getpin.py - - src/plex_api/models/errors/gettoken.py - - src/plex_api/models/errors/getglobalhubs.py - - src/plex_api/models/errors/getlibraryhubs.py - - src/plex_api/models/errors/performsearch.py - - src/plex_api/models/errors/performvoicesearch.py - - src/plex_api/models/errors/getsearchresults.py - - src/plex_api/models/errors/getfilehash.py - - src/plex_api/models/errors/getrecentlyadded.py - - src/plex_api/models/errors/getlibraries.py - - src/plex_api/models/errors/getlibrary.py - - src/plex_api/models/errors/deletelibrary.py - - src/plex_api/models/errors/getlibraryitems.py - - src/plex_api/models/errors/refreshlibrary.py - - src/plex_api/models/errors/searchlibrary.py - - src/plex_api/models/errors/getmetadata.py - - src/plex_api/models/errors/getmetadatachildren.py - - src/plex_api/models/errors/getondeck.py - - src/plex_api/models/errors/logline.py - - src/plex_api/models/errors/logmultiline.py - - src/plex_api/models/errors/enablepapertrail.py - - src/plex_api/models/errors/createplaylist.py - - src/plex_api/models/errors/getplaylists.py - - src/plex_api/models/errors/getplaylist.py - - src/plex_api/models/errors/deleteplaylist.py - - src/plex_api/models/errors/updateplaylist.py - - src/plex_api/models/errors/getplaylistcontents.py - - src/plex_api/models/errors/clearplaylistcontents.py - - src/plex_api/models/errors/addplaylistcontents.py - - src/plex_api/models/errors/uploadplaylist.py - - src/plex_api/models/errors/gettransienttoken.py - - src/plex_api/models/errors/getsourceconnectioninformation.py - - src/plex_api/models/errors/getstatistics.py - - src/plex_api/models/errors/getresourcesstatistics.py - - src/plex_api/models/errors/getbandwidthstatistics.py - - src/plex_api/models/errors/getsessions.py - - src/plex_api/models/errors/getsessionhistory.py - - src/plex_api/models/errors/gettranscodesessions.py - - src/plex_api/models/errors/stoptranscodesession.py - - src/plex_api/models/errors/getupdatestatus.py - - src/plex_api/models/errors/checkforupdates.py - - src/plex_api/models/errors/applyupdates.py - - src/plex_api/models/errors/getwatchlist.py - - src/plex_api/models/components/security.py - - src/plex_api/models/internal/globals.py - - src/plex_api/models/__init__.py - - src/plex_api/models/errors/__init__.py - - src/plex_api/models/operations/__init__.py - - src/plex_api/models/components/__init__.py - - src/plex_api/models/internal/__init__.py - - docs/models/operations/directory.md - - docs/models/operations/mediacontainer.md - - docs/models/operations/getservercapabilitiesresponsebody.md - - docs/models/operations/getservercapabilitiesresponse.md - - docs/models/operations/setting.md - - docs/models/operations/getserverpreferencesmediacontainer.md - - docs/models/operations/getserverpreferencesresponsebody.md - - docs/models/operations/getserverpreferencesresponse.md - - docs/models/operations/server.md - - docs/models/operations/getavailableclientsmediacontainer.md - - docs/models/operations/getavailableclientsresponsebody.md - - docs/models/operations/getavailableclientsresponse.md - - docs/models/operations/device.md - - docs/models/operations/getdevicesmediacontainer.md - - docs/models/operations/getdevicesresponsebody.md - - docs/models/operations/getdevicesresponse.md - - docs/models/operations/getserveridentitymediacontainer.md - - docs/models/operations/getserveridentityresponsebody.md - - docs/models/operations/getserveridentityresponse.md - - docs/models/operations/myplex.md - - docs/models/operations/getmyplexaccountresponsebody.md - - docs/models/operations/getmyplexaccountresponse.md - - docs/models/operations/minsize.md - - docs/models/operations/upscale.md - - docs/models/operations/getresizedphotorequest.md - - docs/models/operations/getresizedphotoresponse.md - - docs/models/operations/getserverlistserver.md - - docs/models/operations/getserverlistmediacontainer.md - - docs/models/operations/getserverlistresponsebody.md - - docs/models/operations/getserverlistresponse.md - - docs/models/operations/markplayedrequest.md - - docs/models/operations/markplayedresponse.md - - docs/models/operations/markunplayedrequest.md - - docs/models/operations/markunplayedresponse.md - - docs/models/operations/updateplayprogressrequest.md - - docs/models/operations/updateplayprogressresponse.md - - docs/models/operations/state.md - - docs/models/operations/gettimelinerequest.md - - docs/models/operations/gettimelineresponse.md - - docs/models/operations/startuniversaltranscoderequest.md - - docs/models/operations/startuniversaltranscoderesponse.md - - docs/models/operations/context.md - - docs/models/operations/activity.md - - docs/models/operations/getserveractivitiesmediacontainer.md - - docs/models/operations/getserveractivitiesresponsebody.md - - docs/models/operations/getserveractivitiesresponse.md - - docs/models/operations/cancelserveractivitiesrequest.md - - docs/models/operations/cancelserveractivitiesresponse.md - - docs/models/operations/butlertask.md - - docs/models/operations/butlertasks.md - - docs/models/operations/getbutlertasksresponsebody.md - - docs/models/operations/getbutlertasksresponse.md - - docs/models/operations/startalltasksresponse.md - - docs/models/operations/stopalltasksresponse.md - - docs/models/operations/taskname.md - - docs/models/operations/starttaskrequest.md - - docs/models/operations/starttaskresponse.md - - docs/models/operations/pathparamtaskname.md - - docs/models/operations/stoptaskrequest.md - - docs/models/operations/stoptaskresponse.md - - docs/models/operations/gethomedataresponsebody.md - - docs/models/operations/gethomedataresponse.md - - docs/models/operations/getpinglobals.md - - docs/models/operations/getpinrequest.md - - docs/models/operations/location.md - - docs/models/operations/getpinresponsebody.md - - docs/models/operations/getpinresponse.md - - docs/models/operations/gettokenglobals.md - - docs/models/operations/gettokenrequest.md - - docs/models/operations/gettokenlocation.md - - docs/models/operations/gettokenresponsebody.md - - docs/models/operations/gettokenresponse.md - - docs/models/operations/onlytransient.md - - docs/models/operations/getglobalhubsrequest.md - - docs/models/operations/getglobalhubsmetadata.md - - docs/models/operations/hub.md - - docs/models/operations/getglobalhubsmediacontainer.md - - docs/models/operations/getglobalhubsresponsebody.md - - docs/models/operations/getglobalhubsresponse.md - - docs/models/operations/queryparamonlytransient.md - - docs/models/operations/getlibraryhubsrequest.md - - docs/models/operations/getlibraryhubspart.md - - docs/models/operations/getlibraryhubsmedia.md - - docs/models/operations/getlibraryhubsgenre.md - - docs/models/operations/getlibraryhubscountry.md - - docs/models/operations/getlibraryhubsdirector.md - - docs/models/operations/getlibraryhubsrole.md - - docs/models/operations/getlibraryhubswriter.md - - docs/models/operations/getlibraryhubsmetadata.md - - docs/models/operations/getlibraryhubshub.md - - docs/models/operations/getlibraryhubsmediacontainer.md - - docs/models/operations/getlibraryhubsresponsebody.md - - docs/models/operations/getlibraryhubsresponse.md - - docs/models/operations/performsearchrequest.md - - docs/models/operations/performsearchresponse.md - - docs/models/operations/performvoicesearchrequest.md - - docs/models/operations/performvoicesearchresponse.md - - docs/models/operations/getsearchresultsrequest.md - - docs/models/operations/getsearchresultspart.md - - docs/models/operations/getsearchresultsmedia.md - - docs/models/operations/getsearchresultsgenre.md - - docs/models/operations/getsearchresultsdirector.md - - docs/models/operations/getsearchresultswriter.md - - docs/models/operations/getsearchresultscountry.md - - docs/models/operations/getsearchresultsrole.md - - docs/models/operations/getsearchresultsmetadata.md - - docs/models/operations/provider.md - - docs/models/operations/getsearchresultsmediacontainer.md - - docs/models/operations/getsearchresultsresponsebody.md - - docs/models/operations/getsearchresultsresponse.md - - docs/models/operations/getfilehashrequest.md - - docs/models/operations/getfilehashresponse.md - - docs/models/operations/part.md - - docs/models/operations/media.md - - docs/models/operations/genre.md - - docs/models/operations/director.md - - docs/models/operations/writer.md - - docs/models/operations/country.md - - docs/models/operations/role.md - - docs/models/operations/getrecentlyaddedmetadata.md - - docs/models/operations/getrecentlyaddedmediacontainer.md - - docs/models/operations/getrecentlyaddedresponsebody.md - - docs/models/operations/getrecentlyaddedresponse.md - - docs/models/operations/getlibrarieslocation.md - - docs/models/operations/getlibrariesdirectory.md - - docs/models/operations/getlibrariesmediacontainer.md - - docs/models/operations/getlibrariesresponsebody.md - - docs/models/operations/getlibrariesresponse.md - - docs/models/operations/includedetails.md - - docs/models/operations/getlibraryrequest.md - - docs/models/operations/getlibrarydirectory.md - - docs/models/operations/getlibraryfilter.md - - docs/models/operations/sort.md - - docs/models/operations/field.md - - docs/models/operations/getlibrarytype.md - - docs/models/operations/operator.md - - docs/models/operations/fieldtype.md - - docs/models/operations/getlibrarymediacontainer.md - - docs/models/operations/getlibraryresponsebody.md - - docs/models/operations/getlibraryresponse.md - - docs/models/operations/deletelibraryrequest.md - - docs/models/operations/deletelibraryresponse.md - - docs/models/operations/tag.md - - docs/models/operations/getlibraryitemsrequest.md - - docs/models/operations/librarysectionid.md - - docs/models/operations/getlibraryitemspart.md - - docs/models/operations/getlibraryitemsmedia.md - - docs/models/operations/getlibraryitemsgenre.md - - docs/models/operations/getlibraryitemscountry.md - - docs/models/operations/getlibraryitemsdirector.md - - docs/models/operations/getlibraryitemswriter.md - - docs/models/operations/getlibraryitemsrole.md - - docs/models/operations/getlibraryitemsmetadata.md - - docs/models/operations/getlibraryitemsmediacontainer.md - - docs/models/operations/getlibraryitemsresponsebody.md - - docs/models/operations/getlibraryitemsresponse.md - - docs/models/operations/refreshlibraryrequest.md - - docs/models/operations/refreshlibraryresponse.md - - docs/models/operations/type.md - - docs/models/operations/searchlibraryrequest.md - - docs/models/operations/searchlibrarymetadata.md - - docs/models/operations/searchlibrarymediacontainer.md - - docs/models/operations/searchlibraryresponsebody.md - - docs/models/operations/searchlibraryresponse.md - - docs/models/operations/getmetadatarequest.md - - docs/models/operations/stream.md - - docs/models/operations/getmetadatapart.md - - docs/models/operations/getmetadatamedia.md - - docs/models/operations/getmetadatagenre.md - - docs/models/operations/getmetadatacountry.md - - docs/models/operations/guids.md - - docs/models/operations/ratings.md - - docs/models/operations/getmetadatadirector.md - - docs/models/operations/getmetadatawriter.md - - docs/models/operations/getmetadatarole.md - - docs/models/operations/producer.md - - docs/models/operations/getmetadatametadata.md - - docs/models/operations/getmetadatamediacontainer.md - - docs/models/operations/getmetadataresponsebody.md - - docs/models/operations/getmetadataresponse.md - - docs/models/operations/getmetadatachildrenrequest.md - - docs/models/operations/getmetadatachildrendirectory.md - - docs/models/operations/getmetadatachildrenmetadata.md - - docs/models/operations/getmetadatachildrenmediacontainer.md - - docs/models/operations/getmetadatachildrenresponsebody.md - - docs/models/operations/getmetadatachildrenresponse.md - - docs/models/operations/gettopwatchedcontentrequest.md - - docs/models/operations/gettopwatchedcontentgenre.md - - docs/models/operations/gettopwatchedcontentcountry.md - - docs/models/operations/gettopwatchedcontentguids.md - - docs/models/operations/gettopwatchedcontentrole.md - - docs/models/operations/user.md - - docs/models/operations/gettopwatchedcontentmetadata.md - - docs/models/operations/gettopwatchedcontentmediacontainer.md - - docs/models/operations/gettopwatchedcontentresponsebody.md - - docs/models/operations/gettopwatchedcontentresponse.md - - docs/models/operations/getondeckstream.md - - docs/models/operations/getondeckpart.md - - docs/models/operations/getondeckmedia.md - - docs/models/operations/getondeckguids.md - - docs/models/operations/getondeckmetadata.md - - docs/models/operations/getondeckmediacontainer.md - - docs/models/operations/getondeckresponsebody.md - - docs/models/operations/getondeckresponse.md - - docs/models/operations/level.md - - docs/models/operations/loglinerequest.md - - docs/models/operations/loglineresponse.md - - docs/models/operations/logmultilineresponse.md - - docs/models/operations/enablepapertrailresponse.md - - docs/models/operations/queryparamtype.md - - docs/models/operations/smart.md - - docs/models/operations/createplaylistrequest.md - - docs/models/operations/createplaylistmetadata.md - - docs/models/operations/createplaylistmediacontainer.md - - docs/models/operations/createplaylistresponsebody.md - - docs/models/operations/createplaylistresponse.md - - docs/models/operations/playlisttype.md - - docs/models/operations/queryparamsmart.md - - docs/models/operations/getplaylistsrequest.md - - docs/models/operations/getplaylistsmetadata.md - - docs/models/operations/getplaylistsmediacontainer.md - - docs/models/operations/getplaylistsresponsebody.md - - docs/models/operations/getplaylistsresponse.md - - docs/models/operations/getplaylistrequest.md - - docs/models/operations/getplaylistmetadata.md - - docs/models/operations/getplaylistmediacontainer.md - - docs/models/operations/getplaylistresponsebody.md - - docs/models/operations/getplaylistresponse.md - - docs/models/operations/deleteplaylistrequest.md - - docs/models/operations/deleteplaylistresponse.md - - docs/models/operations/updateplaylistrequest.md - - docs/models/operations/updateplaylistresponse.md - - docs/models/operations/getplaylistcontentsrequest.md - - docs/models/operations/getplaylistcontentspart.md - - docs/models/operations/getplaylistcontentsmedia.md - - docs/models/operations/getplaylistcontentsgenre.md - - docs/models/operations/getplaylistcontentscountry.md - - docs/models/operations/getplaylistcontentsdirector.md - - docs/models/operations/getplaylistcontentswriter.md - - docs/models/operations/getplaylistcontentsrole.md - - docs/models/operations/getplaylistcontentsmetadata.md - - docs/models/operations/getplaylistcontentsmediacontainer.md - - docs/models/operations/getplaylistcontentsresponsebody.md - - docs/models/operations/getplaylistcontentsresponse.md - - docs/models/operations/clearplaylistcontentsrequest.md - - docs/models/operations/clearplaylistcontentsresponse.md - - docs/models/operations/addplaylistcontentsrequest.md - - docs/models/operations/addplaylistcontentsmetadata.md - - docs/models/operations/addplaylistcontentsmediacontainer.md - - docs/models/operations/addplaylistcontentsresponsebody.md - - docs/models/operations/addplaylistcontentsresponse.md - - docs/models/operations/force.md - - docs/models/operations/uploadplaylistrequest.md - - docs/models/operations/uploadplaylistresponse.md - - docs/models/operations/gettransienttokenqueryparamtype.md - - docs/models/operations/scope.md - - docs/models/operations/gettransienttokenrequest.md - - docs/models/operations/gettransienttokenresponse.md - - docs/models/operations/getsourceconnectioninformationrequest.md - - docs/models/operations/getsourceconnectioninformationresponse.md - - docs/models/operations/getstatisticsrequest.md - - docs/models/operations/getstatisticsdevice.md - - docs/models/operations/account.md - - docs/models/operations/statisticsmedia.md - - docs/models/operations/getstatisticsmediacontainer.md - - docs/models/operations/getstatisticsresponsebody.md - - docs/models/operations/getstatisticsresponse.md - - docs/models/operations/getresourcesstatisticsrequest.md - - docs/models/operations/statisticsresources.md - - docs/models/operations/getresourcesstatisticsmediacontainer.md - - docs/models/operations/getresourcesstatisticsresponsebody.md - - docs/models/operations/getresourcesstatisticsresponse.md - - docs/models/operations/getbandwidthstatisticsrequest.md - - docs/models/operations/getbandwidthstatisticsdevice.md - - docs/models/operations/getbandwidthstatisticsaccount.md - - docs/models/operations/statisticsbandwidth.md - - docs/models/operations/getbandwidthstatisticsmediacontainer.md - - docs/models/operations/getbandwidthstatisticsresponsebody.md - - docs/models/operations/getbandwidthstatisticsresponse.md - - docs/models/operations/getsessionsstream.md - - docs/models/operations/getsessionspart.md - - docs/models/operations/getsessionsmedia.md - - docs/models/operations/getsessionsuser.md - - docs/models/operations/player.md - - docs/models/operations/session.md - - docs/models/operations/getsessionsmetadata.md - - docs/models/operations/getsessionsmediacontainer.md - - docs/models/operations/getsessionsresponsebody.md - - docs/models/operations/getsessionsresponse.md - - docs/models/operations/filter_.md - - docs/models/operations/getsessionhistoryrequest.md - - docs/models/operations/getsessionhistorymetadata.md - - docs/models/operations/getsessionhistorymediacontainer.md - - docs/models/operations/getsessionhistoryresponsebody.md - - docs/models/operations/getsessionhistoryresponse.md - - docs/models/operations/transcodesession.md - - docs/models/operations/gettranscodesessionsmediacontainer.md - - docs/models/operations/gettranscodesessionsresponsebody.md - - docs/models/operations/gettranscodesessionsresponse.md - - docs/models/operations/stoptranscodesessionrequest.md - - docs/models/operations/stoptranscodesessionresponse.md - - docs/models/operations/release.md - - docs/models/operations/getupdatestatusmediacontainer.md - - docs/models/operations/getupdatestatusresponsebody.md - - docs/models/operations/getupdatestatusresponse.md - - docs/models/operations/download.md - - docs/models/operations/checkforupdatesrequest.md - - docs/models/operations/checkforupdatesresponse.md - - docs/models/operations/tonight.md - - docs/models/operations/skip.md - - docs/models/operations/applyupdatesrequest.md - - docs/models/operations/applyupdatesresponse.md - - docs/models/operations/pathparamfilter.md - - docs/models/operations/libtype.md - - docs/models/operations/includecollections.md - - docs/models/operations/includeexternalmedia.md - - docs/models/operations/getwatchlistrequest.md - - docs/models/operations/image.md - - docs/models/operations/metadata.md - - docs/models/operations/getwatchlistresponsebody.md - - docs/models/operations/getwatchlistresponse.md - - docs/models/errors/errors.md - - docs/models/errors/getservercapabilitiesresponsebody.md - - docs/models/errors/getserverpreferenceserrors.md - - docs/models/errors/getserverpreferencesresponsebody.md - - docs/models/errors/getavailableclientserrors.md - - docs/models/errors/getavailableclientsresponsebody.md - - docs/models/errors/getdeviceserrors.md - - docs/models/errors/getdevicesresponsebody.md - - docs/models/errors/getserveridentityerrors.md - - docs/models/errors/getserveridentityresponsebody.md - - docs/models/errors/getmyplexaccounterrors.md - - docs/models/errors/getmyplexaccountresponsebody.md - - docs/models/errors/getresizedphotoerrors.md - - docs/models/errors/getresizedphotoresponsebody.md - - docs/models/errors/getserverlisterrors.md - - docs/models/errors/getserverlistresponsebody.md - - docs/models/errors/markplayederrors.md - - docs/models/errors/markplayedresponsebody.md - - docs/models/errors/markunplayederrors.md - - docs/models/errors/markunplayedresponsebody.md - - docs/models/errors/updateplayprogresserrors.md - - docs/models/errors/updateplayprogressresponsebody.md - - docs/models/errors/gettimelineerrors.md - - docs/models/errors/gettimelineresponsebody.md - - docs/models/errors/startuniversaltranscodeerrors.md - - docs/models/errors/startuniversaltranscoderesponsebody.md - - docs/models/errors/getserveractivitieserrors.md - - docs/models/errors/getserveractivitiesresponsebody.md + - .gitattributes + - .vscode/settings.json + - CONTRIBUTING.md + - USAGE.md + - docs/models/components/security.md + - docs/models/errors/addplaylistcontentserrors.md + - docs/models/errors/addplaylistcontentsplaylistserrors.md + - docs/models/errors/addplaylistcontentsplaylistsresponsebody.md + - docs/models/errors/addplaylistcontentsresponsebody.md + - docs/models/errors/applyupdateserrors.md + - docs/models/errors/applyupdatesresponsebody.md + - docs/models/errors/applyupdatesupdatererrors.md + - docs/models/errors/applyupdatesupdaterresponsebody.md + - docs/models/errors/cancelserveractivitiesactivitieserrors.md + - docs/models/errors/cancelserveractivitiesactivitiesresponsebody.md - docs/models/errors/cancelserveractivitieserrors.md - docs/models/errors/cancelserveractivitiesresponsebody.md + - docs/models/errors/checkforupdateserrors.md + - docs/models/errors/checkforupdatesresponsebody.md + - docs/models/errors/checkforupdatesupdatererrors.md + - docs/models/errors/checkforupdatesupdaterresponsebody.md + - docs/models/errors/clearplaylistcontentserrors.md + - docs/models/errors/clearplaylistcontentsplaylistserrors.md + - docs/models/errors/clearplaylistcontentsplaylistsresponsebody.md + - docs/models/errors/clearplaylistcontentsresponsebody.md + - docs/models/errors/createplaylisterrors.md + - docs/models/errors/createplaylistplaylistserrors.md + - docs/models/errors/createplaylistplaylistsresponsebody.md + - docs/models/errors/createplaylistresponsebody.md + - docs/models/errors/deletelibraryerrors.md + - docs/models/errors/deletelibrarylibraryerrors.md + - docs/models/errors/deletelibrarylibraryresponsebody.md + - docs/models/errors/deletelibraryresponsebody.md + - docs/models/errors/deleteplaylisterrors.md + - docs/models/errors/deleteplaylistplaylistserrors.md + - docs/models/errors/deleteplaylistplaylistsresponsebody.md + - docs/models/errors/deleteplaylistresponsebody.md + - docs/models/errors/enablepapertrailerrors.md + - docs/models/errors/enablepapertraillogerrors.md + - docs/models/errors/enablepapertraillogresponsebody.md + - docs/models/errors/enablepapertrailresponsebody.md + - docs/models/errors/errors.md + - docs/models/errors/getalllibrarieserrors.md + - docs/models/errors/getalllibrarieslibraryerrors.md + - docs/models/errors/getalllibrarieslibraryresponsebody.md + - docs/models/errors/getalllibrariesresponsebody.md + - docs/models/errors/getavailableclientserrors.md + - docs/models/errors/getavailableclientsresponsebody.md + - docs/models/errors/getavailableclientsservererrors.md + - docs/models/errors/getavailableclientsserverresponsebody.md + - docs/models/errors/getbandwidthstatisticserrors.md + - docs/models/errors/getbandwidthstatisticsresponsebody.md + - docs/models/errors/getbandwidthstatisticsstatisticserrors.md + - docs/models/errors/getbandwidthstatisticsstatisticsresponsebody.md + - docs/models/errors/getbannerimageerrors.md + - docs/models/errors/getbannerimagemediaerrors.md + - docs/models/errors/getbannerimagemediaresponsebody.md + - docs/models/errors/getbannerimageresponsebody.md + - docs/models/errors/getbutlertasksbutlererrors.md + - docs/models/errors/getbutlertasksbutlerresponsebody.md - docs/models/errors/getbutlertaskserrors.md - docs/models/errors/getbutlertasksresponsebody.md - - docs/models/errors/startalltaskserrors.md - - docs/models/errors/startalltasksresponsebody.md - - docs/models/errors/stopalltaskserrors.md - - docs/models/errors/stopalltasksresponsebody.md - - docs/models/errors/starttaskerrors.md - - docs/models/errors/starttaskresponsebody.md - - docs/models/errors/stoptaskerrors.md - - docs/models/errors/stoptaskresponsebody.md + - docs/models/errors/getcompanionsdataerrors.md + - docs/models/errors/getcompanionsdataplexerrors.md + - docs/models/errors/getcompanionsdataplexresponsebody.md + - docs/models/errors/getcompanionsdataresponsebody.md + - docs/models/errors/getdeviceserrors.md + - docs/models/errors/getdevicesresponsebody.md + - docs/models/errors/getdevicesservererrors.md + - docs/models/errors/getdevicesserverresponsebody.md + - docs/models/errors/getfilehasherrors.md + - docs/models/errors/getfilehashlibraryerrors.md + - docs/models/errors/getfilehashlibraryresponsebody.md + - docs/models/errors/getfilehashresponsebody.md + - docs/models/errors/getgeodataerrors.md + - docs/models/errors/getgeodataplexerrors.md + - docs/models/errors/getgeodataplexresponsebody.md + - docs/models/errors/getgeodataresponsebody.md + - docs/models/errors/getglobalhubserrors.md + - docs/models/errors/getglobalhubshubserrors.md + - docs/models/errors/getglobalhubshubsresponsebody.md + - docs/models/errors/getglobalhubsresponsebody.md - docs/models/errors/gethomedataerrors.md + - docs/models/errors/gethomedataplexerrors.md + - docs/models/errors/gethomedataplexresponsebody.md - docs/models/errors/gethomedataresponsebody.md + - docs/models/errors/getlibrarydetailserrors.md + - docs/models/errors/getlibrarydetailslibraryerrors.md + - docs/models/errors/getlibrarydetailslibraryresponsebody.md + - docs/models/errors/getlibrarydetailsresponsebody.md + - docs/models/errors/getlibraryhubserrors.md + - docs/models/errors/getlibraryhubshubserrors.md + - docs/models/errors/getlibraryhubshubsresponsebody.md + - docs/models/errors/getlibraryhubsresponsebody.md + - docs/models/errors/getlibraryitemserrors.md + - docs/models/errors/getlibraryitemslibraryerrors.md + - docs/models/errors/getlibraryitemslibraryresponsebody.md + - docs/models/errors/getlibraryitemsresponsebody.md + - docs/models/errors/getmediaproviderserrors.md + - docs/models/errors/getmediaprovidersresponsebody.md + - docs/models/errors/getmediaprovidersservererrors.md + - docs/models/errors/getmediaprovidersserverresponsebody.md + - docs/models/errors/getmetadatabyratingkeyerrors.md + - docs/models/errors/getmetadatabyratingkeylibraryerrors.md + - docs/models/errors/getmetadatabyratingkeylibraryresponsebody.md + - docs/models/errors/getmetadatabyratingkeyresponsebody.md + - docs/models/errors/getmetadatachildrenerrors.md + - docs/models/errors/getmetadatachildrenlibraryerrors.md + - docs/models/errors/getmetadatachildrenlibraryresponsebody.md + - docs/models/errors/getmetadatachildrenresponsebody.md + - docs/models/errors/getmyplexaccounterrors.md + - docs/models/errors/getmyplexaccountresponsebody.md + - docs/models/errors/getmyplexaccountservererrors.md + - docs/models/errors/getmyplexaccountserverresponsebody.md + - docs/models/errors/getondeckerrors.md + - docs/models/errors/getondecklibraryerrors.md + - docs/models/errors/getondecklibraryresponsebody.md + - docs/models/errors/getondeckresponsebody.md - docs/models/errors/getpinerrors.md - docs/models/errors/getpinresponsebody.md - - docs/models/errors/gettokenerrors.md - - docs/models/errors/gettokenresponsebody.md - - docs/models/errors/getglobalhubserrors.md - - docs/models/errors/getglobalhubsresponsebody.md - - docs/models/errors/getlibraryhubserrors.md - - docs/models/errors/getlibraryhubsresponsebody.md - - docs/models/errors/performsearcherrors.md - - docs/models/errors/performsearchresponsebody.md - - docs/models/errors/performvoicesearcherrors.md - - docs/models/errors/performvoicesearchresponsebody.md + - docs/models/errors/getplaylistcontentserrors.md + - docs/models/errors/getplaylistcontentsplaylistserrors.md + - docs/models/errors/getplaylistcontentsplaylistsresponsebody.md + - docs/models/errors/getplaylistcontentsresponsebody.md + - docs/models/errors/getplaylisterrors.md + - docs/models/errors/getplaylistplaylistserrors.md + - docs/models/errors/getplaylistplaylistsresponsebody.md + - docs/models/errors/getplaylistresponsebody.md + - docs/models/errors/getplaylistserrors.md + - docs/models/errors/getplaylistsplaylistserrors.md + - docs/models/errors/getplaylistsplaylistsresponsebody.md + - docs/models/errors/getplaylistsresponsebody.md + - docs/models/errors/getrecentlyaddederrors.md + - docs/models/errors/getrecentlyaddedlibraryerrors.md + - docs/models/errors/getrecentlyaddedlibraryresponsebody.md + - docs/models/errors/getrecentlyaddedresponsebody.md + - docs/models/errors/getrefreshlibrarymetadataerrors.md + - docs/models/errors/getrefreshlibrarymetadatalibraryerrors.md + - docs/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md + - docs/models/errors/getrefreshlibrarymetadataresponsebody.md + - docs/models/errors/getresizedphotoerrors.md + - docs/models/errors/getresizedphotoresponsebody.md + - docs/models/errors/getresizedphotoservererrors.md + - docs/models/errors/getresizedphotoserverresponsebody.md + - docs/models/errors/getresourcesstatisticserrors.md + - docs/models/errors/getresourcesstatisticsresponsebody.md + - docs/models/errors/getresourcesstatisticsstatisticserrors.md + - docs/models/errors/getresourcesstatisticsstatisticsresponsebody.md + - docs/models/errors/getsearchlibraryerrors.md + - docs/models/errors/getsearchlibrarylibraryerrors.md + - docs/models/errors/getsearchlibrarylibraryresponsebody.md + - docs/models/errors/getsearchlibraryresponsebody.md - docs/models/errors/getsearchresultserrors.md - docs/models/errors/getsearchresultsresponsebody.md - - docs/models/errors/getfilehasherrors.md - - docs/models/errors/getfilehashresponsebody.md - - docs/models/errors/getrecentlyaddederrors.md - - docs/models/errors/getrecentlyaddedresponsebody.md - - docs/models/errors/getlibrarieserrors.md - - docs/models/errors/getlibrariesresponsebody.md - - docs/models/errors/getlibraryerrors.md - - docs/models/errors/getlibraryresponsebody.md - - docs/models/errors/deletelibraryerrors.md - - docs/models/errors/deletelibraryresponsebody.md - - docs/models/errors/getlibraryitemserrors.md - - docs/models/errors/getlibraryitemsresponsebody.md - - docs/models/errors/refreshlibraryerrors.md - - docs/models/errors/refreshlibraryresponsebody.md - - docs/models/errors/searchlibraryerrors.md - - docs/models/errors/searchlibraryresponsebody.md - - docs/models/errors/getmetadataerrors.md - - docs/models/errors/getmetadataresponsebody.md - - docs/models/errors/getmetadatachildrenerrors.md - - docs/models/errors/getmetadatachildrenresponsebody.md - - docs/models/errors/getondeckerrors.md - - docs/models/errors/getondeckresponsebody.md - - docs/models/errors/loglineerrors.md - - docs/models/errors/loglineresponsebody.md - - docs/models/errors/logmultilineerrors.md - - docs/models/errors/logmultilineresponsebody.md - - docs/models/errors/enablepapertrailerrors.md - - docs/models/errors/enablepapertrailresponsebody.md - - docs/models/errors/createplaylisterrors.md - - docs/models/errors/createplaylistresponsebody.md - - docs/models/errors/getplaylistserrors.md - - docs/models/errors/getplaylistsresponsebody.md - - docs/models/errors/getplaylisterrors.md - - docs/models/errors/getplaylistresponsebody.md - - docs/models/errors/deleteplaylisterrors.md - - docs/models/errors/deleteplaylistresponsebody.md - - docs/models/errors/updateplaylisterrors.md - - docs/models/errors/updateplaylistresponsebody.md - - docs/models/errors/getplaylistcontentserrors.md - - docs/models/errors/getplaylistcontentsresponsebody.md - - docs/models/errors/clearplaylistcontentserrors.md - - docs/models/errors/clearplaylistcontentsresponsebody.md - - docs/models/errors/addplaylistcontentserrors.md - - docs/models/errors/addplaylistcontentsresponsebody.md - - docs/models/errors/uploadplaylisterrors.md - - docs/models/errors/uploadplaylistresponsebody.md - - docs/models/errors/gettransienttokenerrors.md - - docs/models/errors/gettransienttokenresponsebody.md + - docs/models/errors/getsearchresultssearcherrors.md + - docs/models/errors/getsearchresultssearchresponsebody.md + - docs/models/errors/getserveractivitiesactivitieserrors.md + - docs/models/errors/getserveractivitiesactivitiesresponsebody.md + - docs/models/errors/getserveractivitieserrors.md + - docs/models/errors/getserveractivitiesresponsebody.md + - docs/models/errors/getservercapabilitieserrors.md + - docs/models/errors/getservercapabilitiesresponsebody.md + - docs/models/errors/getservercapabilitiesserverresponsebody.md + - docs/models/errors/getserveridentityresponsebody.md + - docs/models/errors/getserverlisterrors.md + - docs/models/errors/getserverlistresponsebody.md + - docs/models/errors/getserverlistservererrors.md + - docs/models/errors/getserverlistserverresponsebody.md + - docs/models/errors/getserverpreferenceserrors.md + - docs/models/errors/getserverpreferencesresponsebody.md + - docs/models/errors/getserverpreferencesservererrors.md + - docs/models/errors/getserverpreferencesserverresponsebody.md + - docs/models/errors/getserverresourceserrors.md + - docs/models/errors/getserverresourcesplexerrors.md + - docs/models/errors/getserverresourcesplexresponsebody.md + - docs/models/errors/getserverresourcesresponsebody.md + - docs/models/errors/getsessionhistoryerrors.md + - docs/models/errors/getsessionhistoryresponsebody.md + - docs/models/errors/getsessionhistorysessionserrors.md + - docs/models/errors/getsessionhistorysessionsresponsebody.md + - docs/models/errors/getsessionserrors.md + - docs/models/errors/getsessionsresponsebody.md + - docs/models/errors/getsessionssessionserrors.md + - docs/models/errors/getsessionssessionsresponsebody.md + - docs/models/errors/getsourceconnectioninformationauthenticationerrors.md + - docs/models/errors/getsourceconnectioninformationauthenticationresponsebody.md - docs/models/errors/getsourceconnectioninformationerrors.md - docs/models/errors/getsourceconnectioninformationresponsebody.md - docs/models/errors/getstatisticserrors.md - docs/models/errors/getstatisticsresponsebody.md - - docs/models/errors/getresourcesstatisticserrors.md - - docs/models/errors/getresourcesstatisticsresponsebody.md - - docs/models/errors/getbandwidthstatisticserrors.md - - docs/models/errors/getbandwidthstatisticsresponsebody.md - - docs/models/errors/getsessionserrors.md - - docs/models/errors/getsessionsresponsebody.md - - docs/models/errors/getsessionhistoryerrors.md - - docs/models/errors/getsessionhistoryresponsebody.md + - docs/models/errors/getstatisticsstatisticserrors.md + - docs/models/errors/getstatisticsstatisticsresponsebody.md + - docs/models/errors/getthumbimageerrors.md + - docs/models/errors/getthumbimagemediaerrors.md + - docs/models/errors/getthumbimagemediaresponsebody.md + - docs/models/errors/getthumbimageresponsebody.md + - docs/models/errors/gettimelineerrors.md + - docs/models/errors/gettimelineresponsebody.md + - docs/models/errors/gettimelinevideoerrors.md + - docs/models/errors/gettimelinevideoresponsebody.md + - docs/models/errors/gettokenbypiniderrors.md + - docs/models/errors/gettokenbypinidplexerrors.md + - docs/models/errors/gettokenbypinidplexresponsebody.md + - docs/models/errors/gettokenbypinidresponsebody.md + - docs/models/errors/gettopwatchedcontenterrors.md + - docs/models/errors/gettopwatchedcontentlibraryerrors.md + - docs/models/errors/gettopwatchedcontentlibraryresponsebody.md + - docs/models/errors/gettopwatchedcontentresponsebody.md - docs/models/errors/gettranscodesessionserrors.md - docs/models/errors/gettranscodesessionsresponsebody.md - - docs/models/errors/stoptranscodesessionerrors.md - - docs/models/errors/stoptranscodesessionresponsebody.md + - docs/models/errors/gettranscodesessionssessionserrors.md + - docs/models/errors/gettranscodesessionssessionsresponsebody.md + - docs/models/errors/gettransienttokenauthenticationerrors.md + - docs/models/errors/gettransienttokenauthenticationresponsebody.md + - docs/models/errors/gettransienttokenerrors.md + - docs/models/errors/gettransienttokenresponsebody.md - docs/models/errors/getupdatestatuserrors.md - docs/models/errors/getupdatestatusresponsebody.md - - docs/models/errors/checkforupdateserrors.md - - docs/models/errors/checkforupdatesresponsebody.md - - docs/models/errors/applyupdateserrors.md - - docs/models/errors/applyupdatesresponsebody.md + - docs/models/errors/getupdatestatusupdatererrors.md + - docs/models/errors/getupdatestatusupdaterresponsebody.md + - docs/models/errors/getuserdetailsauthenticationerrors.md + - docs/models/errors/getuserdetailsauthenticationresponsebody.md + - docs/models/errors/getuserdetailserrors.md + - docs/models/errors/getuserdetailsresponsebody.md + - docs/models/errors/getuserfriendserrors.md + - docs/models/errors/getuserfriendsplexerrors.md + - docs/models/errors/getuserfriendsplexresponsebody.md + - docs/models/errors/getuserfriendsresponsebody.md - docs/models/errors/getwatchlisterrors.md - docs/models/errors/getwatchlistresponsebody.md - - docs/models/components/security.md + - docs/models/errors/getwatchlistwatchlisterrors.md + - docs/models/errors/getwatchlistwatchlistresponsebody.md + - docs/models/errors/loglineerrors.md + - docs/models/errors/loglinelogerrors.md + - docs/models/errors/loglinelogresponsebody.md + - docs/models/errors/loglineresponsebody.md + - docs/models/errors/logmultilineerrors.md + - docs/models/errors/logmultilinelogerrors.md + - docs/models/errors/logmultilinelogresponsebody.md + - docs/models/errors/logmultilineresponsebody.md + - docs/models/errors/markplayederrors.md + - docs/models/errors/markplayedmediaerrors.md + - docs/models/errors/markplayedmediaresponsebody.md + - docs/models/errors/markplayedresponsebody.md + - docs/models/errors/markunplayederrors.md + - docs/models/errors/markunplayedmediaerrors.md + - docs/models/errors/markunplayedmediaresponsebody.md + - docs/models/errors/markunplayedresponsebody.md + - docs/models/errors/performsearcherrors.md + - docs/models/errors/performsearchresponsebody.md + - docs/models/errors/performsearchsearcherrors.md + - docs/models/errors/performsearchsearchresponsebody.md + - docs/models/errors/performvoicesearcherrors.md + - docs/models/errors/performvoicesearchresponsebody.md + - docs/models/errors/performvoicesearchsearcherrors.md + - docs/models/errors/performvoicesearchsearchresponsebody.md + - docs/models/errors/postuserssignindataauthenticationerrors.md + - docs/models/errors/postuserssignindataauthenticationresponsebody.md + - docs/models/errors/postuserssignindataerrors.md + - docs/models/errors/postuserssignindataresponsebody.md + - docs/models/errors/startalltasksbutlererrors.md + - docs/models/errors/startalltasksbutlerresponsebody.md + - docs/models/errors/startalltaskserrors.md + - docs/models/errors/startalltasksresponsebody.md + - docs/models/errors/starttaskbutlererrors.md + - docs/models/errors/starttaskbutlerresponsebody.md + - docs/models/errors/starttaskerrors.md + - docs/models/errors/starttaskresponsebody.md + - docs/models/errors/startuniversaltranscodeerrors.md + - docs/models/errors/startuniversaltranscoderesponsebody.md + - docs/models/errors/startuniversaltranscodevideoerrors.md + - docs/models/errors/startuniversaltranscodevideoresponsebody.md + - docs/models/errors/stopalltasksbutlererrors.md + - docs/models/errors/stopalltasksbutlerresponsebody.md + - docs/models/errors/stopalltaskserrors.md + - docs/models/errors/stopalltasksresponsebody.md + - docs/models/errors/stoptaskbutlererrors.md + - docs/models/errors/stoptaskbutlerresponsebody.md + - docs/models/errors/stoptaskerrors.md + - docs/models/errors/stoptaskresponsebody.md + - docs/models/errors/stoptranscodesessionerrors.md + - docs/models/errors/stoptranscodesessionresponsebody.md + - docs/models/errors/stoptranscodesessionsessionserrors.md + - docs/models/errors/stoptranscodesessionsessionsresponsebody.md + - docs/models/errors/updateplaylisterrors.md + - docs/models/errors/updateplaylistplaylistserrors.md + - docs/models/errors/updateplaylistplaylistsresponsebody.md + - docs/models/errors/updateplaylistresponsebody.md + - docs/models/errors/updateplayprogresserrors.md + - docs/models/errors/updateplayprogressmediaerrors.md + - docs/models/errors/updateplayprogressmediaresponsebody.md + - docs/models/errors/updateplayprogressresponsebody.md + - docs/models/errors/uploadplaylisterrors.md + - docs/models/errors/uploadplaylistplaylistserrors.md + - docs/models/errors/uploadplaylistplaylistsresponsebody.md + - docs/models/errors/uploadplaylistresponsebody.md - docs/models/internal/globals.md - - docs/sdks/plexapi/README.md - - docs/sdks/server/README.md - - docs/sdks/media/README.md - - docs/sdks/video/README.md + - docs/models/operations/account.md + - docs/models/operations/activity.md + - docs/models/operations/addplaylistcontentsmediacontainer.md + - docs/models/operations/addplaylistcontentsmetadata.md + - docs/models/operations/addplaylistcontentsrequest.md + - docs/models/operations/addplaylistcontentsresponse.md + - docs/models/operations/addplaylistcontentsresponsebody.md + - docs/models/operations/applyupdatesrequest.md + - docs/models/operations/applyupdatesresponse.md + - docs/models/operations/autoselectsubtitle.md + - docs/models/operations/billing.md + - docs/models/operations/butlertask.md + - docs/models/operations/butlertasks.md + - docs/models/operations/cancelserveractivitiesrequest.md + - docs/models/operations/cancelserveractivitiesresponse.md + - docs/models/operations/checkforupdatesrequest.md + - docs/models/operations/checkforupdatesresponse.md + - docs/models/operations/clearplaylistcontentsrequest.md + - docs/models/operations/clearplaylistcontentsresponse.md + - docs/models/operations/connections.md + - docs/models/operations/context.md + - docs/models/operations/country.md + - docs/models/operations/createplaylistmediacontainer.md + - docs/models/operations/createplaylistmetadata.md + - docs/models/operations/createplaylistqueryparamtype.md + - docs/models/operations/createplaylistrequest.md + - docs/models/operations/createplaylistresponse.md + - docs/models/operations/createplaylistresponsebody.md + - docs/models/operations/defaultsubtitleaccessibility.md + - docs/models/operations/defaultsubtitleforced.md + - docs/models/operations/deletelibraryrequest.md + - docs/models/operations/deletelibraryresponse.md + - docs/models/operations/deleteplaylistrequest.md + - docs/models/operations/deleteplaylistresponse.md + - docs/models/operations/device.md + - docs/models/operations/director.md + - docs/models/operations/directory.md + - docs/models/operations/download.md + - docs/models/operations/enablepapertrailresponse.md + - docs/models/operations/feature.md + - docs/models/operations/features.md + - docs/models/operations/field.md + - docs/models/operations/fieldtype.md + - docs/models/operations/filter_.md + - docs/models/operations/force.md + - docs/models/operations/friend.md + - docs/models/operations/genre.md + - docs/models/operations/geodata.md + - docs/models/operations/getalllibrariesdirectory.md + - docs/models/operations/getalllibrariesmediacontainer.md + - docs/models/operations/getalllibrariesresponse.md + - docs/models/operations/getalllibrariesresponsebody.md + - docs/models/operations/getavailableclientsmediacontainer.md + - docs/models/operations/getavailableclientsresponse.md + - docs/models/operations/getavailableclientsresponsebody.md + - docs/models/operations/getbandwidthstatisticsaccount.md + - docs/models/operations/getbandwidthstatisticsdevice.md + - docs/models/operations/getbandwidthstatisticsmediacontainer.md + - docs/models/operations/getbandwidthstatisticsrequest.md + - docs/models/operations/getbandwidthstatisticsresponse.md + - docs/models/operations/getbandwidthstatisticsresponsebody.md + - docs/models/operations/getbannerimagerequest.md + - docs/models/operations/getbannerimageresponse.md + - docs/models/operations/getbutlertasksresponse.md + - docs/models/operations/getbutlertasksresponsebody.md + - docs/models/operations/getcompanionsdataresponse.md + - docs/models/operations/getdevicesmediacontainer.md + - docs/models/operations/getdevicesresponse.md + - docs/models/operations/getdevicesresponsebody.md + - docs/models/operations/getfilehashrequest.md + - docs/models/operations/getfilehashresponse.md + - docs/models/operations/getgeodatageodata.md + - docs/models/operations/getgeodataresponse.md + - docs/models/operations/getglobalhubsmediacontainer.md + - docs/models/operations/getglobalhubsmetadata.md + - docs/models/operations/getglobalhubsrequest.md + - docs/models/operations/getglobalhubsresponse.md + - docs/models/operations/getglobalhubsresponsebody.md + - docs/models/operations/gethomedataresponse.md + - docs/models/operations/gethomedataresponsebody.md + - docs/models/operations/getlibrarydetailsdirectory.md + - docs/models/operations/getlibrarydetailsfilter.md + - docs/models/operations/getlibrarydetailsmediacontainer.md + - docs/models/operations/getlibrarydetailsrequest.md + - docs/models/operations/getlibrarydetailsresponse.md + - docs/models/operations/getlibrarydetailsresponsebody.md + - docs/models/operations/getlibrarydetailstype.md + - docs/models/operations/getlibraryhubscountry.md + - docs/models/operations/getlibraryhubsdirector.md + - docs/models/operations/getlibraryhubsgenre.md + - docs/models/operations/getlibraryhubshub.md + - docs/models/operations/getlibraryhubsmedia.md + - docs/models/operations/getlibraryhubsmediacontainer.md + - docs/models/operations/getlibraryhubsmetadata.md + - docs/models/operations/getlibraryhubspart.md + - docs/models/operations/getlibraryhubsrequest.md + - docs/models/operations/getlibraryhubsresponse.md + - docs/models/operations/getlibraryhubsresponsebody.md + - docs/models/operations/getlibraryhubsrole.md + - docs/models/operations/getlibraryhubswriter.md + - docs/models/operations/getlibraryitemscountry.md + - docs/models/operations/getlibraryitemsdirector.md + - docs/models/operations/getlibraryitemsgenre.md + - docs/models/operations/getlibraryitemsmedia.md + - docs/models/operations/getlibraryitemsmediacontainer.md + - docs/models/operations/getlibraryitemsmetadata.md + - docs/models/operations/getlibraryitemspart.md + - docs/models/operations/getlibraryitemsrequest.md + - docs/models/operations/getlibraryitemsresponse.md + - docs/models/operations/getlibraryitemsresponsebody.md + - docs/models/operations/getlibraryitemsrole.md + - docs/models/operations/getlibraryitemswriter.md + - docs/models/operations/getmediaprovidersdirectory.md + - docs/models/operations/getmediaprovidersmediacontainer.md + - docs/models/operations/getmediaprovidersrequest.md + - docs/models/operations/getmediaprovidersresponse.md + - docs/models/operations/getmediaprovidersresponsebody.md + - docs/models/operations/getmetadatabyratingkeycountry.md + - docs/models/operations/getmetadatabyratingkeydirector.md + - docs/models/operations/getmetadatabyratingkeygenre.md + - docs/models/operations/getmetadatabyratingkeymedia.md + - docs/models/operations/getmetadatabyratingkeymediacontainer.md + - docs/models/operations/getmetadatabyratingkeymetadata.md + - docs/models/operations/getmetadatabyratingkeypart.md + - docs/models/operations/getmetadatabyratingkeyrequest.md + - docs/models/operations/getmetadatabyratingkeyresponse.md + - docs/models/operations/getmetadatabyratingkeyresponsebody.md + - docs/models/operations/getmetadatabyratingkeyrole.md + - docs/models/operations/getmetadatabyratingkeywriter.md + - docs/models/operations/getmetadatachildrendirectory.md + - docs/models/operations/getmetadatachildrenmediacontainer.md + - docs/models/operations/getmetadatachildrenmetadata.md + - docs/models/operations/getmetadatachildrenrequest.md + - docs/models/operations/getmetadatachildrenresponse.md + - docs/models/operations/getmetadatachildrenresponsebody.md + - docs/models/operations/getmyplexaccountresponse.md + - docs/models/operations/getmyplexaccountresponsebody.md + - docs/models/operations/getondeckguids.md + - docs/models/operations/getondeckmedia.md + - docs/models/operations/getondeckmediacontainer.md + - docs/models/operations/getondeckmetadata.md + - docs/models/operations/getondeckpart.md + - docs/models/operations/getondeckresponse.md + - docs/models/operations/getondeckresponsebody.md + - docs/models/operations/getondeckstream.md + - docs/models/operations/getpinauthpincontainer.md + - docs/models/operations/getpinglobals.md + - docs/models/operations/getpinrequest.md + - docs/models/operations/getpinresponse.md + - docs/models/operations/getplaylistcontentscountry.md + - docs/models/operations/getplaylistcontentsdirector.md + - docs/models/operations/getplaylistcontentsgenre.md + - docs/models/operations/getplaylistcontentsmedia.md + - docs/models/operations/getplaylistcontentsmediacontainer.md + - docs/models/operations/getplaylistcontentsmetadata.md + - docs/models/operations/getplaylistcontentspart.md + - docs/models/operations/getplaylistcontentsqueryparamtype.md + - docs/models/operations/getplaylistcontentsrequest.md + - docs/models/operations/getplaylistcontentsresponse.md + - docs/models/operations/getplaylistcontentsresponsebody.md + - docs/models/operations/getplaylistcontentsrole.md + - docs/models/operations/getplaylistcontentswriter.md + - docs/models/operations/getplaylistmediacontainer.md + - docs/models/operations/getplaylistmetadata.md + - docs/models/operations/getplaylistrequest.md + - docs/models/operations/getplaylistresponse.md + - docs/models/operations/getplaylistresponsebody.md + - docs/models/operations/getplaylistsmediacontainer.md + - docs/models/operations/getplaylistsmetadata.md + - docs/models/operations/getplaylistsrequest.md + - docs/models/operations/getplaylistsresponse.md + - docs/models/operations/getplaylistsresponsebody.md + - docs/models/operations/getrecentlyaddedmediacontainer.md + - docs/models/operations/getrecentlyaddedmetadata.md + - docs/models/operations/getrecentlyaddedrequest.md + - docs/models/operations/getrecentlyaddedresponse.md + - docs/models/operations/getrecentlyaddedresponsebody.md + - docs/models/operations/getrefreshlibrarymetadatarequest.md + - docs/models/operations/getrefreshlibrarymetadataresponse.md + - docs/models/operations/getresizedphotorequest.md + - docs/models/operations/getresizedphotoresponse.md + - docs/models/operations/getresourcesstatisticsmediacontainer.md + - docs/models/operations/getresourcesstatisticsrequest.md + - docs/models/operations/getresourcesstatisticsresponse.md + - docs/models/operations/getresourcesstatisticsresponsebody.md + - docs/models/operations/getsearchlibrarymediacontainer.md + - docs/models/operations/getsearchlibrarymetadata.md + - docs/models/operations/getsearchlibraryrequest.md + - docs/models/operations/getsearchlibraryresponse.md + - docs/models/operations/getsearchlibraryresponsebody.md + - docs/models/operations/getsearchresultscountry.md + - docs/models/operations/getsearchresultsdirector.md + - docs/models/operations/getsearchresultsgenre.md + - docs/models/operations/getsearchresultsmedia.md + - docs/models/operations/getsearchresultsmediacontainer.md + - docs/models/operations/getsearchresultsmetadata.md + - docs/models/operations/getsearchresultspart.md + - docs/models/operations/getsearchresultsrequest.md + - docs/models/operations/getsearchresultsresponse.md + - docs/models/operations/getsearchresultsresponsebody.md + - docs/models/operations/getsearchresultsrole.md + - docs/models/operations/getsearchresultswriter.md + - docs/models/operations/getserveractivitiesmediacontainer.md + - docs/models/operations/getserveractivitiesresponse.md + - docs/models/operations/getserveractivitiesresponsebody.md + - docs/models/operations/getservercapabilitiesresponse.md + - docs/models/operations/getservercapabilitiesresponsebody.md + - docs/models/operations/getserveridentitymediacontainer.md + - docs/models/operations/getserveridentityresponse.md + - docs/models/operations/getserveridentityresponsebody.md + - docs/models/operations/getserverlistmediacontainer.md + - docs/models/operations/getserverlistresponse.md + - docs/models/operations/getserverlistresponsebody.md + - docs/models/operations/getserverlistserver.md + - 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 + - docs/models/operations/getsessionhistorymetadata.md + - docs/models/operations/getsessionhistoryrequest.md + - docs/models/operations/getsessionhistoryresponse.md + - docs/models/operations/getsessionhistoryresponsebody.md + - docs/models/operations/getsessionsmedia.md + - docs/models/operations/getsessionsmediacontainer.md + - docs/models/operations/getsessionsmetadata.md + - docs/models/operations/getsessionspart.md + - docs/models/operations/getsessionsresponse.md + - docs/models/operations/getsessionsresponsebody.md + - docs/models/operations/getsessionsstream.md + - docs/models/operations/getsessionsuser.md + - docs/models/operations/getsourceconnectioninformationrequest.md + - docs/models/operations/getsourceconnectioninformationresponse.md + - docs/models/operations/getstatisticsdevice.md + - docs/models/operations/getstatisticsmediacontainer.md + - docs/models/operations/getstatisticsrequest.md + - docs/models/operations/getstatisticsresponse.md + - docs/models/operations/getstatisticsresponsebody.md + - docs/models/operations/getthumbimagerequest.md + - docs/models/operations/getthumbimageresponse.md + - docs/models/operations/gettimelinerequest.md + - docs/models/operations/gettimelineresponse.md + - docs/models/operations/gettokenbypinidauthpincontainer.md + - docs/models/operations/gettokenbypinidgeodata.md + - docs/models/operations/gettokenbypinidglobals.md + - docs/models/operations/gettokenbypinidrequest.md + - docs/models/operations/gettokenbypinidresponse.md + - docs/models/operations/gettopwatchedcontentcountry.md + - docs/models/operations/gettopwatchedcontentgenre.md + - docs/models/operations/gettopwatchedcontentguids.md + - docs/models/operations/gettopwatchedcontentmediacontainer.md + - docs/models/operations/gettopwatchedcontentmetadata.md + - docs/models/operations/gettopwatchedcontentqueryparamtype.md + - docs/models/operations/gettopwatchedcontentrequest.md + - docs/models/operations/gettopwatchedcontentresponse.md + - docs/models/operations/gettopwatchedcontentresponsebody.md + - docs/models/operations/gettopwatchedcontentrole.md + - docs/models/operations/gettranscodesessionsmediacontainer.md + - docs/models/operations/gettranscodesessionsresponse.md + - docs/models/operations/gettranscodesessionsresponsebody.md + - docs/models/operations/gettransienttokenqueryparamtype.md + - docs/models/operations/gettransienttokenrequest.md + - docs/models/operations/gettransienttokenresponse.md + - docs/models/operations/getupdatestatusmediacontainer.md + - docs/models/operations/getupdatestatusresponse.md + - docs/models/operations/getupdatestatusresponsebody.md + - docs/models/operations/getuserdetailsauthenticationresponsestatus.md + - docs/models/operations/getuserdetailsauthenticationstatus.md + - docs/models/operations/getuserdetailsfeatures.md + - docs/models/operations/getuserdetailsrequest.md + - docs/models/operations/getuserdetailsresponse.md + - docs/models/operations/getuserdetailsstatus.md + - docs/models/operations/getuserdetailssubscription.md + - docs/models/operations/getuserdetailsuserplexaccount.md + - docs/models/operations/getuserfriendsresponse.md + - docs/models/operations/getwatchlistrequest.md + - docs/models/operations/getwatchlistresponse.md + - docs/models/operations/getwatchlistresponsebody.md + - docs/models/operations/guids.md + - docs/models/operations/hub.md + - docs/models/operations/image.md + - docs/models/operations/includecollections.md + - docs/models/operations/includedetails.md + - docs/models/operations/includeexternalmedia.md + - docs/models/operations/includeguids.md + - docs/models/operations/includehttps.md + - docs/models/operations/includeipv6.md + - docs/models/operations/includemeta.md + - docs/models/operations/includerelay.md + - docs/models/operations/internalpaymentmethod.md + - docs/models/operations/level.md + - docs/models/operations/librarysectionid.md + - docs/models/operations/libtype.md + - docs/models/operations/location.md + - docs/models/operations/loglinerequest.md + - docs/models/operations/loglineresponse.md + - docs/models/operations/logmultilineresponse.md + - docs/models/operations/mailingliststatus.md + - docs/models/operations/markplayedrequest.md + - docs/models/operations/markplayedresponse.md + - docs/models/operations/markunplayedrequest.md + - docs/models/operations/markunplayedresponse.md + - docs/models/operations/media.md + - docs/models/operations/mediacontainer.md + - docs/models/operations/mediaprovider.md + - docs/models/operations/mediareviewsvisibility.md + - docs/models/operations/metadata.md + - docs/models/operations/minsize.md + - docs/models/operations/myplex.md + - docs/models/operations/onlytransient.md + - docs/models/operations/operator.md + - docs/models/operations/part.md + - docs/models/operations/pastsubscription.md + - docs/models/operations/pathparamtaskname.md + - docs/models/operations/performsearchrequest.md + - docs/models/operations/performsearchresponse.md + - docs/models/operations/performvoicesearchrequest.md + - docs/models/operations/performvoicesearchresponse.md + - docs/models/operations/pivot.md + - docs/models/operations/player.md + - docs/models/operations/playlisttype.md + - docs/models/operations/plexdevice.md + - docs/models/operations/postuserssignindataauthenticationfeatures.md + - docs/models/operations/postuserssignindataauthenticationresponsestatus.md + - docs/models/operations/postuserssignindataauthenticationstatus.md + - docs/models/operations/postuserssignindataauthenticationsubscription.md + - docs/models/operations/postuserssignindataautoselectsubtitle.md + - docs/models/operations/postuserssignindatadefaultsubtitleaccessibility.md + - docs/models/operations/postuserssignindatadefaultsubtitleforced.md + - docs/models/operations/postuserssignindatafeatures.md + - docs/models/operations/postuserssignindataglobals.md + - docs/models/operations/postuserssignindatamailingliststatus.md + - docs/models/operations/postuserssignindatamediareviewsvisibility.md + - docs/models/operations/postuserssignindatarequest.md + - docs/models/operations/postuserssignindatarequestbody.md + - docs/models/operations/postuserssignindataresponse.md + - docs/models/operations/postuserssignindataservices.md + - docs/models/operations/postuserssignindatastate.md + - docs/models/operations/postuserssignindatastatus.md + - docs/models/operations/postuserssignindatasubscription.md + - docs/models/operations/postuserssignindatauserplexaccount.md + - docs/models/operations/postuserssignindatauserprofile.md + - docs/models/operations/postuserssignindatawatchedindicator.md + - docs/models/operations/producer.md + - docs/models/operations/provider.md + - docs/models/operations/queryparamfilter.md + - docs/models/operations/queryparamforce.md + - docs/models/operations/queryparamonlytransient.md + - docs/models/operations/queryparamsmart.md + - docs/models/operations/queryparamtype.md + - docs/models/operations/ratings.md + - docs/models/operations/release.md + - docs/models/operations/responsebody.md + - docs/models/operations/role.md + - docs/models/operations/scope.md + - docs/models/operations/server.md + - docs/models/operations/services.md + - docs/models/operations/session.md + - docs/models/operations/setting.md + - docs/models/operations/sharedservers.md + - docs/models/operations/sharedsources.md + - docs/models/operations/skip.md + - docs/models/operations/smart.md + - docs/models/operations/sort.md + - docs/models/operations/startalltasksresponse.md + - docs/models/operations/starttaskrequest.md + - docs/models/operations/starttaskresponse.md + - docs/models/operations/startuniversaltranscoderequest.md + - docs/models/operations/startuniversaltranscoderesponse.md + - docs/models/operations/state.md + - docs/models/operations/statisticsbandwidth.md + - docs/models/operations/statisticsmedia.md + - docs/models/operations/statisticsresources.md + - docs/models/operations/status.md + - docs/models/operations/stopalltasksresponse.md + - docs/models/operations/stoptaskrequest.md + - docs/models/operations/stoptaskresponse.md + - docs/models/operations/stoptranscodesessionrequest.md + - docs/models/operations/stoptranscodesessionresponse.md + - docs/models/operations/stream.md + - docs/models/operations/subscription.md + - docs/models/operations/tag.md + - docs/models/operations/taskname.md + - docs/models/operations/tonight.md + - docs/models/operations/transcodesession.md + - docs/models/operations/trials.md + - docs/models/operations/type.md + - docs/models/operations/updateplaylistrequest.md + - docs/models/operations/updateplaylistresponse.md + - docs/models/operations/updateplayprogressrequest.md + - docs/models/operations/updateplayprogressresponse.md + - docs/models/operations/uploadplaylistrequest.md + - docs/models/operations/uploadplaylistresponse.md + - docs/models/operations/upscale.md + - docs/models/operations/user.md + - docs/models/operations/userprofile.md + - docs/models/operations/watchedindicator.md + - docs/models/operations/writer.md + - docs/models/utils/retryconfig.md - docs/sdks/activities/README.md + - docs/sdks/authentication/README.md - docs/sdks/butler/README.md - - docs/sdks/plex/README.md - docs/sdks/hubs/README.md - - docs/sdks/search/README.md - docs/sdks/library/README.md - docs/sdks/log/README.md + - docs/sdks/media/README.md - docs/sdks/playlists/README.md - - docs/sdks/authentication/README.md - - docs/sdks/statistics/README.md + - docs/sdks/plex/README.md + - docs/sdks/plexapi/README.md + - docs/sdks/search/README.md + - docs/sdks/server/README.md - docs/sdks/sessions/README.md + - docs/sdks/statistics/README.md - docs/sdks/updater/README.md + - docs/sdks/video/README.md - docs/sdks/watchlist/README.md - - USAGE.md - - .gitattributes - - src/plex_api/_hooks/sdkhooks.py - - src/plex_api/_hooks/types.py - - src/plex_api/_hooks/__init__.py + - poetry.toml + - py.typed + - pylintrc + - pyproject.toml + - scripts/compile.sh + - scripts/prepare-readme.py + - scripts/publish.sh + - src/plex_api_client/__init__.py + - src/plex_api_client/_hooks/__init__.py + - src/plex_api_client/_hooks/sdkhooks.py + - src/plex_api_client/_hooks/types.py + - src/plex_api_client/activities.py + - src/plex_api_client/authentication.py + - src/plex_api_client/basesdk.py + - src/plex_api_client/butler.py + - src/plex_api_client/httpclient.py + - src/plex_api_client/hubs.py + - src/plex_api_client/library.py + - src/plex_api_client/log.py + - src/plex_api_client/media.py + - src/plex_api_client/models/components/__init__.py + - src/plex_api_client/models/components/security.py + - src/plex_api_client/models/errors/__init__.py + - src/plex_api_client/models/errors/addplaylistcontents.py + - src/plex_api_client/models/errors/applyupdates.py + - src/plex_api_client/models/errors/cancelserveractivities.py + - src/plex_api_client/models/errors/checkforupdates.py + - src/plex_api_client/models/errors/clearplaylistcontents.py + - src/plex_api_client/models/errors/createplaylist.py + - src/plex_api_client/models/errors/deletelibrary.py + - src/plex_api_client/models/errors/deleteplaylist.py + - src/plex_api_client/models/errors/enablepapertrail.py + - src/plex_api_client/models/errors/get_all_libraries.py + - src/plex_api_client/models/errors/get_banner_image.py + - src/plex_api_client/models/errors/get_library_details.py + - src/plex_api_client/models/errors/get_library_items.py + - src/plex_api_client/models/errors/get_media_providers.py + - src/plex_api_client/models/errors/get_meta_data_by_rating_key.py + - src/plex_api_client/models/errors/get_refresh_library_metadata.py + - src/plex_api_client/models/errors/get_search_library.py + - src/plex_api_client/models/errors/get_server_identity.py + - src/plex_api_client/models/errors/get_server_resources.py + - src/plex_api_client/models/errors/get_thumb_image.py + - src/plex_api_client/models/errors/get_watch_list.py + - src/plex_api_client/models/errors/getavailableclients.py + - src/plex_api_client/models/errors/getbandwidthstatistics.py + - src/plex_api_client/models/errors/getbutlertasks.py + - src/plex_api_client/models/errors/getcompanionsdata.py + - src/plex_api_client/models/errors/getdevices.py + - src/plex_api_client/models/errors/getfilehash.py + - src/plex_api_client/models/errors/getgeodata.py + - src/plex_api_client/models/errors/getglobalhubs.py + - src/plex_api_client/models/errors/gethomedata.py + - src/plex_api_client/models/errors/getlibraryhubs.py + - src/plex_api_client/models/errors/getmetadatachildren.py + - src/plex_api_client/models/errors/getmyplexaccount.py + - src/plex_api_client/models/errors/getondeck.py + - src/plex_api_client/models/errors/getpin.py + - src/plex_api_client/models/errors/getplaylist.py + - src/plex_api_client/models/errors/getplaylistcontents.py + - src/plex_api_client/models/errors/getplaylists.py + - src/plex_api_client/models/errors/getrecentlyadded.py + - src/plex_api_client/models/errors/getresizedphoto.py + - src/plex_api_client/models/errors/getresourcesstatistics.py + - src/plex_api_client/models/errors/getsearchresults.py + - src/plex_api_client/models/errors/getserveractivities.py + - src/plex_api_client/models/errors/getservercapabilities.py + - src/plex_api_client/models/errors/getserverlist.py + - src/plex_api_client/models/errors/getserverpreferences.py + - src/plex_api_client/models/errors/getsessionhistory.py + - src/plex_api_client/models/errors/getsessions.py + - src/plex_api_client/models/errors/getsourceconnectioninformation.py + - src/plex_api_client/models/errors/getstatistics.py + - src/plex_api_client/models/errors/gettimeline.py + - src/plex_api_client/models/errors/gettokenbypinid.py + - src/plex_api_client/models/errors/gettopwatchedcontent.py + - src/plex_api_client/models/errors/gettranscodesessions.py + - src/plex_api_client/models/errors/gettransienttoken.py + - src/plex_api_client/models/errors/getupdatestatus.py + - src/plex_api_client/models/errors/getuserdetails.py + - src/plex_api_client/models/errors/getuserfriends.py + - src/plex_api_client/models/errors/logline.py + - src/plex_api_client/models/errors/logmultiline.py + - src/plex_api_client/models/errors/markplayed.py + - src/plex_api_client/models/errors/markunplayed.py + - src/plex_api_client/models/errors/performsearch.py + - src/plex_api_client/models/errors/performvoicesearch.py + - src/plex_api_client/models/errors/post_users_sign_in_data.py + - src/plex_api_client/models/errors/sdkerror.py + - src/plex_api_client/models/errors/startalltasks.py + - src/plex_api_client/models/errors/starttask.py + - src/plex_api_client/models/errors/startuniversaltranscode.py + - src/plex_api_client/models/errors/stopalltasks.py + - src/plex_api_client/models/errors/stoptask.py + - src/plex_api_client/models/errors/stoptranscodesession.py + - src/plex_api_client/models/errors/updateplaylist.py + - src/plex_api_client/models/errors/updateplayprogress.py + - src/plex_api_client/models/errors/uploadplaylist.py + - src/plex_api_client/models/internal/__init__.py + - src/plex_api_client/models/internal/globals.py + - src/plex_api_client/models/operations/__init__.py + - src/plex_api_client/models/operations/addplaylistcontents.py + - src/plex_api_client/models/operations/applyupdates.py + - src/plex_api_client/models/operations/cancelserveractivities.py + - src/plex_api_client/models/operations/checkforupdates.py + - src/plex_api_client/models/operations/clearplaylistcontents.py + - src/plex_api_client/models/operations/createplaylist.py + - src/plex_api_client/models/operations/deletelibrary.py + - src/plex_api_client/models/operations/deleteplaylist.py + - src/plex_api_client/models/operations/enablepapertrail.py + - src/plex_api_client/models/operations/get_all_libraries.py + - src/plex_api_client/models/operations/get_banner_image.py + - src/plex_api_client/models/operations/get_library_details.py + - src/plex_api_client/models/operations/get_library_items.py + - src/plex_api_client/models/operations/get_media_providers.py + - src/plex_api_client/models/operations/get_meta_data_by_rating_key.py + - src/plex_api_client/models/operations/get_refresh_library_metadata.py + - src/plex_api_client/models/operations/get_search_library.py + - src/plex_api_client/models/operations/get_server_identity.py + - src/plex_api_client/models/operations/get_server_resources.py + - src/plex_api_client/models/operations/get_thumb_image.py + - src/plex_api_client/models/operations/get_watch_list.py + - src/plex_api_client/models/operations/getavailableclients.py + - src/plex_api_client/models/operations/getbandwidthstatistics.py + - src/plex_api_client/models/operations/getbutlertasks.py + - src/plex_api_client/models/operations/getcompanionsdata.py + - src/plex_api_client/models/operations/getdevices.py + - src/plex_api_client/models/operations/getfilehash.py + - src/plex_api_client/models/operations/getgeodata.py + - src/plex_api_client/models/operations/getglobalhubs.py + - src/plex_api_client/models/operations/gethomedata.py + - src/plex_api_client/models/operations/getlibraryhubs.py + - src/plex_api_client/models/operations/getmetadatachildren.py + - src/plex_api_client/models/operations/getmyplexaccount.py + - src/plex_api_client/models/operations/getondeck.py + - src/plex_api_client/models/operations/getpin.py + - src/plex_api_client/models/operations/getplaylist.py + - src/plex_api_client/models/operations/getplaylistcontents.py + - src/plex_api_client/models/operations/getplaylists.py + - src/plex_api_client/models/operations/getrecentlyadded.py + - src/plex_api_client/models/operations/getresizedphoto.py + - src/plex_api_client/models/operations/getresourcesstatistics.py + - src/plex_api_client/models/operations/getsearchresults.py + - src/plex_api_client/models/operations/getserveractivities.py + - src/plex_api_client/models/operations/getservercapabilities.py + - src/plex_api_client/models/operations/getserverlist.py + - src/plex_api_client/models/operations/getserverpreferences.py + - src/plex_api_client/models/operations/getsessionhistory.py + - src/plex_api_client/models/operations/getsessions.py + - src/plex_api_client/models/operations/getsourceconnectioninformation.py + - src/plex_api_client/models/operations/getstatistics.py + - src/plex_api_client/models/operations/gettimeline.py + - src/plex_api_client/models/operations/gettokenbypinid.py + - src/plex_api_client/models/operations/gettopwatchedcontent.py + - src/plex_api_client/models/operations/gettranscodesessions.py + - src/plex_api_client/models/operations/gettransienttoken.py + - src/plex_api_client/models/operations/getupdatestatus.py + - src/plex_api_client/models/operations/getuserdetails.py + - src/plex_api_client/models/operations/getuserfriends.py + - src/plex_api_client/models/operations/logline.py + - src/plex_api_client/models/operations/logmultiline.py + - src/plex_api_client/models/operations/markplayed.py + - src/plex_api_client/models/operations/markunplayed.py + - src/plex_api_client/models/operations/performsearch.py + - src/plex_api_client/models/operations/performvoicesearch.py + - src/plex_api_client/models/operations/post_users_sign_in_data.py + - src/plex_api_client/models/operations/startalltasks.py + - src/plex_api_client/models/operations/starttask.py + - src/plex_api_client/models/operations/startuniversaltranscode.py + - src/plex_api_client/models/operations/stopalltasks.py + - src/plex_api_client/models/operations/stoptask.py + - src/plex_api_client/models/operations/stoptranscodesession.py + - src/plex_api_client/models/operations/updateplaylist.py + - src/plex_api_client/models/operations/updateplayprogress.py + - src/plex_api_client/models/operations/uploadplaylist.py + - src/plex_api_client/playlists.py + - src/plex_api_client/plex.py + - src/plex_api_client/py.typed + - src/plex_api_client/sdk.py + - src/plex_api_client/sdkconfiguration.py + - src/plex_api_client/search.py + - src/plex_api_client/server.py + - src/plex_api_client/sessions.py + - src/plex_api_client/statistics.py + - src/plex_api_client/types/__init__.py + - src/plex_api_client/types/basemodel.py + - src/plex_api_client/updater.py + - src/plex_api_client/utils/__init__.py + - src/plex_api_client/utils/annotations.py + - src/plex_api_client/utils/enums.py + - src/plex_api_client/utils/eventstreaming.py + - src/plex_api_client/utils/forms.py + - src/plex_api_client/utils/headers.py + - src/plex_api_client/utils/logger.py + - src/plex_api_client/utils/metadata.py + - src/plex_api_client/utils/queryparams.py + - src/plex_api_client/utils/requestbodies.py + - src/plex_api_client/utils/retries.py + - src/plex_api_client/utils/security.py + - src/plex_api_client/utils/serializers.py + - src/plex_api_client/utils/url.py + - src/plex_api_client/utils/values.py + - src/plex_api_client/video.py + - src/plex_api_client/watchlist.py +examples: + getServerCapabilities: + speakeasy-default-get-server-capabilities: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerPreferences: + speakeasy-default-get-server-preferences: + responses: + "200": + application/json: {"MediaContainer": {"size": 161, "Setting": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getAvailableClients: + speakeasy-default-get-available-clients: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Server": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getDevices: + speakeasy-default-get-devices: + responses: + "200": + application/json: {"MediaContainer": {"size": 151, "identifier": "com.plexapp.system.devices", "Device": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-server-identity: + speakeasy-default-get-server-identity: + responses: + "200": + application/json: {"MediaContainer": {"size": 0, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}} + "408": + application/json: {"code": 408, "message": "The server timed out waiting for the request."} + getMyPlexAccount: + speakeasy-default-get-my-plex-account: + responses: + "200": + application/json: {"MyPlex": {"authToken": "Z5v-PrNASDFpsaCi3CPK7", "username": "example.email@mail.com", "mappingState": "mapped", "signInState": "ok", "publicAddress": "140.20.68.140", "publicPort": 32400, "privateAddress": "10.10.10.47", "privatePort": 32400, "subscriptionFeatures": "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", "subscriptionState": "Active"}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getResizedPhoto: + speakeasy-default-get-resized-photo: + parameters: + query: + width: 110 + height: 165 + opacity: 100 + blur: 20 + minSize: 1 + upscale: 0 + url: "/library/metadata/49564/thumb/1654258204" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-media-providers: + speakeasy-default-get-media-providers: + parameters: + query: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerList: + speakeasy-default-get-server-list: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Server": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + markPlayed: + speakeasy-default-mark-played: + parameters: + query: + key: 59398 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + markUnplayed: + speakeasy-default-mark-unplayed: + parameters: + query: + key: 59398 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + updatePlayProgress: + "": + parameters: + query: + key: "" + time: 90000 + state: "played" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-banner-image: + speakeasy-default-get-banner-image: + parameters: + path: + ratingKey: 9518 + query: + width: 396 + height: 396 + minSize: 1 + upscale: 1 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-thumb-image: + speakeasy-default-get-thumb-image: + parameters: + path: + ratingKey: 9518 + query: + width: 396 + height: 396 + minSize: 1 + upscale: 1 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTimeline: + "": + parameters: + query: + ratingKey: 23409 + key: "/library/metadata/23409" + state: "playing" + hasMDE: 1 + time: 2000 + duration: 10000 + context: "home:hub.continueWatching" + playQueueItemID: 1 + playBackTime: 2000 + row: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startUniversalTranscode: + "": + parameters: + query: + hasMDE: 1 + path: "/library/metadata/23409" + mediaIndex: 0 + partIndex: 0 + protocol: "hls" + fastSeek: 0 + directPlay: 0 + directStream: 0 + subtitleSize: 100 + subtites: "burn" + audioBoost: 100 + location: "lan" + mediaBufferSize: 102400 + session: "zvcage8b7rkioqcm8f4uns4c" + addDebugOverlay: 0 + autoAdjustQuality: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerActivities: + speakeasy-default-get-server-activities: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + cancelServerActivities: + "": + parameters: + path: + activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getButlerTasks: + speakeasy-default-get-butler-tasks: + responses: + "200": + application/json: {"ButlerTasks": {"ButlerTask": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startAllTasks: + speakeasy-default-start-all-tasks: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopAllTasks: + speakeasy-default-stop-all-tasks: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startTask: + speakeasy-default-start-task: + parameters: + path: + taskName: "CleanOldBundles" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopTask: + speakeasy-default-stop-task: + parameters: + path: + taskName: "BackupDatabase" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getCompanionsData: + speakeasy-default-get-companions-data: + responses: + "200": + application/json: [] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getUserFriends: + speakeasy-default-get-user-friends: + responses: + "200": + application/json: [{"email": "username@email.com", "friendlyName": "exampleUser", "home": true, "id": 0, "restricted": false, "sharedServers": [], "sharedSources": [], "status": "accepted", "thumb": "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", "title": "username123", "username": "username123", "uuid": "7d1916e0d8f6e76b"}] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getGeoData: + speakeasy-default-get-geo-data: + responses: + "200": + application/json: {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getHomeData: + speakeasy-default-get-home-data: + responses: + "200": + application/json: {"id": 1841489, "name": "Blindkitty38's home", "guestUserID": 58815432, "guestUserUUID": "f3df4e01bfca0787"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-server-resources: + speakeasy-default-get-server-resources: + parameters: + query: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + includeHttps: 1 + includeRelay: 1 + includeIPv6: 1 + responses: + "200": + application/json: [] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPin: + "": + parameters: + query: + X-Plex-Product: "Plex Web" + responses: + "200": + application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} + "400": + application/json: {"errors": []} + getTokenByPinId: + "": + parameters: + path: + pinID: 408895 + query: {} + responses: + "404": + application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]} + getGlobalHubs: + speakeasy-default-get-global-hubs: + responses: + "200": + application/json: {"MediaContainer": {"size": 8, "allowSync": true, "identifier": "com.plexapp.plugins.library", "Hub": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getLibraryHubs: + speakeasy-default-get-library-hubs: + parameters: + path: + sectionId: "6728.76" + query: {} + responses: + "200": + application/json: {"MediaContainer": {"size": 7, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "Hub": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + performSearch: + speakeasy-default-perform-search: + parameters: + query: + query: "dylan" + limit: 5 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + performVoiceSearch: + speakeasy-default-perform-voice-search: + parameters: + query: + query: "dead+poop" + limit: 5 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSearchResults: + speakeasy-default-get-search-results: + parameters: + query: + query: "110" + responses: + "200": + application/json: {"MediaContainer": {"size": 26, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [], "Provider": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getFileHash: + speakeasy-default-get-file-hash: + parameters: + query: + url: "file://C:\\Image.png&type=13" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getRecentlyAdded: + speakeasy-default-get-recently-added: + parameters: + query: + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-all-libraries: + speakeasy-default-get-all-libraries: + responses: + "200": + application/json: {"MediaContainer": {"size": 5, "allowSync": false, "title1": "Plex Library", "Directory": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-library-details: + speakeasy-default-get-library-details: + parameters: + path: + sectionKey: 9518 + query: {} + responses: + "200": + application/json: {"MediaContainer": {"size": 29, "allowSync": false, "art": "/:/resources/movie-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "viewGroup": "secondary", "viewMode": 65592, "Directory": [], "Type": [], "FieldType": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + deleteLibrary: + speakeasy-default-delete-library: + parameters: + path: + sectionKey: 9518 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-library-items: + "": + parameters: + path: + sectionKey: 9518 + tag: "edition" + query: + includeGuids: 1 + includeMeta: 1 + type: 2 + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 70, "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-refresh-library-metadata: + speakeasy-default-get-refresh-library-metadata: + parameters: + path: + sectionKey: 9518 + query: + force: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-search-library: + speakeasy-default-get-search-library: + parameters: + path: + sectionKey: 9518 + query: + type: 2 + responses: + "200": + application/json: {"MediaContainer": {"size": 2, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "Search for ''", "viewGroup": "season", "viewMode": 65593, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-meta-data-by-rating-key: + speakeasy-default-get-meta-data-by-rating-key: + parameters: + path: + ratingKey: 9518 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "cfc899d7-3000-46f6-8489-b9592714ada5", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getMetadataChildren: + include-stream: + parameters: + path: + ratingKey: "1539.14" + query: + includeElements: "Stream" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + include-stream-otheritem: + parameters: + path: + ratingKey: "8449.64" + query: + includeElements: "Stream,OtherItem" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + include-stream-otheritem-anotheritem: + parameters: + path: + ratingKey: "5800.4" + query: + includeElements: "Stream,OtherItem,AnotherItem" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTopWatchedContent: + "": + parameters: + query: + type: 2 + includeGuids: 1 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getOnDeck: + speakeasy-default-get-on-deck: + responses: + "200": + application/json: {"MediaContainer": {"size": 16, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-watch-list: + speakeasy-default-get-watch-list: + parameters: + path: + filter: "available" + query: + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + logLine: + speakeasy-default-log-line: + parameters: + query: + level: 3 + message: "Test log message" + source: "Postman" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + logMultiLine: + speakeasy-default-log-multi-line: + requestBody: + text/plain: "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + enablePaperTrail: + speakeasy-default-enable-paper-trail: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + createPlaylist: + speakeasy-default-create-playlist: + parameters: + query: + title: "" + type: "photo" + smart: 1 + uri: "https://inborn-brochure.biz" + responses: + "200": + application/json: {"MediaContainer": {"size": 7, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylists: + speakeasy-default-get-playlists: + responses: + "200": + application/json: {"MediaContainer": {"size": 4, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylist: + speakeasy-default-get-playlist: + parameters: + path: + playlistID: "4109.48" + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + deletePlaylist: + speakeasy-default-delete-playlist: + parameters: + path: + playlistID: "216.22" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + updatePlaylist: + speakeasy-default-update-playlist: + parameters: + path: + playlistID: "3915" + query: {} + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylistContents: + speakeasy-default-get-playlist-contents: + parameters: + path: + playlistID: "5004.46" + query: + type: 2 + responses: + "200": + application/json: {"MediaContainer": {"size": 2, "composite": "/playlists/95/composite/1705717521", "duration": 282, "leafCount": 2, "playlistType": "video", "ratingKey": "95", "smart": true, "title": "Smart Movie Playlist", "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + clearPlaylistContents: + speakeasy-default-clear-playlist-contents: + parameters: + path: + playlistID: "1893.18" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + addPlaylistContents: + speakeasy-default-add-playlist-contents: + parameters: + path: + playlistID: "8502.01" + query: + uri: "server://12345/com.plexapp.plugins.library/library/metadata/1" + playQueueID: 123 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "leafCountAdded": 1, "leafCountRequested": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + uploadPlaylist: + speakeasy-default-upload-playlist: + parameters: + query: + path: "/home/barkley/playlist.m3u" + force: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTransientToken: + speakeasy-default-get-transient-token: + parameters: + query: + type: "delegation" + scope: "all" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSourceConnectionInformation: + speakeasy-default-get-source-connection-information: + parameters: + query: + source: "server://client-identifier" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getUserDetails: + speakeasy-default-get-user-details: + parameters: + query: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "200": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + post-users-sign-in-data: + speakeasy-default-post-users-sign-in-data: + requestBody: + application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} + responses: + "201": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 569045}}], "trials": [{}]} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsMedia": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getResourcesStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getBandwidthStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsBandwidth": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSessions: + speakeasy-default-get-sessions: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSessionHistory: + viewed-at-descending: + parameters: + query: + sort: "viewedAt:desc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + viewed-at-ascending: + parameters: + query: + sort: "viewedAt:asc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + rating-descending: + parameters: + query: + sort: "rating:desc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + rating-ascending: + parameters: + query: + sort: "rating:asc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + "": + parameters: + query: + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + ViewedAt: + parameters: + query: + accountId: 1 + filter: viewedAt>=1704862818 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTranscodeSessions: + speakeasy-default-get-transcode-sessions: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "TranscodeSession": [{"key": "vv3i2q2lax92qlzul1hbd4bx", "throttled": false, "complete": false, "progress": 1.7999999523162842, "size": -22, "speed": 25.100000381469727, "error": false, "duration": 1445695, "remaining": 53, "context": "streaming", "sourceVideoCodec": "h264", "sourceAudioCodec": "aac", "videoDecision": "transcode", "audioDecision": "transcode", "subtitleDecision": "burn", "protocol": "http", "container": "mkv", "videoCodec": "h264", "audioCodec": "opus", "audioChannels": 1, "transcodeHwRequested": true, "timeStamp": 1705895805.4919229, "maxOffsetAvailable": 29.53, "minOffsetAvailable": 3.003000020980835}]}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopTranscodeSession: + speakeasy-default-stop-transcode-session: + parameters: + path: + sessionKey: "zz7llzqlx8w9vnrsbnwhbmep" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getUpdateStatus: + speakeasy-default-get-update-status: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "canInstall": false, "checkedAt": 1705801232, "downloadURL": "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "status": 0, "Release": [{"key": "https://plex.tv/updater/releases/5136", "version": "1.40.0.7775-456fbaf97", "added": "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n(Music) Store track genres and add filtering options (#14653)\n(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n(View History) No longer create a view history entry for items marked as played (#10888)\n(Web) Updated to 4.118.0", "fixed": "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n(Collection) Server could become unresponsive when collection membership changes (#14612)\n(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n(Library) The Content Rating not equal to None filter does not work (#14620)\n(Search) Album search results could contain all the album's tracks too (#14486)\n(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", "downloadURL": "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "state": "notify"}]}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + checkForUpdates: + "": + parameters: + query: + download: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + applyUpdates: + "": + parameters: + query: + tonight: 1 + skip: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e4a76c2..b1e95f5 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -10,17 +10,20 @@ generation: parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true auth: - oAuth2ClientCredentialsEnabled: false + oAuth2ClientCredentialsEnabled: true python: - version: 0.10.0 + version: 0.11.0 additionalDependencies: - dependencies: {} - extraDependencies: - dev: {} + dev: {} + main: {} author: LukeHagar + authors: + - Speakeasy clientServerStatusCodesAsErrors: true description: Python Client SDK Generated by Speakeasy + enumFormat: enum flattenGlobalSecurity: true + flattenRequests: false imports: option: openapi paths: @@ -36,4 +39,4 @@ python: packageName: plex-api-client projectUrls: {} responseFormat: envelope - templateVersion: v1 + templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 70be29a..5622ef1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,34 +1,35 @@ -speakeasyVersion: 1.322.3 +speakeasyVersion: 1.393.0 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:a349a5e821636e63846d0f807281264a5635e046828dadf05da5861f29fac24b - sourceBlobDigest: sha256:b359c88992331fb1e15cbb1131469faf27d0c7e758c2a2713122c4cd687adca0 + sourceRevisionDigest: sha256:44184fe64938a688d21d58aa0e390471812eda6f10c9ca0145a7328cf31a4f0a + sourceBlobDigest: sha256:7257c51225e1fb6fa7de445fbe2f31151dc89771894c9b731a29ab01b504f503 tags: - latest - - main targets: plexpy: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:a349a5e821636e63846d0f807281264a5635e046828dadf05da5861f29fac24b - sourceBlobDigest: sha256:b359c88992331fb1e15cbb1131469faf27d0c7e758c2a2713122c4cd687adca0 - outLocation: /github/workspace/repo + sourceRevisionDigest: sha256:44184fe64938a688d21d58aa0e390471812eda6f10c9ca0145a7328cf31a4f0a + sourceBlobDigest: sha256:7257c51225e1fb6fa7de445fbe2f31151dc89771894c9b731a29ab01b504f503 + codeSamplesNamespace: code-samples-python-plexpy + codeSamplesRevisionDigest: sha256:4e01301c28b13604518c3325dcca1ea1522d890c190a7f0a41fccd205ca10551 + outLocation: /home/luke/github/plexpy workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: my-source: inputs: - - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml - registry: - location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source + - location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api:main targets: plexpy: target: python source: my-source publish: pypi: - token: $PYPI_TOKEN + token: $pypi_token codeSamples: output: codeSamples.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-python-plexpy diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index ad0f52c..040bc05 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -3,16 +3,14 @@ speakeasyVersion: latest sources: my-source: inputs: - - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml - registry: - location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source + - location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api:main targets: plexpy: target: python source: my-source publish: pypi: - token: $PYPI_TOKEN + token: $pypi_token codeSamples: output: codeSamples.yaml registry: diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8d79f0a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.testing.pytestArgs": ["tests", "-vv"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "pylint.args": ["--rcfile=pylintrc"] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/README.md b/README.md index 58e8592..0e3e98f 100644 --- a/README.md +++ b/README.md @@ -7,34 +7,100 @@ + +## Summary + +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [IDE Support](#ide-support) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [Global Parameters](#global-parameters) +* [Retries](#retries) +* [Error Handling](#error-handling) +* [Server Selection](#server-selection) +* [Custom HTTP Client](#custom-http-client) +* [Authentication](#authentication) +* [Debugging](#debugging) + + ## SDK Installation +The SDK can be installed with either *pip* or *poetry* package managers. + +### PIP + +*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line. + ```bash pip install plex-api-client ``` + +### Poetry + +*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies. + +```bash +poetry add plex-api-client +``` + +## IDE Support + +### PyCharm + +Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin. + +- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/) + + ## SDK Example Usage ### Example ```python -import plex_api +# Synchronous Example +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: # handle response pass +``` +
+ +The same SDK client can also be used to make asychronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +from plex_api_client import PlexAPI + +async def main(): + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + res = await s.server.get_server_capabilities_async() + if res.object is not None: + # handle response + pass + +asyncio.run(main()) ``` @@ -50,6 +116,7 @@ if res.object is not None: * [get_server_identity](docs/sdks/server/README.md#get_server_identity) - Get Server Identity * [get_my_plex_account](docs/sdks/server/README.md#get_my_plex_account) - Get MyPlex Account * [get_resized_photo](docs/sdks/server/README.md#get_resized_photo) - Get a Resized Photo +* [get_media_providers](docs/sdks/server/README.md#get_media_providers) - Get Media Providers * [get_server_list](docs/sdks/server/README.md#get_server_list) - Get Server List ### [media](docs/sdks/media/README.md) @@ -57,6 +124,8 @@ if res.object is not None: * [mark_played](docs/sdks/media/README.md#mark_played) - Mark Media Played * [mark_unplayed](docs/sdks/media/README.md#mark_unplayed) - Mark Media Unplayed * [update_play_progress](docs/sdks/media/README.md#update_play_progress) - Update Media Play Progress +* [get_banner_image](docs/sdks/media/README.md#get_banner_image) - Get Banner Image +* [get_thumb_image](docs/sdks/media/README.md#get_thumb_image) - Get Thumb Image ### [video](docs/sdks/video/README.md) @@ -78,9 +147,13 @@ if res.object is not None: ### [plex](docs/sdks/plex/README.md) +* [get_companions_data](docs/sdks/plex/README.md#get_companions_data) - Get Companions Data +* [get_user_friends](docs/sdks/plex/README.md#get_user_friends) - Get list of friends of the user logged in +* [get_geo_data](docs/sdks/plex/README.md#get_geo_data) - Get Geo Data * [get_home_data](docs/sdks/plex/README.md#get_home_data) - Get Plex Home Data +* [get_server_resources](docs/sdks/plex/README.md#get_server_resources) - Get Server Resources * [get_pin](docs/sdks/plex/README.md#get_pin) - Get a Pin -* [get_token](docs/sdks/plex/README.md#get_token) - Get Access Token +* [get_token_by_pin_id](docs/sdks/plex/README.md#get_token_by_pin_id) - Get Access Token by PinId ### [hubs](docs/sdks/hubs/README.md) @@ -97,17 +170,21 @@ if res.object is not None: * [get_file_hash](docs/sdks/library/README.md#get_file_hash) - Get Hash Value * [get_recently_added](docs/sdks/library/README.md#get_recently_added) - Get Recently Added -* [get_libraries](docs/sdks/library/README.md#get_libraries) - Get All Libraries -* [get_library](docs/sdks/library/README.md#get_library) - Get Library Details +* [get_all_libraries](docs/sdks/library/README.md#get_all_libraries) - Get All Libraries +* [get_library_details](docs/sdks/library/README.md#get_library_details) - Get Library Details * [delete_library](docs/sdks/library/README.md#delete_library) - Delete Library Section * [get_library_items](docs/sdks/library/README.md#get_library_items) - Get Library Items -* [refresh_library](docs/sdks/library/README.md#refresh_library) - Refresh Library -* [search_library](docs/sdks/library/README.md#search_library) - Search Library -* [get_metadata](docs/sdks/library/README.md#get_metadata) - Get Items Metadata +* [get_refresh_library_metadata](docs/sdks/library/README.md#get_refresh_library_metadata) - Refresh Metadata Of The Library +* [get_search_library](docs/sdks/library/README.md#get_search_library) - Search Library +* [get_meta_data_by_rating_key](docs/sdks/library/README.md#get_meta_data_by_rating_key) - Get Metadata by RatingKey * [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children * [get_top_watched_content](docs/sdks/library/README.md#get_top_watched_content) - Get Top Watched Content * [get_on_deck](docs/sdks/library/README.md#get_on_deck) - Get On Deck +### [watchlist](docs/sdks/watchlist/README.md) + +* [get_watch_list](docs/sdks/watchlist/README.md#get_watch_list) - Get User Watchlist + ### [log](docs/sdks/log/README.md) * [log_line](docs/sdks/log/README.md#log_line) - Logging a single line message. @@ -130,6 +207,8 @@ if res.object is not None: * [get_transient_token](docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token. * [get_source_connection_information](docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information +* [get_user_details](docs/sdks/authentication/README.md#get_user_details) - Get User Data By Token +* [post_users_sign_in_data](docs/sdks/authentication/README.md#post_users_sign_in_data) - Get User Sign In Data ### [statistics](docs/sdks/statistics/README.md) @@ -149,48 +228,91 @@ if res.object is not None: * [get_update_status](docs/sdks/updater/README.md#get_update_status) - Querying status of updates * [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates * [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates - -### [watchlist](docs/sdks/watchlist/README.md) - -* [get_watchlist](docs/sdks/watchlist/README.md#get_watchlist) - Get User Watchlist + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +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 + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.server.get_server_capabilities(, + RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + +if res.object is not None: + # handle response + pass + +``` + +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 + +s = PlexAPI( + retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.server.get_server_capabilities() + +if res.object is not None: + # handle response + pass + +``` + + ## Error Handling Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetServerCapabilitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| errors.GetServerCapabilitiesResponseBody | 400 | application/json | +| errors.GetServerCapabilitiesServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ### Example ```python -import plex_api -from plex_api.models import errors +from plex_api_client import PlexAPI +from plex_api_client.models import errors -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) res = None try: res = s.server.get_server_capabilities() + if res.object is not None: + # handle response + pass + except errors.GetServerCapabilitiesResponseBody as e: - # handle exception + # handle e.data: errors.GetServerCapabilitiesResponseBodyData + raise(e) +except errors.GetServerCapabilitiesServerResponseBody as e: + # handle e.data: errors.GetServerCapabilitiesServerResponseBodyData raise(e) except errors.SDKError as e: # handle exception raise(e) - -if res.object is not None: - # handle response - pass - ``` @@ -203,20 +325,19 @@ You can override the default server globally by passing a server index to the `s | # | Server | Variables | | - | ------ | --------- | -| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | +| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | #### Example ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( server_idx=0, access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: @@ -236,15 +357,14 @@ Some of the server options above contain variables. If you want to set the value The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( server_url="{protocol}://{ip}:{port}", access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: @@ -257,16 +377,16 @@ if res.object is not None: The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example: ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) +res = s.plex.get_companions_data(server_url="https://plex.tv/api/v2/") -res = s.plex.get_pin(x_plex_product='Postman', strong=False, x_plex_client_identifier='Postman', server_url="https://plex.tv/api/v2") - -if res.object is not None: +if res.response_bodies is not None: # handle response pass @@ -276,16 +396,81 @@ if res.object is not None: ## Custom HTTP Client -The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object. +The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. +This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. For example, you could specify a header for every request that this sdk makes as follows: ```python -import plex_api -import requests +from plex_api_client import PlexAPI +import httpx -http_client = requests.Session() -http_client.headers.update({'x-custom-header': 'someValue'}) -s = plex_api.PlexAPI(client=http_client) +http_client = httpx.Client(headers={"x-custom-header": "someValue"}) +s = PlexAPI(client=http_client) +``` + +or you could wrap the client with your own custom logic: +```python +from plex_api_client import PlexAPI +from plex_api_client.httpclient import AsyncHttpClient +import httpx + +class CustomClient(AsyncHttpClient): + client: AsyncHttpClient + + def __init__(self, client: AsyncHttpClient): + self.client = client + + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + request.headers["Client-Level-Header"] = "added by client" + + return await self.client.send( + request, stream=stream, auth=auth, follow_redirects=follow_redirects + ) + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + return self.client.build_request( + method, + url, + content=content, + data=data, + files=files, + json=json, + params=params, + headers=headers, + cookies=cookies, + timeout=timeout, + extensions=extensions, + ) + +s = PlexAPI(async_client=CustomClient(httpx.AsyncClient())) ``` @@ -302,14 +487,13 @@ This SDK supports the following security scheme globally: To authenticate with the API the `access_token` parameter must be set when initializing the SDK client instance. For example: ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: @@ -324,7 +508,7 @@ if res.object is not None: A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. -For example, you can set `X-Plex-Client-Identifier` to `'Postman'` 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 `X-Plex-Client-Identifier` 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 @@ -342,22 +526,43 @@ This is used to track the client application and its usage ### Example ```python -import plex_api +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) +res = s.plex.get_server_resources(request={ + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + "include_https": operations.IncludeHTTPS.ONE, + "include_relay": operations.IncludeRelay.ONE, + "include_i_pv6": operations.IncludeIPv6.ONE, +}) -res = s.plex.get_pin(x_plex_product='Postman', strong=False, x_plex_client_identifier='Postman') - -if res.object is not None: +if res.plex_devices is not None: # handle response pass ``` + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass your own logger class directly into your SDK. +```python +from plex_api_client import PlexAPI +import logging + +logging.basicConfig(level=logging.DEBUG) +s = PlexAPI(debug_logger=logging.getLogger("plex_api_client")) +``` + + # Development diff --git a/USAGE.md b/USAGE.md index c1dd585..9b5f0ea 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,18 +1,38 @@ ```python -import plex_api +# Synchronous Example +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: # handle response pass +``` +
+ +The same SDK client can also be used to make asychronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +from plex_api_client import PlexAPI + +async def main(): + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + res = await s.server.get_server_capabilities_async() + if res.object is not None: + # handle response + pass + +asyncio.run(main()) ``` \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 9407964..606d3ed 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,191 +3,38 @@ info: title: CodeSamples overlay for python target version: 0.0.0 actions: - - target: $["paths"]["/hubs/search"]["get"] + - target: $["paths"]["/"]["get"] update: x-codeSamples: - lang: python - label: performSearch + label: getServerCapabilities source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.search.perform_search(query='dylan', section_id=1516.53, limit=5) - - if res is not None: - # handle response - pass - - target: $["paths"]["/library/sections/{sectionId}"]["delete"] - update: - x-codeSamples: - - lang: python - label: deleteLibrary - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.delete_library(section_id=1000) - - if res is not None: - # handle response - pass - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: python - label: getPlaylistContents - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.get_playlist_contents(playlist_id=5004.46, type=9403.59) + res = s.server.get_server_capabilities() if res.object is not None: # handle response pass - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + - target: $["paths"]["/:/prefs"]["get"] update: x-codeSamples: - lang: python - label: addPlaylistContents + label: getServerPreferences source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.playlists.add_playlist_contents(playlist_id=8502.01, uri='server://12345/com.plexapp.plugins.library/library/metadata/1', play_queue_id=123) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: python - label: getToken - source: |- - import plex_api - - s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', - ) - - - res = s.plex.get_token(pin_id='', x_plex_client_identifier='Postman') - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] - update: - x-codeSamples: - - lang: python - label: startUniversalTranscode - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.video.start_universal_transcode(request=operations.StartUniversalTranscodeRequest( - has_mde=1, - path='/library/metadata/23409', - media_index=0, - part_index=0, - protocol='hls', - fast_seek=0, - direct_play=0, - direct_stream=0, - subtitle_size=100, - subtites='burn', - audio_boost=100, - location='lan', - media_buffer_size=102400, - session='zvcage8b7rkioqcm8f4uns4c', - add_debug_overlay=0, - auto_adjust_quality=0, - )) - - if res is not None: - # handle response - pass - - target: $["paths"]["/playlists/upload"]["post"] - update: - x-codeSamples: - - lang: python - label: uploadPlaylist - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.upload_playlist(path='/home/barkley/playlist.m3u', force=operations.Force.ZERO) - - if res is not None: - # handle response - pass - - target: $["paths"]["/statistics/media"]["get"] - update: - x-codeSamples: - - lang: python - label: getStatistics - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.statistics.get_statistics(timespan=4) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/identity"]["get"] - update: - x-codeSamples: - - lang: python - label: getServerIdentity - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_server_identity() + res = s.server.get_server_preferences() if res.object is not None: # handle response @@ -198,417 +45,31 @@ actions: - lang: python label: updatePlayProgress source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.media.update_play_progress(key='', time=90000, state='played') + res = s.media.update_play_progress(key="", time=90000, state="played") if res is not None: # handle response pass - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: python - label: getFileHash - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.get_file_hash(url='file://C:\Image.png&type=13', type=4462.17) - - if res is not None: - # handle response - pass - - target: $["paths"]["/library/sections"]["get"] - update: - x-codeSamples: - - lang: python - label: getLibraries - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.get_libraries() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/myplex/account"]["get"] - update: - x-codeSamples: - - lang: python - label: getMyPlexAccount - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_my_plex_account() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] - update: - x-codeSamples: - - lang: python - label: getMetadataChildren - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.get_metadata_children(rating_key=1539.14, include_elements='') - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/statistics/resources"]["get"] - update: - x-codeSamples: - - lang: python - label: getResourcesStatistics - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.statistics.get_resources_statistics(timespan=4) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/status/sessions/history/all"]["get"] - update: - x-codeSamples: - - lang: python - label: getSessionHistory - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.sessions.get_session_history(sort='', account_id=1, filter_=operations.Filter(), library_section_id=12) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/status/sessions"]["get"] - update: - x-codeSamples: - - lang: python - label: getSessions - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.sessions.get_sessions() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: python - label: getDevices - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_devices() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/activities"]["get"] - update: - x-codeSamples: - - lang: python - label: getServerActivities - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.activities.get_server_activities() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/search"]["get"] - update: - x-codeSamples: - - lang: python - label: getSearchResults - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.search.get_search_results(query='110') - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/library/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: python - label: getLibrary - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.get_library(section_id=1000, include_details=operations.IncludeDetails.ZERO) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/clients"]["get"] - update: - x-codeSamples: - - lang: python - label: getAvailableClients - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_available_clients() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/butler"]["post"] - update: - x-codeSamples: - - lang: python - label: startAllTasks - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.butler.start_all_tasks() - - if res is not None: - # handle response - pass - - target: $["paths"]["/butler/{taskName}"]["delete"] - update: - x-codeSamples: - - lang: python - label: stopTask - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.butler.stop_task(task_name=operations.PathParamTaskName.BACKUP_DATABASE) - - if res is not None: - # handle response - pass - - target: $["paths"]["/log/networked"]["get"] - update: - x-codeSamples: - - lang: python - label: enablePaperTrail - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.log.enable_paper_trail() - - if res is not None: - # handle response - pass - - target: $["paths"]["/statistics/bandwidth"]["get"] - update: - x-codeSamples: - - lang: python - label: getBandwidthStatistics - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.statistics.get_bandwidth_statistics(timespan=4) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/updater/check"]["put"] - update: - x-codeSamples: - - lang: python - label: checkForUpdates - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.updater.check_for_updates(download=operations.Download.ONE) - - if res is not None: - # handle response - pass - - target: $["paths"]["/:/prefs"]["get"] - update: - x-codeSamples: - - lang: python - label: getServerPreferences - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_server_preferences() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/hubs/search/voice"]["get"] - update: - x-codeSamples: - - lang: python - label: performVoiceSearch - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.search.perform_voice_search(query='dead+poop', section_id=4094.8, limit=5) - - if res is not None: - # handle response - pass - - target: $["paths"]["/"]["get"] - update: - x-codeSamples: - - lang: python - label: getServerCapabilities - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_server_capabilities() - - if res.object is not None: - # handle response - pass - target: $["paths"]["/:/scrobble"]["get"] update: x-codeSamples: - lang: python label: markPlayed source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.media.mark_played(key=59398) if res is not None: @@ -620,27 +81,98 @@ actions: - lang: python label: getTimeline source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI + from plex_api_client.models import operations - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) + res = s.video.get_timeline(request={ + "rating_key": 23409, + "key": "/library/metadata/23409", + "state": operations.State.PLAYING, + "has_mde": 1, + "time": 2000, + "duration": 10000, + "context": "home:hub.continueWatching", + "play_queue_item_id": 1, + "play_back_time": 2000, + "row": 1, + }) - res = s.video.get_timeline(request=operations.GetTimelineRequest( - rating_key=23409, - key='/library/metadata/23409', - state=operations.State.PLAYING, - has_mde=1, - time=2000, - duration=10000, - context='home:hub.continueWatching', - play_queue_item_id=1, - play_back_time=2000, - row=1, - )) + if res is not None: + # handle response + pass + - target: $["paths"]["/:/unscrobble"]["get"] + update: + x-codeSamples: + - lang: python + label: markUnplayed + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.media.mark_unplayed(key=59398) + + if res is not None: + # handle response + pass + - target: $["paths"]["/activities"]["get"] + update: + x-codeSamples: + - lang: python + label: getServerActivities + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.activities.get_server_activities() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/activities/{activityUUID}"]["delete"] + update: + x-codeSamples: + - lang: python + label: cancelServerActivities + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.activities.cancel_server_activities(activity_uuid="25b71ed5-0f9d-461c-baa7-d404e9e10d3e") + + if res is not None: + # handle response + pass + - target: $["paths"]["/butler"]["delete"] + update: + x-codeSamples: + - lang: python + label: stopAllTasks + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.butler.stop_all_tasks() if res is not None: # handle response @@ -651,107 +183,51 @@ actions: - lang: python label: getButlerTasks source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.get_butler_tasks() if res.object is not None: # handle response pass - - target: $["paths"]["/butler"]["delete"] + - target: $["paths"]["/butler"]["post"] update: x-codeSamples: - lang: python - label: stopAllTasks + label: startAllTasks source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.butler.stop_all_tasks() + res = s.butler.start_all_tasks() if res is not None: # handle response pass - - target: $["paths"]["/playlists"]["post"] + - target: $["paths"]["/butler/{taskName}"]["delete"] update: x-codeSamples: - lang: python - label: createPlaylist + label: stopTask source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI + from plex_api_client.models import operations - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.playlists.create_playlist(request=operations.CreatePlaylistRequest( - title='', - type=operations.QueryParamType.PHOTO, - smart=operations.Smart.ONE, - uri='https://inborn-brochure.biz', - )) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/security/token"]["get"] - update: - x-codeSamples: - - lang: python - label: getTransientToken - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.authentication.get_transient_token(type=operations.GetTransientTokenQueryParamType.DELEGATION, scope=operations.Scope.ALL) - - if res is not None: - # handle response - pass - - target: $["paths"]["/photo/:/transcode"]["get"] - update: - x-codeSamples: - - lang: python - label: getResizedPhoto - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.server.get_resized_photo(request=operations.GetResizedPhotoRequest( - width=110, - height=165, - opacity=100, - blur=20, - min_size=operations.MinSize.ONE, - upscale=operations.Upscale.ZERO, - url='/library/metadata/49564/thumb/1654258204', - )) + res = s.butler.stop_task(task_name=operations.PathParamTaskName.BACKUP_DATABASE) if res is not None: # handle response @@ -762,232 +238,106 @@ actions: - lang: python label: startTask source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI + from plex_api_client.models import operations - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.start_task(task_name=operations.TaskName.CLEAN_OLD_BUNDLES) if res is not None: # handle response pass - - target: $["paths"]["/hubs"]["get"] + - target: $["paths"]["/clients"]["get"] update: x-codeSamples: - lang: python - label: getGlobalHubs + label: getAvailableClients source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.hubs.get_global_hubs(count=1262.49, only_transient=operations.OnlyTransient.ONE) + res = s.server.get_available_clients() if res.object is not None: # handle response pass - - target: $["paths"]["/library/all/top"]["get"] + - target: $["paths"]["/companions"]["get"] update: x-codeSamples: - lang: python - label: getTopWatchedContent + label: getCompanionsData source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) + res = s.plex.get_companions_data() - res = s.library.get_top_watched_content(type=505531, include_guids=1) + if res.response_bodies is not None: + # handle response + pass + - target: $["paths"]["/devices"]["get"] + update: + x-codeSamples: + - lang: python + label: getDevices + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.server.get_devices() if res.object is not None: # handle response pass - - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] + - target: $["paths"]["/friends"]["get"] update: x-codeSamples: - lang: python - label: getWatchlist + label: getUserFriends source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) + res = s.plex.get_user_friends() - res = s.watchlist.get_watchlist(request=operations.GetWatchlistRequest( - filter_=operations.PathParamFilter.RELEASED, - x_plex_token='', - )) - - if res.object is not None: + if res.friends is not None: # handle response pass - - target: $["paths"]["/servers"]["get"] + - target: $["paths"]["/geoip"]["get"] update: x-codeSamples: - lang: python - label: getServerList + label: getGeoData source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', + s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) + res = s.plex.get_geo_data() - res = s.server.get_server_list() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/:/unscrobble"]["get"] - update: - x-codeSamples: - - lang: python - label: markUnplayed - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.media.mark_unplayed(key=59398) - - if res is not None: - # handle response - pass - - target: $["paths"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: python - label: cancelServerActivities - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.activities.cancel_server_activities(activity_uuid='25b71ed5-0f9d-461c-baa7-d404e9e10d3e') - - if res is not None: - # handle response - pass - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: python - label: getTranscodeSessions - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.sessions.get_transcode_sessions() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: python - label: getUpdateStatus - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.updater.get_update_status() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] - update: - x-codeSamples: - - lang: python - label: refreshLibrary - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.refresh_library(section_id=934.16) - - if res is not None: - # handle response - pass - - target: $["paths"]["/playlists/{playlistID}"]["get"] - update: - x-codeSamples: - - lang: python - label: getPlaylist - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.get_playlist(playlist_id=4109.48) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/playlists/{playlistID}"]["delete"] - update: - x-codeSamples: - - lang: python - label: deletePlaylist - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.delete_playlist(playlist_id=216.22) - - if res is not None: + if res.geo_data is not None: # handle response pass - target: $["paths"]["/home"]["get"] @@ -996,208 +346,68 @@ actions: - lang: python label: getHomeData source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.plex.get_home_data() if res.object is not None: # handle response pass - - target: $["paths"]["/library/sections/{sectionId}/{tag}"]["get"] + - target: $["paths"]["/hubs"]["get"] update: x-codeSamples: - lang: python - label: getLibraryItems + label: getGlobalHubs source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.library.get_library_items(section_id='', tag=operations.Tag.GENRE, include_guids=1) + res = s.hubs.get_global_hubs() if res.object is not None: # handle response pass - - target: $["paths"]["/log"]["get"] + - target: $["paths"]["/hubs/search"]["get"] update: x-codeSamples: - lang: python - label: logLine + label: performSearch source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.log.log_line(level=operations.Level.THREE, message='Test log message', source='Postman') + res = s.search.perform_search(query="dylan", limit=5) if res is not None: # handle response pass - - target: $["paths"]["/playlists"]["get"] + - target: $["paths"]["/hubs/search/voice"]["get"] update: x-codeSamples: - lang: python - label: getPlaylists + label: performVoiceSearch source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.playlists.get_playlists(playlist_type=operations.PlaylistType.AUDIO, smart=operations.QueryParamSmart.ZERO) - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] - update: - x-codeSamples: - - lang: python - label: clearPlaylistContents - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.clear_playlist_contents(playlist_id=1893.18) - - if res is not None: - # handle response - pass - - target: $["paths"]["/security/resources"]["get"] - update: - x-codeSamples: - - lang: python - label: getSourceConnectionInformation - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.authentication.get_source_connection_information(source='server://client-identifier') - - if res is not None: - # handle response - pass - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: python - label: getPin - source: |- - import plex_api - - s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', - ) - - - res = s.plex.get_pin(x_plex_product='Postman', strong=False, x_plex_client_identifier='Postman') - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/library/recentlyAdded"]["get"] - update: - x-codeSamples: - - lang: python - label: getRecentlyAdded - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.library.get_recently_added() - - if res.object is not None: - # handle response - pass - - target: $["paths"]["/playlists/{playlistID}"]["put"] - update: - x-codeSamples: - - lang: python - label: updatePlaylist - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.playlists.update_playlist(playlist_id=3915, title='', summary='') - - if res is not None: - # handle response - pass - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] - update: - x-codeSamples: - - lang: python - label: stopTranscodeSession - source: |- - import plex_api - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.sessions.stop_transcode_session(session_key='zz7llzqlx8w9vnrsbnwhbmep') - - if res is not None: - # handle response - pass - - target: $["paths"]["/updater/apply"]["put"] - update: - x-codeSamples: - - lang: python - label: applyUpdates - source: |- - import plex_api - from plex_api.models import operations - - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', - ) - - - res = s.updater.apply_updates(tonight=operations.Tonight.ONE, skip=operations.Skip.ONE) + res = s.search.perform_voice_search(query="dead+poop", limit=5) if res is not None: # handle response @@ -1208,95 +418,1010 @@ actions: - lang: python label: getLibraryHubs source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=operations.QueryParamOnlyTransient.ZERO) + res = s.hubs.get_library_hubs(section_id=6728.76) if res.object is not None: # handle response pass - - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] + - target: $["paths"]["/identity"]["get"] update: x-codeSamples: - lang: python - label: searchLibrary + label: identity source: |- - import plex_api - from plex_api.models import operations + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', + s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.library.search_library(section_id=933505, type=operations.Type.FOUR) + res = s.server.get_server_identity() if res.object is not None: # handle response pass + - target: $["paths"]["/library/all/top"]["get"] + update: + x-codeSamples: + - lang: python + label: getTopWatchedContent + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_top_watched_content(type_=operations.GetTopWatchedContentQueryParamType.TWO, include_guids=1) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/hashes"]["get"] + update: + x-codeSamples: + - lang: python + label: getFileHash + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_file_hash(url="file://C:\Image.png&type=13") + + if res is not None: + # handle response + pass - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] update: x-codeSamples: - lang: python - label: getMetadata + label: key source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.library.get_metadata(rating_key=8382.31) + res = s.library.get_meta_data_by_rating_key(rating_key=9518) if res.object is not None: # handle response pass + - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] + update: + x-codeSamples: + - lang: python + label: image + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.media.get_banner_image(request={ + "rating_key": 9518, + "width": 396, + "height": 396, + "min_size": 1, + "upscale": 1, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + }) + + if res.response_stream is not None: + # handle response + pass + - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + update: + x-codeSamples: + - lang: python + label: getMetadataChildren + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_metadata_children(rating_key=1539.14, include_elements="Stream") + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] + update: + x-codeSamples: + - lang: python + label: image + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.media.get_thumb_image(request={ + "rating_key": 9518, + "width": 396, + "height": 396, + "min_size": 1, + "upscale": 1, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + }) + + if res.response_stream is not None: + # handle response + pass - target: $["paths"]["/library/onDeck"]["get"] update: x-codeSamples: - lang: python label: getOnDeck source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.library.get_on_deck() if res.object is not None: # handle response pass + - target: $["paths"]["/library/recentlyAdded"]["get"] + update: + x-codeSamples: + - lang: python + label: getRecentlyAdded + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_recently_added(x_plex_container_start=0, x_plex_container_size=50) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/sections"]["get"] + update: + x-codeSamples: + - lang: python + label: libraries + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_all_libraries() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] + update: + x-codeSamples: + - lang: python + label: list + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.watchlist.get_watch_list(request={ + "filter_": operations.Filter.AVAILABLE, + "x_plex_container_start": 0, + "x_plex_container_size": 50, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + }) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/sections/{sectionKey}"]["delete"] + update: + x-codeSamples: + - lang: python + label: deleteLibrary + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.delete_library(section_key=9518) + + if res is not None: + # handle response + pass + - target: $["paths"]["/library/sections/{sectionKey}"]["get"] + update: + x-codeSamples: + - lang: python + label: details + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_library_details(section_key=9518) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"] + update: + x-codeSamples: + - lang: python + label: metadata + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ONE) + + if res is not None: + # handle response + pass + - target: $["paths"]["/library/sections/{sectionKey}/search"]["get"] + update: + x-codeSamples: + - lang: python + label: library + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_search_library(section_key=9518, type_=operations.QueryParamType.TWO) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"] + update: + x-codeSamples: + - lang: python + label: items + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.library.get_library_items(request={ + "section_key": 9518, + "tag": operations.Tag.EDITION, + "include_guids": operations.IncludeGuids.ONE, + "include_meta": operations.IncludeMeta.ONE, + "type": operations.Type.TWO, + "x_plex_container_start": 0, + "x_plex_container_size": 50, + }) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/log"]["get"] + update: + x-codeSamples: + - lang: python + label: logLine + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.log.log_line(level=operations.Level.THREE, message="Test log message", source="Postman") + + if res is not None: + # handle response + pass - target: $["paths"]["/log"]["post"] update: x-codeSamples: - lang: python label: logMultiLine source: |- - import plex_api + from plex_api_client import PlexAPI - s = plex_api.PlexAPI( + s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - - res = s.log.log_multi_line(request='level=4&message=Test%20message%201&source=postman - level=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman') + res = s.log.log_multi_line(request="level=4&message=Test%20message%201&source=postman\n" + + "level=3&message=Test%20message%202&source=postman\n" + + "level=1&message=Test%20message%203&source=postman") + + if res is not None: + # handle response + pass + - target: $["paths"]["/log/networked"]["get"] + update: + x-codeSamples: + - lang: python + label: enablePaperTrail + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.log.enable_paper_trail() + + if res is not None: + # handle response + pass + - target: $["paths"]["/media/providers"]["get"] + update: + x-codeSamples: + - lang: python + label: providers + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.server.get_media_providers(x_plex_token="CV5xoxjTpFKUzBTShsaf") + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/myplex/account"]["get"] + update: + x-codeSamples: + - lang: python + label: getMyPlexAccount + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.server.get_my_plex_account() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/photo/:/transcode"]["get"] + update: + x-codeSamples: + - lang: python + label: getResizedPhoto + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.server.get_resized_photo(request={ + "width": 110, + "height": 165, + "opacity": 100, + "blur": 20, + "min_size": operations.MinSize.ONE, + "upscale": operations.Upscale.ONE, + "url": "/library/metadata/49564/thumb/1654258204", + }) + + if res is not None: + # handle response + pass + - target: $["paths"]["/pins"]["post"] + update: + x-codeSamples: + - lang: python + label: getPin + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.plex.get_pin(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", x_plex_product="Plex Web") + + if res.auth_pin_container is not None: + # handle response + pass + - target: $["paths"]["/pins/{pinID}"]["get"] + update: + x-codeSamples: + - lang: python + label: getTokenByPinId + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.plex.get_token_by_pin_id(pin_id=408895, x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40") + + if res.auth_pin_container is not None: + # handle response + pass + - target: $["paths"]["/playlists"]["get"] + update: + x-codeSamples: + - lang: python + label: getPlaylists + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.get_playlists() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/playlists"]["post"] + update: + x-codeSamples: + - lang: python + label: createPlaylist + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.create_playlist(request={ + "title": "", + "type": operations.CreatePlaylistQueryParamType.PHOTO, + "smart": operations.Smart.ONE, + "uri": "https://inborn-brochure.biz", + }) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/playlists/upload"]["post"] + update: + x-codeSamples: + - lang: python + label: uploadPlaylist + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ZERO) + + if res is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}"]["delete"] + update: + x-codeSamples: + - lang: python + label: deletePlaylist + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.delete_playlist(playlist_id=216.22) + + if res is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}"]["get"] + update: + x-codeSamples: + - lang: python + label: getPlaylist + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.get_playlist(playlist_id=4109.48) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}"]["put"] + update: + x-codeSamples: + - lang: python + label: updatePlaylist + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.update_playlist(playlist_id=3915) + + if res is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + update: + x-codeSamples: + - lang: python + label: clearPlaylistContents + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.clear_playlist_contents(playlist_id=1893.18) + + if res is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] + update: + x-codeSamples: + - lang: python + label: getPlaylistContents + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TWO) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + update: + x-codeSamples: + - lang: python + label: addPlaylistContents + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.playlists.add_playlist_contents(playlist_id=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/resources"]["get"] + update: + x-codeSamples: + - lang: python + label: resources + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.plex.get_server_resources(request={ + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + "include_https": operations.IncludeHTTPS.ONE, + "include_relay": operations.IncludeRelay.ONE, + "include_i_pv6": operations.IncludeIPv6.ONE, + }) + + if res.plex_devices is not None: + # handle response + pass + - target: $["paths"]["/search"]["get"] + update: + x-codeSamples: + - lang: python + label: getSearchResults + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.search.get_search_results(query="110") + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/security/resources"]["get"] + update: + x-codeSamples: + - lang: python + label: getSourceConnectionInformation + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.authentication.get_source_connection_information(source="server://client-identifier") + + if res is not None: + # handle response + pass + - target: $["paths"]["/security/token"]["get"] + update: + x-codeSamples: + - lang: python + label: getTransientToken + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.authentication.get_transient_token(type_=operations.GetTransientTokenQueryParamType.DELEGATION, scope=operations.Scope.ALL) + + if res is not None: + # handle response + pass + - target: $["paths"]["/servers"]["get"] + update: + x-codeSamples: + - lang: python + label: getServerList + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.server.get_server_list() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/statistics/bandwidth"]["get"] + update: + x-codeSamples: + - lang: python + label: getBandwidthStatistics + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.statistics.get_bandwidth_statistics(timespan=4) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/statistics/media"]["get"] + update: + x-codeSamples: + - lang: python + label: getStatistics + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.statistics.get_statistics(timespan=4) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/statistics/resources"]["get"] + update: + x-codeSamples: + - lang: python + label: getResourcesStatistics + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.statistics.get_resources_statistics(timespan=4) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/status/sessions"]["get"] + update: + x-codeSamples: + - lang: python + label: getSessions + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.sessions.get_sessions() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/status/sessions/history/all"]["get"] + update: + x-codeSamples: + - lang: python + label: getSessionHistory + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.sessions.get_session_history(sort="viewedAt:desc", account_id=1, filter_={}, library_section_id=12) + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/transcode/sessions"]["get"] + update: + x-codeSamples: + - lang: python + label: getTranscodeSessions + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.sessions.get_transcode_sessions() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + update: + x-codeSamples: + - lang: python + label: stopTranscodeSession + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.sessions.stop_transcode_session(session_key="zz7llzqlx8w9vnrsbnwhbmep") + + if res is not None: + # handle response + pass + - target: $["paths"]["/updater/apply"]["put"] + update: + x-codeSamples: + - lang: python + label: applyUpdates + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.updater.apply_updates(tonight=operations.Tonight.ONE, skip=operations.Skip.ONE) + + if res is not None: + # handle response + pass + - target: $["paths"]["/updater/check"]["put"] + update: + x-codeSamples: + - lang: python + label: checkForUpdates + source: |- + from plex_api_client import PlexAPI + from plex_api_client.models import operations + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.updater.check_for_updates(download=operations.Download.ONE) + + if res is not None: + # handle response + pass + - target: $["paths"]["/updater/status"]["get"] + update: + x-codeSamples: + - lang: python + label: getUpdateStatus + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.updater.get_update_status() + + if res.object is not None: + # handle response + pass + - target: $["paths"]["/user"]["get"] + update: + x-codeSamples: + - lang: python + label: getUserDetails + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.authentication.get_user_details(x_plex_token="CV5xoxjTpFKUzBTShsaf") + + if res.user_plex_account is not None: + # handle response + pass + - target: $["paths"]["/users/signin"]["post"] + update: + x-codeSamples: + - lang: python + label: data + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.authentication.post_users_sign_in_data(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", request_body={ + "login": "username@email.com", + "password": "password123", + "verification_code": "123456", + }) + + if res.user_plex_account is not None: + # handle response + pass + - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + update: + x-codeSamples: + - lang: python + label: startUniversalTranscode + source: |- + from plex_api_client import PlexAPI + + s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", + ) + + res = s.video.start_universal_transcode(request={ + "has_mde": 1, + "path": "/library/metadata/23409", + "media_index": 0, + "part_index": 0, + "protocol": "hls", + "fast_seek": 0, + "direct_play": 0, + "direct_stream": 0, + "subtitle_size": 100, + "subtites": "burn", + "audio_boost": 100, + "location": "lan", + "media_buffer_size": 102400, + "session": "zvcage8b7rkioqcm8f4uns4c", + "add_debug_overlay": 0, + "auto_adjust_quality": 0, + }) if res is not None: # handle response diff --git a/docs/models/components/security.md b/docs/models/components/security.md index c999036..0bac8c3 100644 --- a/docs/models/components/security.md +++ b/docs/models/components/security.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `access_token` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `access_token` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentserrors.md b/docs/models/errors/addplaylistcontentserrors.md index 5d43136..b111ac0 100644 --- a/docs/models/errors/addplaylistcontentserrors.md +++ b/docs/models/errors/addplaylistcontentserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentsplaylistserrors.md b/docs/models/errors/addplaylistcontentsplaylistserrors.md new file mode 100644 index 0000000..ecd7918 --- /dev/null +++ b/docs/models/errors/addplaylistcontentsplaylistserrors.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentsplaylistsresponsebody.md b/docs/models/errors/addplaylistcontentsplaylistsresponsebody.md new file mode 100644 index 0000000..cf11e9e --- /dev/null +++ b/docs/models/errors/addplaylistcontentsplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# AddPlaylistContentsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.AddPlaylistContentsPlaylistsErrors](../../models/errors/addplaylistcontentsplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentsresponsebody.md b/docs/models/errors/addplaylistcontentsresponsebody.md index fab2b49..d540a4d 100644 --- a/docs/models/errors/addplaylistcontentsresponsebody.md +++ b/docs/models/errors/addplaylistcontentsresponsebody.md @@ -1,6 +1,6 @@ # AddPlaylistContentsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `errors` | List[[errors.AddPlaylistContentsErrors](../../models/errors/addplaylistcontentserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/applyupdateserrors.md b/docs/models/errors/applyupdateserrors.md index d159d16..23b3ae5 100644 --- a/docs/models/errors/applyupdateserrors.md +++ b/docs/models/errors/applyupdateserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/applyupdatesresponsebody.md b/docs/models/errors/applyupdatesresponsebody.md index 22cd41c..c4c113c 100644 --- a/docs/models/errors/applyupdatesresponsebody.md +++ b/docs/models/errors/applyupdatesresponsebody.md @@ -1,11 +1,11 @@ # ApplyUpdatesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.ApplyUpdatesErrors](../../models/errors/applyupdateserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.ApplyUpdatesErrors](../../models/errors/applyupdateserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/applyupdatesupdatererrors.md b/docs/models/errors/applyupdatesupdatererrors.md new file mode 100644 index 0000000..1df9cf3 --- /dev/null +++ b/docs/models/errors/applyupdatesupdatererrors.md @@ -0,0 +1,10 @@ +# ApplyUpdatesUpdaterErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/applyupdatesupdaterresponsebody.md b/docs/models/errors/applyupdatesupdaterresponsebody.md new file mode 100644 index 0000000..7638901 --- /dev/null +++ b/docs/models/errors/applyupdatesupdaterresponsebody.md @@ -0,0 +1,11 @@ +# ApplyUpdatesUpdaterResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.ApplyUpdatesUpdaterErrors](../../models/errors/applyupdatesupdatererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitiesactivitieserrors.md b/docs/models/errors/cancelserveractivitiesactivitieserrors.md new file mode 100644 index 0000000..e9a463b --- /dev/null +++ b/docs/models/errors/cancelserveractivitiesactivitieserrors.md @@ -0,0 +1,10 @@ +# CancelServerActivitiesActivitiesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitiesactivitiesresponsebody.md b/docs/models/errors/cancelserveractivitiesactivitiesresponsebody.md new file mode 100644 index 0000000..d3aa462 --- /dev/null +++ b/docs/models/errors/cancelserveractivitiesactivitiesresponsebody.md @@ -0,0 +1,11 @@ +# CancelServerActivitiesActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.CancelServerActivitiesActivitiesErrors](../../models/errors/cancelserveractivitiesactivitieserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitieserrors.md b/docs/models/errors/cancelserveractivitieserrors.md index 4ac7bf8..ecd1d31 100644 --- a/docs/models/errors/cancelserveractivitieserrors.md +++ b/docs/models/errors/cancelserveractivitieserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitiesresponsebody.md b/docs/models/errors/cancelserveractivitiesresponsebody.md index bb3a643..713c5cd 100644 --- a/docs/models/errors/cancelserveractivitiesresponsebody.md +++ b/docs/models/errors/cancelserveractivitiesresponsebody.md @@ -1,6 +1,6 @@ # CancelServerActivitiesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `errors` | List[[errors.CancelServerActivitiesErrors](../../models/errors/cancelserveractivitieserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/checkforupdateserrors.md b/docs/models/errors/checkforupdateserrors.md index 3336879..83c79c5 100644 --- a/docs/models/errors/checkforupdateserrors.md +++ b/docs/models/errors/checkforupdateserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/checkforupdatesresponsebody.md b/docs/models/errors/checkforupdatesresponsebody.md index 5bf874e..f5efcfb 100644 --- a/docs/models/errors/checkforupdatesresponsebody.md +++ b/docs/models/errors/checkforupdatesresponsebody.md @@ -1,11 +1,11 @@ # CheckForUpdatesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.CheckForUpdatesErrors](../../models/errors/checkforupdateserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.CheckForUpdatesErrors](../../models/errors/checkforupdateserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/checkforupdatesupdatererrors.md b/docs/models/errors/checkforupdatesupdatererrors.md new file mode 100644 index 0000000..a5bc580 --- /dev/null +++ b/docs/models/errors/checkforupdatesupdatererrors.md @@ -0,0 +1,10 @@ +# CheckForUpdatesUpdaterErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/checkforupdatesupdaterresponsebody.md b/docs/models/errors/checkforupdatesupdaterresponsebody.md new file mode 100644 index 0000000..a3f7343 --- /dev/null +++ b/docs/models/errors/checkforupdatesupdaterresponsebody.md @@ -0,0 +1,11 @@ +# CheckForUpdatesUpdaterResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.CheckForUpdatesUpdaterErrors](../../models/errors/checkforupdatesupdatererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentserrors.md b/docs/models/errors/clearplaylistcontentserrors.md index e634dfb..5b4a42a 100644 --- a/docs/models/errors/clearplaylistcontentserrors.md +++ b/docs/models/errors/clearplaylistcontentserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentsplaylistserrors.md b/docs/models/errors/clearplaylistcontentsplaylistserrors.md new file mode 100644 index 0000000..42068d8 --- /dev/null +++ b/docs/models/errors/clearplaylistcontentsplaylistserrors.md @@ -0,0 +1,10 @@ +# ClearPlaylistContentsPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentsplaylistsresponsebody.md b/docs/models/errors/clearplaylistcontentsplaylistsresponsebody.md new file mode 100644 index 0000000..f48857a --- /dev/null +++ b/docs/models/errors/clearplaylistcontentsplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# ClearPlaylistContentsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.ClearPlaylistContentsPlaylistsErrors](../../models/errors/clearplaylistcontentsplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentsresponsebody.md b/docs/models/errors/clearplaylistcontentsresponsebody.md index b2d2942..4a512c6 100644 --- a/docs/models/errors/clearplaylistcontentsresponsebody.md +++ b/docs/models/errors/clearplaylistcontentsresponsebody.md @@ -1,6 +1,6 @@ # ClearPlaylistContentsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `errors` | List[[errors.ClearPlaylistContentsErrors](../../models/errors/clearplaylistcontentserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/createplaylisterrors.md b/docs/models/errors/createplaylisterrors.md index a890e9c..937c09f 100644 --- a/docs/models/errors/createplaylisterrors.md +++ b/docs/models/errors/createplaylisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/createplaylistplaylistserrors.md b/docs/models/errors/createplaylistplaylistserrors.md new file mode 100644 index 0000000..f32df74 --- /dev/null +++ b/docs/models/errors/createplaylistplaylistserrors.md @@ -0,0 +1,10 @@ +# CreatePlaylistPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/createplaylistplaylistsresponsebody.md b/docs/models/errors/createplaylistplaylistsresponsebody.md new file mode 100644 index 0000000..4cec9b9 --- /dev/null +++ b/docs/models/errors/createplaylistplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# CreatePlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.CreatePlaylistPlaylistsErrors](../../models/errors/createplaylistplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/createplaylistresponsebody.md b/docs/models/errors/createplaylistresponsebody.md index 509f7ad..b4ba409 100644 --- a/docs/models/errors/createplaylistresponsebody.md +++ b/docs/models/errors/createplaylistresponsebody.md @@ -1,11 +1,11 @@ # CreatePlaylistResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.CreatePlaylistErrors](../../models/errors/createplaylisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.CreatePlaylistErrors](../../models/errors/createplaylisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deletelibraryerrors.md b/docs/models/errors/deletelibraryerrors.md index bf133f8..5d1c0af 100644 --- a/docs/models/errors/deletelibraryerrors.md +++ b/docs/models/errors/deletelibraryerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/deletelibrarylibraryerrors.md b/docs/models/errors/deletelibrarylibraryerrors.md new file mode 100644 index 0000000..73b88e1 --- /dev/null +++ b/docs/models/errors/deletelibrarylibraryerrors.md @@ -0,0 +1,10 @@ +# DeleteLibraryLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/deletelibrarylibraryresponsebody.md b/docs/models/errors/deletelibrarylibraryresponsebody.md new file mode 100644 index 0000000..dc179e2 --- /dev/null +++ b/docs/models/errors/deletelibrarylibraryresponsebody.md @@ -0,0 +1,11 @@ +# DeleteLibraryLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.DeleteLibraryLibraryErrors](../../models/errors/deletelibrarylibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deletelibraryresponsebody.md b/docs/models/errors/deletelibraryresponsebody.md index b3f0515..80292b5 100644 --- a/docs/models/errors/deletelibraryresponsebody.md +++ b/docs/models/errors/deletelibraryresponsebody.md @@ -1,11 +1,11 @@ # DeleteLibraryResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.DeleteLibraryErrors](../../models/errors/deletelibraryerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.DeleteLibraryErrors](../../models/errors/deletelibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylisterrors.md b/docs/models/errors/deleteplaylisterrors.md index 9694402..b50379b 100644 --- a/docs/models/errors/deleteplaylisterrors.md +++ b/docs/models/errors/deleteplaylisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylistplaylistserrors.md b/docs/models/errors/deleteplaylistplaylistserrors.md new file mode 100644 index 0000000..750f4af --- /dev/null +++ b/docs/models/errors/deleteplaylistplaylistserrors.md @@ -0,0 +1,10 @@ +# DeletePlaylistPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylistplaylistsresponsebody.md b/docs/models/errors/deleteplaylistplaylistsresponsebody.md new file mode 100644 index 0000000..7b5df43 --- /dev/null +++ b/docs/models/errors/deleteplaylistplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# DeletePlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.DeletePlaylistPlaylistsErrors](../../models/errors/deleteplaylistplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylistresponsebody.md b/docs/models/errors/deleteplaylistresponsebody.md index 89279ca..64f5879 100644 --- a/docs/models/errors/deleteplaylistresponsebody.md +++ b/docs/models/errors/deleteplaylistresponsebody.md @@ -1,11 +1,11 @@ # DeletePlaylistResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.DeletePlaylistErrors](../../models/errors/deleteplaylisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.DeletePlaylistErrors](../../models/errors/deleteplaylisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/enablepapertrailerrors.md b/docs/models/errors/enablepapertrailerrors.md index fef2aec..c5d26da 100644 --- a/docs/models/errors/enablepapertrailerrors.md +++ b/docs/models/errors/enablepapertrailerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/enablepapertraillogerrors.md b/docs/models/errors/enablepapertraillogerrors.md new file mode 100644 index 0000000..34cbd7d --- /dev/null +++ b/docs/models/errors/enablepapertraillogerrors.md @@ -0,0 +1,10 @@ +# EnablePaperTrailLogErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/enablepapertraillogresponsebody.md b/docs/models/errors/enablepapertraillogresponsebody.md new file mode 100644 index 0000000..8f90b4e --- /dev/null +++ b/docs/models/errors/enablepapertraillogresponsebody.md @@ -0,0 +1,11 @@ +# EnablePaperTrailLogResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.EnablePaperTrailLogErrors](../../models/errors/enablepapertraillogerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/enablepapertrailresponsebody.md b/docs/models/errors/enablepapertrailresponsebody.md index d4dd291..2bfa187 100644 --- a/docs/models/errors/enablepapertrailresponsebody.md +++ b/docs/models/errors/enablepapertrailresponsebody.md @@ -1,11 +1,11 @@ # EnablePaperTrailResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.EnablePaperTrailErrors](../../models/errors/enablepapertrailerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.EnablePaperTrailErrors](../../models/errors/enablepapertrailerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/errors.md b/docs/models/errors/errors.md index 246d197..82ca5ec 100644 --- a/docs/models/errors/errors.md +++ b/docs/models/errors/errors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getalllibrarieserrors.md b/docs/models/errors/getalllibrarieserrors.md new file mode 100644 index 0000000..03065f7 --- /dev/null +++ b/docs/models/errors/getalllibrarieserrors.md @@ -0,0 +1,10 @@ +# GetAllLibrariesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getalllibrarieslibraryerrors.md b/docs/models/errors/getalllibrarieslibraryerrors.md new file mode 100644 index 0000000..7e76512 --- /dev/null +++ b/docs/models/errors/getalllibrarieslibraryerrors.md @@ -0,0 +1,10 @@ +# GetAllLibrariesLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getalllibrarieslibraryresponsebody.md b/docs/models/errors/getalllibrarieslibraryresponsebody.md new file mode 100644 index 0000000..a3fe936 --- /dev/null +++ b/docs/models/errors/getalllibrarieslibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetAllLibrariesLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetAllLibrariesLibraryErrors](../../models/errors/getalllibrarieslibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getalllibrariesresponsebody.md b/docs/models/errors/getalllibrariesresponsebody.md new file mode 100644 index 0000000..b0e9129 --- /dev/null +++ b/docs/models/errors/getalllibrariesresponsebody.md @@ -0,0 +1,11 @@ +# GetAllLibrariesResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetAllLibrariesErrors](../../models/errors/getalllibrarieserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientserrors.md b/docs/models/errors/getavailableclientserrors.md index 7b8965e..002780b 100644 --- a/docs/models/errors/getavailableclientserrors.md +++ b/docs/models/errors/getavailableclientserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientsresponsebody.md b/docs/models/errors/getavailableclientsresponsebody.md index 5567dd0..f23791b 100644 --- a/docs/models/errors/getavailableclientsresponsebody.md +++ b/docs/models/errors/getavailableclientsresponsebody.md @@ -1,6 +1,6 @@ # GetAvailableClientsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetAvailableClientsErrors](../../models/errors/getavailableclientserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientsservererrors.md b/docs/models/errors/getavailableclientsservererrors.md new file mode 100644 index 0000000..5cbcc80 --- /dev/null +++ b/docs/models/errors/getavailableclientsservererrors.md @@ -0,0 +1,10 @@ +# GetAvailableClientsServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientsserverresponsebody.md b/docs/models/errors/getavailableclientsserverresponsebody.md new file mode 100644 index 0000000..4af64ae --- /dev/null +++ b/docs/models/errors/getavailableclientsserverresponsebody.md @@ -0,0 +1,11 @@ +# GetAvailableClientsServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetAvailableClientsServerErrors](../../models/errors/getavailableclientsservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbandwidthstatisticserrors.md b/docs/models/errors/getbandwidthstatisticserrors.md index 28a98ca..2e149a2 100644 --- a/docs/models/errors/getbandwidthstatisticserrors.md +++ b/docs/models/errors/getbandwidthstatisticserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getbandwidthstatisticsresponsebody.md b/docs/models/errors/getbandwidthstatisticsresponsebody.md index da8da48..84fb3fc 100644 --- a/docs/models/errors/getbandwidthstatisticsresponsebody.md +++ b/docs/models/errors/getbandwidthstatisticsresponsebody.md @@ -1,6 +1,6 @@ # GetBandwidthStatisticsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetBandwidthStatisticsErrors](../../models/errors/getbandwidthstatisticserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbandwidthstatisticsstatisticserrors.md b/docs/models/errors/getbandwidthstatisticsstatisticserrors.md new file mode 100644 index 0000000..ba6218e --- /dev/null +++ b/docs/models/errors/getbandwidthstatisticsstatisticserrors.md @@ -0,0 +1,10 @@ +# GetBandwidthStatisticsStatisticsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getbandwidthstatisticsstatisticsresponsebody.md b/docs/models/errors/getbandwidthstatisticsstatisticsresponsebody.md new file mode 100644 index 0000000..d7cefe5 --- /dev/null +++ b/docs/models/errors/getbandwidthstatisticsstatisticsresponsebody.md @@ -0,0 +1,11 @@ +# GetBandwidthStatisticsStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetBandwidthStatisticsStatisticsErrors](../../models/errors/getbandwidthstatisticsstatisticserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbannerimageerrors.md b/docs/models/errors/getbannerimageerrors.md new file mode 100644 index 0000000..2aba21d --- /dev/null +++ b/docs/models/errors/getbannerimageerrors.md @@ -0,0 +1,10 @@ +# GetBannerImageErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getbannerimagemediaerrors.md b/docs/models/errors/getbannerimagemediaerrors.md new file mode 100644 index 0000000..6843399 --- /dev/null +++ b/docs/models/errors/getbannerimagemediaerrors.md @@ -0,0 +1,10 @@ +# GetBannerImageMediaErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getbannerimagemediaresponsebody.md b/docs/models/errors/getbannerimagemediaresponsebody.md new file mode 100644 index 0000000..8a85626 --- /dev/null +++ b/docs/models/errors/getbannerimagemediaresponsebody.md @@ -0,0 +1,11 @@ +# GetBannerImageMediaResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetBannerImageMediaErrors](../../models/errors/getbannerimagemediaerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbannerimageresponsebody.md b/docs/models/errors/getbannerimageresponsebody.md new file mode 100644 index 0000000..b2a9b32 --- /dev/null +++ b/docs/models/errors/getbannerimageresponsebody.md @@ -0,0 +1,11 @@ +# GetBannerImageResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetBannerImageErrors](../../models/errors/getbannerimageerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbutlertasksbutlererrors.md b/docs/models/errors/getbutlertasksbutlererrors.md new file mode 100644 index 0000000..7c7cff2 --- /dev/null +++ b/docs/models/errors/getbutlertasksbutlererrors.md @@ -0,0 +1,10 @@ +# GetButlerTasksButlerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getbutlertasksbutlerresponsebody.md b/docs/models/errors/getbutlertasksbutlerresponsebody.md new file mode 100644 index 0000000..52554c0 --- /dev/null +++ b/docs/models/errors/getbutlertasksbutlerresponsebody.md @@ -0,0 +1,11 @@ +# GetButlerTasksButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetButlerTasksButlerErrors](../../models/errors/getbutlertasksbutlererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbutlertaskserrors.md b/docs/models/errors/getbutlertaskserrors.md index 53066cd..1b63cc4 100644 --- a/docs/models/errors/getbutlertaskserrors.md +++ b/docs/models/errors/getbutlertaskserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getbutlertasksresponsebody.md b/docs/models/errors/getbutlertasksresponsebody.md index a449a7e..9d2785b 100644 --- a/docs/models/errors/getbutlertasksresponsebody.md +++ b/docs/models/errors/getbutlertasksresponsebody.md @@ -1,11 +1,11 @@ # GetButlerTasksResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetButlerTasksErrors](../../models/errors/getbutlertaskserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetButlerTasksErrors](../../models/errors/getbutlertaskserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getcompanionsdataerrors.md b/docs/models/errors/getcompanionsdataerrors.md new file mode 100644 index 0000000..1d2b2a4 --- /dev/null +++ b/docs/models/errors/getcompanionsdataerrors.md @@ -0,0 +1,10 @@ +# GetCompanionsDataErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getcompanionsdataplexerrors.md b/docs/models/errors/getcompanionsdataplexerrors.md new file mode 100644 index 0000000..5dd6cf7 --- /dev/null +++ b/docs/models/errors/getcompanionsdataplexerrors.md @@ -0,0 +1,10 @@ +# GetCompanionsDataPlexErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getcompanionsdataplexresponsebody.md b/docs/models/errors/getcompanionsdataplexresponsebody.md new file mode 100644 index 0000000..1aad7db --- /dev/null +++ b/docs/models/errors/getcompanionsdataplexresponsebody.md @@ -0,0 +1,11 @@ +# GetCompanionsDataPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetCompanionsDataPlexErrors](../../models/errors/getcompanionsdataplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getcompanionsdataresponsebody.md b/docs/models/errors/getcompanionsdataresponsebody.md new file mode 100644 index 0000000..ef22ba6 --- /dev/null +++ b/docs/models/errors/getcompanionsdataresponsebody.md @@ -0,0 +1,11 @@ +# GetCompanionsDataResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetCompanionsDataErrors](../../models/errors/getcompanionsdataerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getdeviceserrors.md b/docs/models/errors/getdeviceserrors.md index 08ef2a5..edd512b 100644 --- a/docs/models/errors/getdeviceserrors.md +++ b/docs/models/errors/getdeviceserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getdevicesresponsebody.md b/docs/models/errors/getdevicesresponsebody.md index fb3904b..2de5bbc 100644 --- a/docs/models/errors/getdevicesresponsebody.md +++ b/docs/models/errors/getdevicesresponsebody.md @@ -1,11 +1,11 @@ # GetDevicesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetDevicesErrors](../../models/errors/getdeviceserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | List[[errors.GetDevicesErrors](../../models/errors/getdeviceserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getdevicesservererrors.md b/docs/models/errors/getdevicesservererrors.md new file mode 100644 index 0000000..ab7177f --- /dev/null +++ b/docs/models/errors/getdevicesservererrors.md @@ -0,0 +1,10 @@ +# GetDevicesServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getdevicesserverresponsebody.md b/docs/models/errors/getdevicesserverresponsebody.md new file mode 100644 index 0000000..a59f959 --- /dev/null +++ b/docs/models/errors/getdevicesserverresponsebody.md @@ -0,0 +1,11 @@ +# GetDevicesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetDevicesServerErrors](../../models/errors/getdevicesservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getfilehasherrors.md b/docs/models/errors/getfilehasherrors.md index 05ea103..134f301 100644 --- a/docs/models/errors/getfilehasherrors.md +++ b/docs/models/errors/getfilehasherrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getfilehashlibraryerrors.md b/docs/models/errors/getfilehashlibraryerrors.md new file mode 100644 index 0000000..6181aa1 --- /dev/null +++ b/docs/models/errors/getfilehashlibraryerrors.md @@ -0,0 +1,10 @@ +# GetFileHashLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getfilehashlibraryresponsebody.md b/docs/models/errors/getfilehashlibraryresponsebody.md new file mode 100644 index 0000000..88e2137 --- /dev/null +++ b/docs/models/errors/getfilehashlibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetFileHashLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetFileHashLibraryErrors](../../models/errors/getfilehashlibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getfilehashresponsebody.md b/docs/models/errors/getfilehashresponsebody.md index cd8be10..a0e4ed5 100644 --- a/docs/models/errors/getfilehashresponsebody.md +++ b/docs/models/errors/getfilehashresponsebody.md @@ -1,11 +1,11 @@ # GetFileHashResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetFileHashErrors](../../models/errors/getfilehasherrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | List[[errors.GetFileHashErrors](../../models/errors/getfilehasherrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettokenerrors.md b/docs/models/errors/getgeodataerrors.md similarity index 85% rename from docs/models/errors/gettokenerrors.md rename to docs/models/errors/getgeodataerrors.md index ccf5742..b048eeb 100644 --- a/docs/models/errors/gettokenerrors.md +++ b/docs/models/errors/getgeodataerrors.md @@ -1,10 +1,10 @@ -# GetTokenErrors +# GetGeoDataErrors ## Fields | Field | Type | Required | Description | Example | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1000 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/refreshlibraryerrors.md b/docs/models/errors/getgeodataplexerrors.md similarity index 83% rename from docs/models/errors/refreshlibraryerrors.md rename to docs/models/errors/getgeodataplexerrors.md index 84784f1..3bdd44e 100644 --- a/docs/models/errors/refreshlibraryerrors.md +++ b/docs/models/errors/getgeodataplexerrors.md @@ -1,10 +1,10 @@ -# RefreshLibraryErrors +# GetGeoDataPlexErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getgeodataplexresponsebody.md b/docs/models/errors/getgeodataplexresponsebody.md new file mode 100644 index 0000000..2093def --- /dev/null +++ b/docs/models/errors/getgeodataplexresponsebody.md @@ -0,0 +1,11 @@ +# GetGeoDataPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetGeoDataPlexErrors](../../models/errors/getgeodataplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getgeodataresponsebody.md b/docs/models/errors/getgeodataresponsebody.md new file mode 100644 index 0000000..26c1c76 --- /dev/null +++ b/docs/models/errors/getgeodataresponsebody.md @@ -0,0 +1,11 @@ +# GetGeoDataResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | List[[errors.GetGeoDataErrors](../../models/errors/getgeodataerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getglobalhubserrors.md b/docs/models/errors/getglobalhubserrors.md index 8e4f916..a14202c 100644 --- a/docs/models/errors/getglobalhubserrors.md +++ b/docs/models/errors/getglobalhubserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getserveridentityerrors.md b/docs/models/errors/getglobalhubshubserrors.md similarity index 82% rename from docs/models/errors/getserveridentityerrors.md rename to docs/models/errors/getglobalhubshubserrors.md index 4393285..afec174 100644 --- a/docs/models/errors/getserveridentityerrors.md +++ b/docs/models/errors/getglobalhubshubserrors.md @@ -1,10 +1,10 @@ -# GetServerIdentityErrors +# GetGlobalHubsHubsErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getglobalhubshubsresponsebody.md b/docs/models/errors/getglobalhubshubsresponsebody.md new file mode 100644 index 0000000..ccbd6d4 --- /dev/null +++ b/docs/models/errors/getglobalhubshubsresponsebody.md @@ -0,0 +1,11 @@ +# GetGlobalHubsHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetGlobalHubsHubsErrors](../../models/errors/getglobalhubshubserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getglobalhubsresponsebody.md b/docs/models/errors/getglobalhubsresponsebody.md index 7490666..7586781 100644 --- a/docs/models/errors/getglobalhubsresponsebody.md +++ b/docs/models/errors/getglobalhubsresponsebody.md @@ -1,11 +1,11 @@ # GetGlobalHubsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetGlobalHubsErrors](../../models/errors/getglobalhubserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetGlobalHubsErrors](../../models/errors/getglobalhubserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gethomedataerrors.md b/docs/models/errors/gethomedataerrors.md index 4c9417b..d9284c6 100644 --- a/docs/models/errors/gethomedataerrors.md +++ b/docs/models/errors/gethomedataerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getlibrarieserrors.md b/docs/models/errors/gethomedataplexerrors.md similarity index 83% rename from docs/models/errors/getlibrarieserrors.md rename to docs/models/errors/gethomedataplexerrors.md index bac3a29..3bb1ba9 100644 --- a/docs/models/errors/getlibrarieserrors.md +++ b/docs/models/errors/gethomedataplexerrors.md @@ -1,10 +1,10 @@ -# GetLibrariesErrors +# GetHomeDataPlexErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gethomedataplexresponsebody.md b/docs/models/errors/gethomedataplexresponsebody.md new file mode 100644 index 0000000..ee1f855 --- /dev/null +++ b/docs/models/errors/gethomedataplexresponsebody.md @@ -0,0 +1,11 @@ +# GetHomeDataPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetHomeDataPlexErrors](../../models/errors/gethomedataplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gethomedataresponsebody.md b/docs/models/errors/gethomedataresponsebody.md index 2ab74ec..5fc9027 100644 --- a/docs/models/errors/gethomedataresponsebody.md +++ b/docs/models/errors/gethomedataresponsebody.md @@ -1,11 +1,11 @@ # GetHomeDataResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetHomeDataErrors](../../models/errors/gethomedataerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | List[[errors.GetHomeDataErrors](../../models/errors/gethomedataerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibrariesresponsebody.md b/docs/models/errors/getlibrariesresponsebody.md deleted file mode 100644 index 968a2e5..0000000 --- a/docs/models/errors/getlibrariesresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrariesResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetLibrariesErrors](../../models/errors/getlibrarieserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibrarydetailserrors.md b/docs/models/errors/getlibrarydetailserrors.md new file mode 100644 index 0000000..1565a31 --- /dev/null +++ b/docs/models/errors/getlibrarydetailserrors.md @@ -0,0 +1,10 @@ +# GetLibraryDetailsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getlibrarydetailslibraryerrors.md b/docs/models/errors/getlibrarydetailslibraryerrors.md new file mode 100644 index 0000000..ece323b --- /dev/null +++ b/docs/models/errors/getlibrarydetailslibraryerrors.md @@ -0,0 +1,10 @@ +# GetLibraryDetailsLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryresponsebody.md b/docs/models/errors/getlibrarydetailslibraryresponsebody.md similarity index 55% rename from docs/models/operations/getlibraryresponsebody.md rename to docs/models/errors/getlibrarydetailslibraryresponsebody.md index fc9afe4..7f9a664 100644 --- a/docs/models/operations/getlibraryresponsebody.md +++ b/docs/models/errors/getlibrarydetailslibraryresponsebody.md @@ -1,10 +1,11 @@ -# GetLibraryResponseBody +# GetLibraryDetailsLibraryResponseBody -The details of the library +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `media_container` | [Optional[operations.GetLibraryMediaContainer]](../../models/operations/getlibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `errors` | List[[errors.GetLibraryDetailsLibraryErrors](../../models/errors/getlibrarydetailslibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibrarydetailsresponsebody.md b/docs/models/errors/getlibrarydetailsresponsebody.md new file mode 100644 index 0000000..f2d1104 --- /dev/null +++ b/docs/models/errors/getlibrarydetailsresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryDetailsResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetLibraryDetailsErrors](../../models/errors/getlibrarydetailserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubserrors.md b/docs/models/errors/getlibraryhubserrors.md index c1c2cf4..ef9e9ec 100644 --- a/docs/models/errors/getlibraryhubserrors.md +++ b/docs/models/errors/getlibraryhubserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubshubserrors.md b/docs/models/errors/getlibraryhubshubserrors.md new file mode 100644 index 0000000..f41ee4f --- /dev/null +++ b/docs/models/errors/getlibraryhubshubserrors.md @@ -0,0 +1,10 @@ +# GetLibraryHubsHubsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubshubsresponsebody.md b/docs/models/errors/getlibraryhubshubsresponsebody.md new file mode 100644 index 0000000..453cb1a --- /dev/null +++ b/docs/models/errors/getlibraryhubshubsresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryHubsHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetLibraryHubsHubsErrors](../../models/errors/getlibraryhubshubserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubsresponsebody.md b/docs/models/errors/getlibraryhubsresponsebody.md index ceb2a25..4a80284 100644 --- a/docs/models/errors/getlibraryhubsresponsebody.md +++ b/docs/models/errors/getlibraryhubsresponsebody.md @@ -1,11 +1,11 @@ # GetLibraryHubsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetLibraryHubsErrors](../../models/errors/getlibraryhubserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetLibraryHubsErrors](../../models/errors/getlibraryhubserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemserrors.md b/docs/models/errors/getlibraryitemserrors.md index 8163dde..6d6e4dc 100644 --- a/docs/models/errors/getlibraryitemserrors.md +++ b/docs/models/errors/getlibraryitemserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemslibraryerrors.md b/docs/models/errors/getlibraryitemslibraryerrors.md new file mode 100644 index 0000000..41eee90 --- /dev/null +++ b/docs/models/errors/getlibraryitemslibraryerrors.md @@ -0,0 +1,10 @@ +# GetLibraryItemsLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemslibraryresponsebody.md b/docs/models/errors/getlibraryitemslibraryresponsebody.md new file mode 100644 index 0000000..9181bbf --- /dev/null +++ b/docs/models/errors/getlibraryitemslibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryItemsLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetLibraryItemsLibraryErrors](../../models/errors/getlibraryitemslibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemsresponsebody.md b/docs/models/errors/getlibraryitemsresponsebody.md index 87e2028..4c36a8c 100644 --- a/docs/models/errors/getlibraryitemsresponsebody.md +++ b/docs/models/errors/getlibraryitemsresponsebody.md @@ -1,11 +1,11 @@ # GetLibraryItemsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetLibraryItemsErrors](../../models/errors/getlibraryitemserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetLibraryItemsErrors](../../models/errors/getlibraryitemserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryresponsebody.md b/docs/models/errors/getlibraryresponsebody.md deleted file mode 100644 index f05d69a..0000000 --- a/docs/models/errors/getlibraryresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetLibraryErrors](../../models/errors/getlibraryerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmediaproviderserrors.md b/docs/models/errors/getmediaproviderserrors.md new file mode 100644 index 0000000..4929359 --- /dev/null +++ b/docs/models/errors/getmediaproviderserrors.md @@ -0,0 +1,10 @@ +# GetMediaProvidersErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getmediaprovidersresponsebody.md b/docs/models/errors/getmediaprovidersresponsebody.md new file mode 100644 index 0000000..a48f82a --- /dev/null +++ b/docs/models/errors/getmediaprovidersresponsebody.md @@ -0,0 +1,11 @@ +# GetMediaProvidersResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetMediaProvidersErrors](../../models/errors/getmediaproviderserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmediaprovidersservererrors.md b/docs/models/errors/getmediaprovidersservererrors.md new file mode 100644 index 0000000..608630f --- /dev/null +++ b/docs/models/errors/getmediaprovidersservererrors.md @@ -0,0 +1,10 @@ +# GetMediaProvidersServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmediaprovidersserverresponsebody.md b/docs/models/errors/getmediaprovidersserverresponsebody.md new file mode 100644 index 0000000..48257f5 --- /dev/null +++ b/docs/models/errors/getmediaprovidersserverresponsebody.md @@ -0,0 +1,11 @@ +# GetMediaProvidersServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetMediaProvidersServerErrors](../../models/errors/getmediaprovidersservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadatabyratingkeyerrors.md b/docs/models/errors/getmetadatabyratingkeyerrors.md new file mode 100644 index 0000000..170a50a --- /dev/null +++ b/docs/models/errors/getmetadatabyratingkeyerrors.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getmetadatabyratingkeylibraryerrors.md b/docs/models/errors/getmetadatabyratingkeylibraryerrors.md new file mode 100644 index 0000000..e34adb6 --- /dev/null +++ b/docs/models/errors/getmetadatabyratingkeylibraryerrors.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmetadatabyratingkeylibraryresponsebody.md b/docs/models/errors/getmetadatabyratingkeylibraryresponsebody.md new file mode 100644 index 0000000..22bc25f --- /dev/null +++ b/docs/models/errors/getmetadatabyratingkeylibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetMetaDataByRatingKeyLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetMetaDataByRatingKeyLibraryErrors](../../models/errors/getmetadatabyratingkeylibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadatabyratingkeyresponsebody.md b/docs/models/errors/getmetadatabyratingkeyresponsebody.md new file mode 100644 index 0000000..0224507 --- /dev/null +++ b/docs/models/errors/getmetadatabyratingkeyresponsebody.md @@ -0,0 +1,11 @@ +# GetMetaDataByRatingKeyResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetMetaDataByRatingKeyErrors](../../models/errors/getmetadatabyratingkeyerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadatachildrenerrors.md b/docs/models/errors/getmetadatachildrenerrors.md index 20c822b..76d2655 100644 --- a/docs/models/errors/getmetadatachildrenerrors.md +++ b/docs/models/errors/getmetadatachildrenerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getmetadatachildrenlibraryerrors.md b/docs/models/errors/getmetadatachildrenlibraryerrors.md new file mode 100644 index 0000000..637056f --- /dev/null +++ b/docs/models/errors/getmetadatachildrenlibraryerrors.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesresponsebody.md b/docs/models/errors/getmetadatachildrenlibraryresponsebody.md similarity index 56% rename from docs/models/operations/getlibrariesresponsebody.md rename to docs/models/errors/getmetadatachildrenlibraryresponsebody.md index 4691efc..5875260 100644 --- a/docs/models/operations/getlibrariesresponsebody.md +++ b/docs/models/errors/getmetadatachildrenlibraryresponsebody.md @@ -1,10 +1,11 @@ -# GetLibrariesResponseBody +# GetMetadataChildrenLibraryResponseBody -The libraries available on the Server +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `media_container` | [Optional[operations.GetLibrariesMediaContainer]](../../models/operations/getlibrariesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `errors` | List[[errors.GetMetadataChildrenLibraryErrors](../../models/errors/getmetadatachildrenlibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadatachildrenresponsebody.md b/docs/models/errors/getmetadatachildrenresponsebody.md index 4cb19f7..5ec06cf 100644 --- a/docs/models/errors/getmetadatachildrenresponsebody.md +++ b/docs/models/errors/getmetadatachildrenresponsebody.md @@ -1,6 +1,6 @@ # GetMetadataChildrenResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetMetadataChildrenErrors](../../models/errors/getmetadatachildrenerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadataresponsebody.md b/docs/models/errors/getmetadataresponsebody.md deleted file mode 100644 index 223c692..0000000 --- a/docs/models/errors/getmetadataresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMetadataResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetMetadataErrors](../../models/errors/getmetadataerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccounterrors.md b/docs/models/errors/getmyplexaccounterrors.md index 0a4c425..69f4283 100644 --- a/docs/models/errors/getmyplexaccounterrors.md +++ b/docs/models/errors/getmyplexaccounterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccountresponsebody.md b/docs/models/errors/getmyplexaccountresponsebody.md index 31f3236..fdf23d0 100644 --- a/docs/models/errors/getmyplexaccountresponsebody.md +++ b/docs/models/errors/getmyplexaccountresponsebody.md @@ -1,11 +1,11 @@ # GetMyPlexAccountResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetMyPlexAccountErrors](../../models/errors/getmyplexaccounterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetMyPlexAccountErrors](../../models/errors/getmyplexaccounterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccountservererrors.md b/docs/models/errors/getmyplexaccountservererrors.md new file mode 100644 index 0000000..b388759 --- /dev/null +++ b/docs/models/errors/getmyplexaccountservererrors.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccountserverresponsebody.md b/docs/models/errors/getmyplexaccountserverresponsebody.md new file mode 100644 index 0000000..79e10d5 --- /dev/null +++ b/docs/models/errors/getmyplexaccountserverresponsebody.md @@ -0,0 +1,11 @@ +# GetMyPlexAccountServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetMyPlexAccountServerErrors](../../models/errors/getmyplexaccountservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getondeckerrors.md b/docs/models/errors/getondeckerrors.md index fd4be45..34b3727 100644 --- a/docs/models/errors/getondeckerrors.md +++ b/docs/models/errors/getondeckerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getondecklibraryerrors.md b/docs/models/errors/getondecklibraryerrors.md new file mode 100644 index 0000000..8b64ad8 --- /dev/null +++ b/docs/models/errors/getondecklibraryerrors.md @@ -0,0 +1,10 @@ +# GetOnDeckLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getondecklibraryresponsebody.md b/docs/models/errors/getondecklibraryresponsebody.md new file mode 100644 index 0000000..068f922 --- /dev/null +++ b/docs/models/errors/getondecklibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetOnDeckLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetOnDeckLibraryErrors](../../models/errors/getondecklibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getondeckresponsebody.md b/docs/models/errors/getondeckresponsebody.md index 0ca43ee..736e10d 100644 --- a/docs/models/errors/getondeckresponsebody.md +++ b/docs/models/errors/getondeckresponsebody.md @@ -1,11 +1,11 @@ # GetOnDeckResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetOnDeckErrors](../../models/errors/getondeckerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | List[[errors.GetOnDeckErrors](../../models/errors/getondeckerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getpinerrors.md b/docs/models/errors/getpinerrors.md index e3f20e2..47ff281 100644 --- a/docs/models/errors/getpinerrors.md +++ b/docs/models/errors/getpinerrors.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1000 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getpinresponsebody.md b/docs/models/errors/getpinresponsebody.md index b9086c4..02d4735 100644 --- a/docs/models/errors/getpinresponsebody.md +++ b/docs/models/errors/getpinresponsebody.md @@ -1,11 +1,11 @@ # GetPinResponseBody -X-Plex-Client-Identifier is missing +Bad Request response when the X-Plex-Client-Identifier is missing ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetPinErrors](../../models/errors/getpinerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `errors` | List[[errors.GetPinErrors](../../models/errors/getpinerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentserrors.md b/docs/models/errors/getplaylistcontentserrors.md index 99d2c5a..2f9833d 100644 --- a/docs/models/errors/getplaylistcontentserrors.md +++ b/docs/models/errors/getplaylistcontentserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentsplaylistserrors.md b/docs/models/errors/getplaylistcontentsplaylistserrors.md new file mode 100644 index 0000000..874257b --- /dev/null +++ b/docs/models/errors/getplaylistcontentsplaylistserrors.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentsplaylistsresponsebody.md b/docs/models/errors/getplaylistcontentsplaylistsresponsebody.md new file mode 100644 index 0000000..e47e1af --- /dev/null +++ b/docs/models/errors/getplaylistcontentsplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistContentsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetPlaylistContentsPlaylistsErrors](../../models/errors/getplaylistcontentsplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentsresponsebody.md b/docs/models/errors/getplaylistcontentsresponsebody.md index ab639a0..4998635 100644 --- a/docs/models/errors/getplaylistcontentsresponsebody.md +++ b/docs/models/errors/getplaylistcontentsresponsebody.md @@ -1,6 +1,6 @@ # GetPlaylistContentsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetPlaylistContentsErrors](../../models/errors/getplaylistcontentserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylisterrors.md b/docs/models/errors/getplaylisterrors.md index 6f78dd2..3e9b6e4 100644 --- a/docs/models/errors/getplaylisterrors.md +++ b/docs/models/errors/getplaylisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistplaylistserrors.md b/docs/models/errors/getplaylistplaylistserrors.md new file mode 100644 index 0000000..a23444c --- /dev/null +++ b/docs/models/errors/getplaylistplaylistserrors.md @@ -0,0 +1,10 @@ +# GetPlaylistPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistplaylistsresponsebody.md b/docs/models/errors/getplaylistplaylistsresponsebody.md new file mode 100644 index 0000000..3c18bb5 --- /dev/null +++ b/docs/models/errors/getplaylistplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetPlaylistPlaylistsErrors](../../models/errors/getplaylistplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistresponsebody.md b/docs/models/errors/getplaylistresponsebody.md index 7e4817f..947546f 100644 --- a/docs/models/errors/getplaylistresponsebody.md +++ b/docs/models/errors/getplaylistresponsebody.md @@ -1,11 +1,11 @@ # GetPlaylistResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetPlaylistErrors](../../models/errors/getplaylisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | List[[errors.GetPlaylistErrors](../../models/errors/getplaylisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistserrors.md b/docs/models/errors/getplaylistserrors.md index ba36961..059e267 100644 --- a/docs/models/errors/getplaylistserrors.md +++ b/docs/models/errors/getplaylistserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistsplaylistserrors.md b/docs/models/errors/getplaylistsplaylistserrors.md new file mode 100644 index 0000000..20c30a1 --- /dev/null +++ b/docs/models/errors/getplaylistsplaylistserrors.md @@ -0,0 +1,10 @@ +# GetPlaylistsPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistsplaylistsresponsebody.md b/docs/models/errors/getplaylistsplaylistsresponsebody.md new file mode 100644 index 0000000..65449fe --- /dev/null +++ b/docs/models/errors/getplaylistsplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetPlaylistsPlaylistsErrors](../../models/errors/getplaylistsplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistsresponsebody.md b/docs/models/errors/getplaylistsresponsebody.md index f1020eb..70dbd68 100644 --- a/docs/models/errors/getplaylistsresponsebody.md +++ b/docs/models/errors/getplaylistsresponsebody.md @@ -1,11 +1,11 @@ # GetPlaylistsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetPlaylistsErrors](../../models/errors/getplaylistserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.GetPlaylistsErrors](../../models/errors/getplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddederrors.md b/docs/models/errors/getrecentlyaddederrors.md index 6e9638d..1fc2fe8 100644 --- a/docs/models/errors/getrecentlyaddederrors.md +++ b/docs/models/errors/getrecentlyaddederrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddedlibraryerrors.md b/docs/models/errors/getrecentlyaddedlibraryerrors.md new file mode 100644 index 0000000..6cbd55b --- /dev/null +++ b/docs/models/errors/getrecentlyaddedlibraryerrors.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddedlibraryresponsebody.md b/docs/models/errors/getrecentlyaddedlibraryresponsebody.md new file mode 100644 index 0000000..dd20417 --- /dev/null +++ b/docs/models/errors/getrecentlyaddedlibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetRecentlyAddedLibraryErrors](../../models/errors/getrecentlyaddedlibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddedresponsebody.md b/docs/models/errors/getrecentlyaddedresponsebody.md index 591a893..ba6fc37 100644 --- a/docs/models/errors/getrecentlyaddedresponsebody.md +++ b/docs/models/errors/getrecentlyaddedresponsebody.md @@ -1,11 +1,11 @@ # GetRecentlyAddedResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetRecentlyAddedErrors](../../models/errors/getrecentlyaddederrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetRecentlyAddedErrors](../../models/errors/getrecentlyaddederrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getrefreshlibrarymetadataerrors.md b/docs/models/errors/getrefreshlibrarymetadataerrors.md new file mode 100644 index 0000000..fe48081 --- /dev/null +++ b/docs/models/errors/getrefreshlibrarymetadataerrors.md @@ -0,0 +1,10 @@ +# GetRefreshLibraryMetadataErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getrefreshlibrarymetadatalibraryerrors.md b/docs/models/errors/getrefreshlibrarymetadatalibraryerrors.md new file mode 100644 index 0000000..c01dc84 --- /dev/null +++ b/docs/models/errors/getrefreshlibrarymetadatalibraryerrors.md @@ -0,0 +1,10 @@ +# GetRefreshLibraryMetadataLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md b/docs/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md new file mode 100644 index 0000000..677641c --- /dev/null +++ b/docs/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetRefreshLibraryMetadataLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetRefreshLibraryMetadataLibraryErrors](../../models/errors/getrefreshlibrarymetadatalibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmetadataresponsebody.md b/docs/models/errors/getrefreshlibrarymetadataresponsebody.md similarity index 56% rename from docs/models/operations/getmetadataresponsebody.md rename to docs/models/errors/getrefreshlibrarymetadataresponsebody.md index 1cf0367..2331ee1 100644 --- a/docs/models/operations/getmetadataresponsebody.md +++ b/docs/models/errors/getrefreshlibrarymetadataresponsebody.md @@ -1,10 +1,11 @@ -# GetMetadataResponseBody +# GetRefreshLibraryMetadataResponseBody -The metadata of the library item. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `media_container` | [Optional[operations.GetMetadataMediaContainer]](../../models/operations/getmetadatamediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `errors` | List[[errors.GetRefreshLibraryMetadataErrors](../../models/errors/getrefreshlibrarymetadataerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoerrors.md b/docs/models/errors/getresizedphotoerrors.md index 17df5be..d687471 100644 --- a/docs/models/errors/getresizedphotoerrors.md +++ b/docs/models/errors/getresizedphotoerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoresponsebody.md b/docs/models/errors/getresizedphotoresponsebody.md index e985b8e..2ed6506 100644 --- a/docs/models/errors/getresizedphotoresponsebody.md +++ b/docs/models/errors/getresizedphotoresponsebody.md @@ -1,11 +1,11 @@ # GetResizedPhotoResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetResizedPhotoErrors](../../models/errors/getresizedphotoerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetResizedPhotoErrors](../../models/errors/getresizedphotoerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoservererrors.md b/docs/models/errors/getresizedphotoservererrors.md new file mode 100644 index 0000000..76d02ab --- /dev/null +++ b/docs/models/errors/getresizedphotoservererrors.md @@ -0,0 +1,10 @@ +# GetResizedPhotoServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoserverresponsebody.md b/docs/models/errors/getresizedphotoserverresponsebody.md new file mode 100644 index 0000000..ebb8693 --- /dev/null +++ b/docs/models/errors/getresizedphotoserverresponsebody.md @@ -0,0 +1,11 @@ +# GetResizedPhotoServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetResizedPhotoServerErrors](../../models/errors/getresizedphotoservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getresourcesstatisticserrors.md b/docs/models/errors/getresourcesstatisticserrors.md index 6b8c32c..a53cb54 100644 --- a/docs/models/errors/getresourcesstatisticserrors.md +++ b/docs/models/errors/getresourcesstatisticserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getresourcesstatisticsresponsebody.md b/docs/models/errors/getresourcesstatisticsresponsebody.md index 6cb0d15..0b6025b 100644 --- a/docs/models/errors/getresourcesstatisticsresponsebody.md +++ b/docs/models/errors/getresourcesstatisticsresponsebody.md @@ -1,6 +1,6 @@ # GetResourcesStatisticsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetResourcesStatisticsErrors](../../models/errors/getresourcesstatisticserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getresourcesstatisticsstatisticserrors.md b/docs/models/errors/getresourcesstatisticsstatisticserrors.md new file mode 100644 index 0000000..f66ba7a --- /dev/null +++ b/docs/models/errors/getresourcesstatisticsstatisticserrors.md @@ -0,0 +1,10 @@ +# GetResourcesStatisticsStatisticsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getresourcesstatisticsstatisticsresponsebody.md b/docs/models/errors/getresourcesstatisticsstatisticsresponsebody.md new file mode 100644 index 0000000..95ae21f --- /dev/null +++ b/docs/models/errors/getresourcesstatisticsstatisticsresponsebody.md @@ -0,0 +1,11 @@ +# GetResourcesStatisticsStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetResourcesStatisticsStatisticsErrors](../../models/errors/getresourcesstatisticsstatisticserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsearchlibraryerrors.md b/docs/models/errors/getsearchlibraryerrors.md new file mode 100644 index 0000000..23e3e7a --- /dev/null +++ b/docs/models/errors/getsearchlibraryerrors.md @@ -0,0 +1,10 @@ +# GetSearchLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getsearchlibrarylibraryerrors.md b/docs/models/errors/getsearchlibrarylibraryerrors.md new file mode 100644 index 0000000..54e41b0 --- /dev/null +++ b/docs/models/errors/getsearchlibrarylibraryerrors.md @@ -0,0 +1,10 @@ +# GetSearchLibraryLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsearchlibrarylibraryresponsebody.md b/docs/models/errors/getsearchlibrarylibraryresponsebody.md new file mode 100644 index 0000000..17f5e14 --- /dev/null +++ b/docs/models/errors/getsearchlibrarylibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetSearchLibraryLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetSearchLibraryLibraryErrors](../../models/errors/getsearchlibrarylibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsearchlibraryresponsebody.md b/docs/models/errors/getsearchlibraryresponsebody.md new file mode 100644 index 0000000..73af4fb --- /dev/null +++ b/docs/models/errors/getsearchlibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetSearchLibraryResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetSearchLibraryErrors](../../models/errors/getsearchlibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultserrors.md b/docs/models/errors/getsearchresultserrors.md index ca8d75e..4a5b0a7 100644 --- a/docs/models/errors/getsearchresultserrors.md +++ b/docs/models/errors/getsearchresultserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultsresponsebody.md b/docs/models/errors/getsearchresultsresponsebody.md index e0e31d6..4191f3b 100644 --- a/docs/models/errors/getsearchresultsresponsebody.md +++ b/docs/models/errors/getsearchresultsresponsebody.md @@ -1,11 +1,11 @@ # GetSearchResultsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetSearchResultsErrors](../../models/errors/getsearchresultserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetSearchResultsErrors](../../models/errors/getsearchresultserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultssearcherrors.md b/docs/models/errors/getsearchresultssearcherrors.md new file mode 100644 index 0000000..673fe7e --- /dev/null +++ b/docs/models/errors/getsearchresultssearcherrors.md @@ -0,0 +1,10 @@ +# GetSearchResultsSearchErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultssearchresponsebody.md b/docs/models/errors/getsearchresultssearchresponsebody.md new file mode 100644 index 0000000..4995e80 --- /dev/null +++ b/docs/models/errors/getsearchresultssearchresponsebody.md @@ -0,0 +1,11 @@ +# GetSearchResultsSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetSearchResultsSearchErrors](../../models/errors/getsearchresultssearcherrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitiesactivitieserrors.md b/docs/models/errors/getserveractivitiesactivitieserrors.md new file mode 100644 index 0000000..7332daf --- /dev/null +++ b/docs/models/errors/getserveractivitiesactivitieserrors.md @@ -0,0 +1,10 @@ +# GetServerActivitiesActivitiesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitiesactivitiesresponsebody.md b/docs/models/errors/getserveractivitiesactivitiesresponsebody.md new file mode 100644 index 0000000..b41a978 --- /dev/null +++ b/docs/models/errors/getserveractivitiesactivitiesresponsebody.md @@ -0,0 +1,11 @@ +# GetServerActivitiesActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetServerActivitiesActivitiesErrors](../../models/errors/getserveractivitiesactivitieserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitieserrors.md b/docs/models/errors/getserveractivitieserrors.md index 032f174..37d7ebf 100644 --- a/docs/models/errors/getserveractivitieserrors.md +++ b/docs/models/errors/getserveractivitieserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitiesresponsebody.md b/docs/models/errors/getserveractivitiesresponsebody.md index 5c6de9b..0d65dd3 100644 --- a/docs/models/errors/getserveractivitiesresponsebody.md +++ b/docs/models/errors/getserveractivitiesresponsebody.md @@ -1,6 +1,6 @@ # GetServerActivitiesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `errors` | List[[errors.GetServerActivitiesErrors](../../models/errors/getserveractivitieserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getservercapabilitieserrors.md b/docs/models/errors/getservercapabilitieserrors.md new file mode 100644 index 0000000..c23faff --- /dev/null +++ b/docs/models/errors/getservercapabilitieserrors.md @@ -0,0 +1,10 @@ +# GetServerCapabilitiesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getservercapabilitiesresponsebody.md b/docs/models/errors/getservercapabilitiesresponsebody.md index b5bdf06..82746a7 100644 --- a/docs/models/errors/getservercapabilitiesresponsebody.md +++ b/docs/models/errors/getservercapabilitiesresponsebody.md @@ -1,11 +1,11 @@ # GetServerCapabilitiesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.Errors](../../models/errors/errors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `errors` | List[[errors.Errors](../../models/errors/errors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getservercapabilitiesserverresponsebody.md b/docs/models/errors/getservercapabilitiesserverresponsebody.md new file mode 100644 index 0000000..366d7dd --- /dev/null +++ b/docs/models/errors/getservercapabilitiesserverresponsebody.md @@ -0,0 +1,11 @@ +# GetServerCapabilitiesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetServerCapabilitiesErrors](../../models/errors/getservercapabilitieserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserveridentityresponsebody.md b/docs/models/errors/getserveridentityresponsebody.md index f22dbdb..2cedd8d 100644 --- a/docs/models/errors/getserveridentityresponsebody.md +++ b/docs/models/errors/getserveridentityresponsebody.md @@ -1,11 +1,12 @@ # GetServerIdentityResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Request Timeout ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetServerIdentityErrors](../../models/errors/getserveridentityerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 408 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | The server timed out waiting for the request. | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/getserverlisterrors.md b/docs/models/errors/getserverlisterrors.md index c56ab60..d9ef895 100644 --- a/docs/models/errors/getserverlisterrors.md +++ b/docs/models/errors/getserverlisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getserverlistresponsebody.md b/docs/models/errors/getserverlistresponsebody.md index ed16a0c..9806ccf 100644 --- a/docs/models/errors/getserverlistresponsebody.md +++ b/docs/models/errors/getserverlistresponsebody.md @@ -1,11 +1,11 @@ # GetServerListResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetServerListErrors](../../models/errors/getserverlisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetServerListErrors](../../models/errors/getserverlisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverlistservererrors.md b/docs/models/errors/getserverlistservererrors.md new file mode 100644 index 0000000..609baaa --- /dev/null +++ b/docs/models/errors/getserverlistservererrors.md @@ -0,0 +1,10 @@ +# GetServerListServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserverlistserverresponsebody.md b/docs/models/errors/getserverlistserverresponsebody.md new file mode 100644 index 0000000..461fae7 --- /dev/null +++ b/docs/models/errors/getserverlistserverresponsebody.md @@ -0,0 +1,11 @@ +# GetServerListServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetServerListServerErrors](../../models/errors/getserverlistservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferenceserrors.md b/docs/models/errors/getserverpreferenceserrors.md index f96fbfe..977b25d 100644 --- a/docs/models/errors/getserverpreferenceserrors.md +++ b/docs/models/errors/getserverpreferenceserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferencesresponsebody.md b/docs/models/errors/getserverpreferencesresponsebody.md index c6333d1..00d3c85 100644 --- a/docs/models/errors/getserverpreferencesresponsebody.md +++ b/docs/models/errors/getserverpreferencesresponsebody.md @@ -1,6 +1,6 @@ # GetServerPreferencesResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `errors` | List[[errors.GetServerPreferencesErrors](../../models/errors/getserverpreferenceserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferencesservererrors.md b/docs/models/errors/getserverpreferencesservererrors.md new file mode 100644 index 0000000..2ae0d6a --- /dev/null +++ b/docs/models/errors/getserverpreferencesservererrors.md @@ -0,0 +1,10 @@ +# GetServerPreferencesServerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferencesserverresponsebody.md b/docs/models/errors/getserverpreferencesserverresponsebody.md new file mode 100644 index 0000000..64fc2d9 --- /dev/null +++ b/docs/models/errors/getserverpreferencesserverresponsebody.md @@ -0,0 +1,11 @@ +# GetServerPreferencesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetServerPreferencesServerErrors](../../models/errors/getserverpreferencesservererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverresourceserrors.md b/docs/models/errors/getserverresourceserrors.md new file mode 100644 index 0000000..7d03c64 --- /dev/null +++ b/docs/models/errors/getserverresourceserrors.md @@ -0,0 +1,10 @@ +# GetServerResourcesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getserverresourcesplexerrors.md b/docs/models/errors/getserverresourcesplexerrors.md new file mode 100644 index 0000000..7e217c6 --- /dev/null +++ b/docs/models/errors/getserverresourcesplexerrors.md @@ -0,0 +1,10 @@ +# GetServerResourcesPlexErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserverresourcesplexresponsebody.md b/docs/models/errors/getserverresourcesplexresponsebody.md new file mode 100644 index 0000000..07c571e --- /dev/null +++ b/docs/models/errors/getserverresourcesplexresponsebody.md @@ -0,0 +1,11 @@ +# GetServerResourcesPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetServerResourcesPlexErrors](../../models/errors/getserverresourcesplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverresourcesresponsebody.md b/docs/models/errors/getserverresourcesresponsebody.md new file mode 100644 index 0000000..f31d474 --- /dev/null +++ b/docs/models/errors/getserverresourcesresponsebody.md @@ -0,0 +1,11 @@ +# GetServerResourcesResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetServerResourcesErrors](../../models/errors/getserverresourceserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistoryerrors.md b/docs/models/errors/getsessionhistoryerrors.md index 069ee46..9ab97a8 100644 --- a/docs/models/errors/getsessionhistoryerrors.md +++ b/docs/models/errors/getsessionhistoryerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistoryresponsebody.md b/docs/models/errors/getsessionhistoryresponsebody.md index fb3f5f8..b94cf3e 100644 --- a/docs/models/errors/getsessionhistoryresponsebody.md +++ b/docs/models/errors/getsessionhistoryresponsebody.md @@ -1,6 +1,6 @@ # GetSessionHistoryResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `errors` | List[[errors.GetSessionHistoryErrors](../../models/errors/getsessionhistoryerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistorysessionserrors.md b/docs/models/errors/getsessionhistorysessionserrors.md new file mode 100644 index 0000000..129332a --- /dev/null +++ b/docs/models/errors/getsessionhistorysessionserrors.md @@ -0,0 +1,10 @@ +# GetSessionHistorySessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistorysessionsresponsebody.md b/docs/models/errors/getsessionhistorysessionsresponsebody.md new file mode 100644 index 0000000..88d68a8 --- /dev/null +++ b/docs/models/errors/getsessionhistorysessionsresponsebody.md @@ -0,0 +1,11 @@ +# GetSessionHistorySessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetSessionHistorySessionsErrors](../../models/errors/getsessionhistorysessionserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionserrors.md b/docs/models/errors/getsessionserrors.md index 840f90a..8082fa8 100644 --- a/docs/models/errors/getsessionserrors.md +++ b/docs/models/errors/getsessionserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getsessionsresponsebody.md b/docs/models/errors/getsessionsresponsebody.md index 713b13c..e2933f3 100644 --- a/docs/models/errors/getsessionsresponsebody.md +++ b/docs/models/errors/getsessionsresponsebody.md @@ -1,11 +1,11 @@ # GetSessionsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetSessionsErrors](../../models/errors/getsessionserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | List[[errors.GetSessionsErrors](../../models/errors/getsessionserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionssessionserrors.md b/docs/models/errors/getsessionssessionserrors.md new file mode 100644 index 0000000..bba6b33 --- /dev/null +++ b/docs/models/errors/getsessionssessionserrors.md @@ -0,0 +1,10 @@ +# GetSessionsSessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsessionssessionsresponsebody.md b/docs/models/errors/getsessionssessionsresponsebody.md new file mode 100644 index 0000000..8737e7d --- /dev/null +++ b/docs/models/errors/getsessionssessionsresponsebody.md @@ -0,0 +1,11 @@ +# GetSessionsSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetSessionsSessionsErrors](../../models/errors/getsessionssessionserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationauthenticationerrors.md b/docs/models/errors/getsourceconnectioninformationauthenticationerrors.md new file mode 100644 index 0000000..f9f30f7 --- /dev/null +++ b/docs/models/errors/getsourceconnectioninformationauthenticationerrors.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationAuthenticationErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationauthenticationresponsebody.md b/docs/models/errors/getsourceconnectioninformationauthenticationresponsebody.md new file mode 100644 index 0000000..5e51b1e --- /dev/null +++ b/docs/models/errors/getsourceconnectioninformationauthenticationresponsebody.md @@ -0,0 +1,11 @@ +# GetSourceConnectionInformationAuthenticationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetSourceConnectionInformationAuthenticationErrors](../../models/errors/getsourceconnectioninformationauthenticationerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationerrors.md b/docs/models/errors/getsourceconnectioninformationerrors.md index 17915b9..3868591 100644 --- a/docs/models/errors/getsourceconnectioninformationerrors.md +++ b/docs/models/errors/getsourceconnectioninformationerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationresponsebody.md b/docs/models/errors/getsourceconnectioninformationresponsebody.md index 0f783cb..6b16305 100644 --- a/docs/models/errors/getsourceconnectioninformationresponsebody.md +++ b/docs/models/errors/getsourceconnectioninformationresponsebody.md @@ -1,6 +1,6 @@ # GetSourceConnectionInformationResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `errors` | List[[errors.GetSourceConnectionInformationErrors](../../models/errors/getsourceconnectioninformationerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getstatisticserrors.md b/docs/models/errors/getstatisticserrors.md index 9df6526..81d8d64 100644 --- a/docs/models/errors/getstatisticserrors.md +++ b/docs/models/errors/getstatisticserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getstatisticsresponsebody.md b/docs/models/errors/getstatisticsresponsebody.md index 205dd96..eb38b37 100644 --- a/docs/models/errors/getstatisticsresponsebody.md +++ b/docs/models/errors/getstatisticsresponsebody.md @@ -1,11 +1,11 @@ # GetStatisticsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetStatisticsErrors](../../models/errors/getstatisticserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetStatisticsErrors](../../models/errors/getstatisticserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getstatisticsstatisticserrors.md b/docs/models/errors/getstatisticsstatisticserrors.md new file mode 100644 index 0000000..0d2572f --- /dev/null +++ b/docs/models/errors/getstatisticsstatisticserrors.md @@ -0,0 +1,10 @@ +# GetStatisticsStatisticsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getstatisticsstatisticsresponsebody.md b/docs/models/errors/getstatisticsstatisticsresponsebody.md new file mode 100644 index 0000000..a75a046 --- /dev/null +++ b/docs/models/errors/getstatisticsstatisticsresponsebody.md @@ -0,0 +1,11 @@ +# GetStatisticsStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetStatisticsStatisticsErrors](../../models/errors/getstatisticsstatisticserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getthumbimageerrors.md b/docs/models/errors/getthumbimageerrors.md new file mode 100644 index 0000000..2bc09cf --- /dev/null +++ b/docs/models/errors/getthumbimageerrors.md @@ -0,0 +1,10 @@ +# GetThumbImageErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getthumbimagemediaerrors.md b/docs/models/errors/getthumbimagemediaerrors.md new file mode 100644 index 0000000..38aff52 --- /dev/null +++ b/docs/models/errors/getthumbimagemediaerrors.md @@ -0,0 +1,10 @@ +# GetThumbImageMediaErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getthumbimagemediaresponsebody.md b/docs/models/errors/getthumbimagemediaresponsebody.md new file mode 100644 index 0000000..10f0b93 --- /dev/null +++ b/docs/models/errors/getthumbimagemediaresponsebody.md @@ -0,0 +1,11 @@ +# GetThumbImageMediaResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetThumbImageMediaErrors](../../models/errors/getthumbimagemediaerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getthumbimageresponsebody.md b/docs/models/errors/getthumbimageresponsebody.md new file mode 100644 index 0000000..83e4425 --- /dev/null +++ b/docs/models/errors/getthumbimageresponsebody.md @@ -0,0 +1,11 @@ +# GetThumbImageResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetThumbImageErrors](../../models/errors/getthumbimageerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettimelineerrors.md b/docs/models/errors/gettimelineerrors.md index 3a0485a..6c65e51 100644 --- a/docs/models/errors/gettimelineerrors.md +++ b/docs/models/errors/gettimelineerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/gettimelineresponsebody.md b/docs/models/errors/gettimelineresponsebody.md index c6083f6..55ed769 100644 --- a/docs/models/errors/gettimelineresponsebody.md +++ b/docs/models/errors/gettimelineresponsebody.md @@ -1,11 +1,11 @@ # GetTimelineResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetTimelineErrors](../../models/errors/gettimelineerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | List[[errors.GetTimelineErrors](../../models/errors/gettimelineerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettimelinevideoerrors.md b/docs/models/errors/gettimelinevideoerrors.md new file mode 100644 index 0000000..a110e8c --- /dev/null +++ b/docs/models/errors/gettimelinevideoerrors.md @@ -0,0 +1,10 @@ +# GetTimelineVideoErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettimelinevideoresponsebody.md b/docs/models/errors/gettimelinevideoresponsebody.md new file mode 100644 index 0000000..b9a277c --- /dev/null +++ b/docs/models/errors/gettimelinevideoresponsebody.md @@ -0,0 +1,11 @@ +# GetTimelineVideoResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetTimelineVideoErrors](../../models/errors/gettimelinevideoerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettokenbypiniderrors.md b/docs/models/errors/gettokenbypiniderrors.md new file mode 100644 index 0000000..bcbd7f7 --- /dev/null +++ b/docs/models/errors/gettokenbypiniderrors.md @@ -0,0 +1,10 @@ +# GetTokenByPinIDErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/gettokenbypinidplexerrors.md b/docs/models/errors/gettokenbypinidplexerrors.md new file mode 100644 index 0000000..ad7c85b --- /dev/null +++ b/docs/models/errors/gettokenbypinidplexerrors.md @@ -0,0 +1,9 @@ +# GetTokenByPinIDPlexErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1020 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | Code not found or expired | \ No newline at end of file diff --git a/docs/models/errors/gettokenbypinidplexresponsebody.md b/docs/models/errors/gettokenbypinidplexresponsebody.md new file mode 100644 index 0000000..855b0d9 --- /dev/null +++ b/docs/models/errors/gettokenbypinidplexresponsebody.md @@ -0,0 +1,11 @@ +# GetTokenByPinIDPlexResponseBody + +Not Found or Expired + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetTokenByPinIDPlexErrors](../../models/errors/gettokenbypinidplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettokenbypinidresponsebody.md b/docs/models/errors/gettokenbypinidresponsebody.md new file mode 100644 index 0000000..cf4d71d --- /dev/null +++ b/docs/models/errors/gettokenbypinidresponsebody.md @@ -0,0 +1,11 @@ +# GetTokenByPinIDResponseBody + +Bad Request response when the X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetTokenByPinIDErrors](../../models/errors/gettokenbypiniderrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettokenresponsebody.md b/docs/models/errors/gettokenresponsebody.md deleted file mode 100644 index 44d6389..0000000 --- a/docs/models/errors/gettokenresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenResponseBody - -X-Plex-Client-Identifier is missing - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetTokenErrors](../../models/errors/gettokenerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettopwatchedcontenterrors.md b/docs/models/errors/gettopwatchedcontenterrors.md new file mode 100644 index 0000000..77a7cf3 --- /dev/null +++ b/docs/models/errors/gettopwatchedcontenterrors.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/gettopwatchedcontentlibraryerrors.md b/docs/models/errors/gettopwatchedcontentlibraryerrors.md new file mode 100644 index 0000000..557377f --- /dev/null +++ b/docs/models/errors/gettopwatchedcontentlibraryerrors.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/operations/searchlibraryresponsebody.md b/docs/models/errors/gettopwatchedcontentlibraryresponsebody.md similarity index 56% rename from docs/models/operations/searchlibraryresponsebody.md rename to docs/models/errors/gettopwatchedcontentlibraryresponsebody.md index 08f02bb..00ca933 100644 --- a/docs/models/operations/searchlibraryresponsebody.md +++ b/docs/models/errors/gettopwatchedcontentlibraryresponsebody.md @@ -1,10 +1,11 @@ -# SearchLibraryResponseBody +# GetTopWatchedContentLibraryResponseBody -The contents of the library by section and type +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `media_container` | [Optional[operations.SearchLibraryMediaContainer]](../../models/operations/searchlibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `errors` | List[[errors.GetTopWatchedContentLibraryErrors](../../models/errors/gettopwatchedcontentlibraryerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettopwatchedcontentresponsebody.md b/docs/models/errors/gettopwatchedcontentresponsebody.md new file mode 100644 index 0000000..1170942 --- /dev/null +++ b/docs/models/errors/gettopwatchedcontentresponsebody.md @@ -0,0 +1,11 @@ +# GetTopWatchedContentResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetTopWatchedContentErrors](../../models/errors/gettopwatchedcontenterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionserrors.md b/docs/models/errors/gettranscodesessionserrors.md index 5ada16e..4012213 100644 --- a/docs/models/errors/gettranscodesessionserrors.md +++ b/docs/models/errors/gettranscodesessionserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionsresponsebody.md b/docs/models/errors/gettranscodesessionsresponsebody.md index 4462d2f..36cab16 100644 --- a/docs/models/errors/gettranscodesessionsresponsebody.md +++ b/docs/models/errors/gettranscodesessionsresponsebody.md @@ -1,6 +1,6 @@ # GetTranscodeSessionsResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `errors` | List[[errors.GetTranscodeSessionsErrors](../../models/errors/gettranscodesessionserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionssessionserrors.md b/docs/models/errors/gettranscodesessionssessionserrors.md new file mode 100644 index 0000000..46fed53 --- /dev/null +++ b/docs/models/errors/gettranscodesessionssessionserrors.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsSessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionssessionsresponsebody.md b/docs/models/errors/gettranscodesessionssessionsresponsebody.md new file mode 100644 index 0000000..b8fc012 --- /dev/null +++ b/docs/models/errors/gettranscodesessionssessionsresponsebody.md @@ -0,0 +1,11 @@ +# GetTranscodeSessionsSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetTranscodeSessionsSessionsErrors](../../models/errors/gettranscodesessionssessionserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenauthenticationerrors.md b/docs/models/errors/gettransienttokenauthenticationerrors.md new file mode 100644 index 0000000..a67f2dd --- /dev/null +++ b/docs/models/errors/gettransienttokenauthenticationerrors.md @@ -0,0 +1,10 @@ +# GetTransientTokenAuthenticationErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenauthenticationresponsebody.md b/docs/models/errors/gettransienttokenauthenticationresponsebody.md new file mode 100644 index 0000000..ea17500 --- /dev/null +++ b/docs/models/errors/gettransienttokenauthenticationresponsebody.md @@ -0,0 +1,11 @@ +# GetTransientTokenAuthenticationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetTransientTokenAuthenticationErrors](../../models/errors/gettransienttokenauthenticationerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenerrors.md b/docs/models/errors/gettransienttokenerrors.md index f34617b..fd6f3c9 100644 --- a/docs/models/errors/gettransienttokenerrors.md +++ b/docs/models/errors/gettransienttokenerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenresponsebody.md b/docs/models/errors/gettransienttokenresponsebody.md index 23aea89..8012e6e 100644 --- a/docs/models/errors/gettransienttokenresponsebody.md +++ b/docs/models/errors/gettransienttokenresponsebody.md @@ -1,6 +1,6 @@ # GetTransientTokenResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `errors` | List[[errors.GetTransientTokenErrors](../../models/errors/gettransienttokenerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatuserrors.md b/docs/models/errors/getupdatestatuserrors.md index cd5417f..b2915ae 100644 --- a/docs/models/errors/getupdatestatuserrors.md +++ b/docs/models/errors/getupdatestatuserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatusresponsebody.md b/docs/models/errors/getupdatestatusresponsebody.md index 6b20b00..17e982d 100644 --- a/docs/models/errors/getupdatestatusresponsebody.md +++ b/docs/models/errors/getupdatestatusresponsebody.md @@ -1,11 +1,11 @@ # GetUpdateStatusResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetUpdateStatusErrors](../../models/errors/getupdatestatuserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetUpdateStatusErrors](../../models/errors/getupdatestatuserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatusupdatererrors.md b/docs/models/errors/getupdatestatusupdatererrors.md new file mode 100644 index 0000000..7413d63 --- /dev/null +++ b/docs/models/errors/getupdatestatusupdatererrors.md @@ -0,0 +1,10 @@ +# GetUpdateStatusUpdaterErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatusupdaterresponsebody.md b/docs/models/errors/getupdatestatusupdaterresponsebody.md new file mode 100644 index 0000000..d2c490a --- /dev/null +++ b/docs/models/errors/getupdatestatusupdaterresponsebody.md @@ -0,0 +1,11 @@ +# GetUpdateStatusUpdaterResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetUpdateStatusUpdaterErrors](../../models/errors/getupdatestatusupdatererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getuserdetailsauthenticationerrors.md b/docs/models/errors/getuserdetailsauthenticationerrors.md new file mode 100644 index 0000000..52f7da8 --- /dev/null +++ b/docs/models/errors/getuserdetailsauthenticationerrors.md @@ -0,0 +1,10 @@ +# GetUserDetailsAuthenticationErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getuserdetailsauthenticationresponsebody.md b/docs/models/errors/getuserdetailsauthenticationresponsebody.md new file mode 100644 index 0000000..75f0c7e --- /dev/null +++ b/docs/models/errors/getuserdetailsauthenticationresponsebody.md @@ -0,0 +1,11 @@ +# GetUserDetailsAuthenticationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.GetUserDetailsAuthenticationErrors](../../models/errors/getuserdetailsauthenticationerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getuserdetailserrors.md b/docs/models/errors/getuserdetailserrors.md new file mode 100644 index 0000000..c229c9d --- /dev/null +++ b/docs/models/errors/getuserdetailserrors.md @@ -0,0 +1,10 @@ +# GetUserDetailsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getuserdetailsresponsebody.md b/docs/models/errors/getuserdetailsresponsebody.md new file mode 100644 index 0000000..e85f615 --- /dev/null +++ b/docs/models/errors/getuserdetailsresponsebody.md @@ -0,0 +1,11 @@ +# GetUserDetailsResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetUserDetailsErrors](../../models/errors/getuserdetailserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getuserfriendserrors.md b/docs/models/errors/getuserfriendserrors.md new file mode 100644 index 0000000..c08b13d --- /dev/null +++ b/docs/models/errors/getuserfriendserrors.md @@ -0,0 +1,10 @@ +# GetUserFriendsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getuserfriendsplexerrors.md b/docs/models/errors/getuserfriendsplexerrors.md new file mode 100644 index 0000000..17d89af --- /dev/null +++ b/docs/models/errors/getuserfriendsplexerrors.md @@ -0,0 +1,10 @@ +# GetUserFriendsPlexErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getuserfriendsplexresponsebody.md b/docs/models/errors/getuserfriendsplexresponsebody.md new file mode 100644 index 0000000..eb3e4e3 --- /dev/null +++ b/docs/models/errors/getuserfriendsplexresponsebody.md @@ -0,0 +1,11 @@ +# GetUserFriendsPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetUserFriendsPlexErrors](../../models/errors/getuserfriendsplexerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getuserfriendsresponsebody.md b/docs/models/errors/getuserfriendsresponsebody.md new file mode 100644 index 0000000..73de268 --- /dev/null +++ b/docs/models/errors/getuserfriendsresponsebody.md @@ -0,0 +1,11 @@ +# GetUserFriendsResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetUserFriendsErrors](../../models/errors/getuserfriendserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getwatchlisterrors.md b/docs/models/errors/getwatchlisterrors.md index 0dbfaaf..e890bbb 100644 --- a/docs/models/errors/getwatchlisterrors.md +++ b/docs/models/errors/getwatchlisterrors.md @@ -1,10 +1,10 @@ -# GetWatchlistErrors +# GetWatchListErrors ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getwatchlistresponsebody.md b/docs/models/errors/getwatchlistresponsebody.md index cbebe71..fcd45b2 100644 --- a/docs/models/errors/getwatchlistresponsebody.md +++ b/docs/models/errors/getwatchlistresponsebody.md @@ -1,11 +1,11 @@ -# GetWatchlistResponseBody +# GetWatchListResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.GetWatchlistErrors](../../models/errors/getwatchlisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.GetWatchListErrors](../../models/errors/getwatchlisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getwatchlistwatchlisterrors.md b/docs/models/errors/getwatchlistwatchlisterrors.md new file mode 100644 index 0000000..094bcf6 --- /dev/null +++ b/docs/models/errors/getwatchlistwatchlisterrors.md @@ -0,0 +1,10 @@ +# GetWatchListWatchlistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getwatchlistwatchlistresponsebody.md b/docs/models/errors/getwatchlistwatchlistresponsebody.md new file mode 100644 index 0000000..d884543 --- /dev/null +++ b/docs/models/errors/getwatchlistwatchlistresponsebody.md @@ -0,0 +1,11 @@ +# GetWatchListWatchlistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.GetWatchListWatchlistErrors](../../models/errors/getwatchlistwatchlisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/loglineerrors.md b/docs/models/errors/loglineerrors.md index 39af85e..ffcc002 100644 --- a/docs/models/errors/loglineerrors.md +++ b/docs/models/errors/loglineerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryerrors.md b/docs/models/errors/loglinelogerrors.md similarity index 83% rename from docs/models/errors/getlibraryerrors.md rename to docs/models/errors/loglinelogerrors.md index 53e73c7..fcfcef4 100644 --- a/docs/models/errors/getlibraryerrors.md +++ b/docs/models/errors/loglinelogerrors.md @@ -1,10 +1,10 @@ -# GetLibraryErrors +# LogLineLogErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/loglinelogresponsebody.md b/docs/models/errors/loglinelogresponsebody.md new file mode 100644 index 0000000..288200d --- /dev/null +++ b/docs/models/errors/loglinelogresponsebody.md @@ -0,0 +1,11 @@ +# LogLineLogResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | List[[errors.LogLineLogErrors](../../models/errors/loglinelogerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/loglineresponsebody.md b/docs/models/errors/loglineresponsebody.md index 4bdced2..279096f 100644 --- a/docs/models/errors/loglineresponsebody.md +++ b/docs/models/errors/loglineresponsebody.md @@ -1,11 +1,11 @@ # LogLineResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.LogLineErrors](../../models/errors/loglineerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `errors` | List[[errors.LogLineErrors](../../models/errors/loglineerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/logmultilineerrors.md b/docs/models/errors/logmultilineerrors.md index 87dda5d..1305a17 100644 --- a/docs/models/errors/logmultilineerrors.md +++ b/docs/models/errors/logmultilineerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/logmultilinelogerrors.md b/docs/models/errors/logmultilinelogerrors.md new file mode 100644 index 0000000..050d0f4 --- /dev/null +++ b/docs/models/errors/logmultilinelogerrors.md @@ -0,0 +1,10 @@ +# LogMultiLineLogErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/logmultilinelogresponsebody.md b/docs/models/errors/logmultilinelogresponsebody.md new file mode 100644 index 0000000..8fcbb25 --- /dev/null +++ b/docs/models/errors/logmultilinelogresponsebody.md @@ -0,0 +1,11 @@ +# LogMultiLineLogResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.LogMultiLineLogErrors](../../models/errors/logmultilinelogerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/logmultilineresponsebody.md b/docs/models/errors/logmultilineresponsebody.md index 034de13..be1caa3 100644 --- a/docs/models/errors/logmultilineresponsebody.md +++ b/docs/models/errors/logmultilineresponsebody.md @@ -1,11 +1,11 @@ # LogMultiLineResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.LogMultiLineErrors](../../models/errors/logmultilineerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.LogMultiLineErrors](../../models/errors/logmultilineerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markplayederrors.md b/docs/models/errors/markplayederrors.md index 1e460ab..00b80b8 100644 --- a/docs/models/errors/markplayederrors.md +++ b/docs/models/errors/markplayederrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/markplayedmediaerrors.md b/docs/models/errors/markplayedmediaerrors.md new file mode 100644 index 0000000..9733de2 --- /dev/null +++ b/docs/models/errors/markplayedmediaerrors.md @@ -0,0 +1,10 @@ +# MarkPlayedMediaErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/markplayedmediaresponsebody.md b/docs/models/errors/markplayedmediaresponsebody.md new file mode 100644 index 0000000..b4800a2 --- /dev/null +++ b/docs/models/errors/markplayedmediaresponsebody.md @@ -0,0 +1,11 @@ +# MarkPlayedMediaResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.MarkPlayedMediaErrors](../../models/errors/markplayedmediaerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markplayedresponsebody.md b/docs/models/errors/markplayedresponsebody.md index 8d96c98..033eb60 100644 --- a/docs/models/errors/markplayedresponsebody.md +++ b/docs/models/errors/markplayedresponsebody.md @@ -1,11 +1,11 @@ # MarkPlayedResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.MarkPlayedErrors](../../models/errors/markplayederrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | List[[errors.MarkPlayedErrors](../../models/errors/markplayederrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markunplayederrors.md b/docs/models/errors/markunplayederrors.md index b5f4a95..fa93cf3 100644 --- a/docs/models/errors/markunplayederrors.md +++ b/docs/models/errors/markunplayederrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/markunplayedmediaerrors.md b/docs/models/errors/markunplayedmediaerrors.md new file mode 100644 index 0000000..068f684 --- /dev/null +++ b/docs/models/errors/markunplayedmediaerrors.md @@ -0,0 +1,10 @@ +# MarkUnplayedMediaErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/markunplayedmediaresponsebody.md b/docs/models/errors/markunplayedmediaresponsebody.md new file mode 100644 index 0000000..66e6526 --- /dev/null +++ b/docs/models/errors/markunplayedmediaresponsebody.md @@ -0,0 +1,11 @@ +# MarkUnplayedMediaResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | List[[errors.MarkUnplayedMediaErrors](../../models/errors/markunplayedmediaerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markunplayedresponsebody.md b/docs/models/errors/markunplayedresponsebody.md index 2e90831..b98e06f 100644 --- a/docs/models/errors/markunplayedresponsebody.md +++ b/docs/models/errors/markunplayedresponsebody.md @@ -1,11 +1,11 @@ # MarkUnplayedResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.MarkUnplayedErrors](../../models/errors/markunplayederrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.MarkUnplayedErrors](../../models/errors/markunplayederrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performsearcherrors.md b/docs/models/errors/performsearcherrors.md index 4d5f84a..d4eab32 100644 --- a/docs/models/errors/performsearcherrors.md +++ b/docs/models/errors/performsearcherrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/performsearchresponsebody.md b/docs/models/errors/performsearchresponsebody.md index a9160bb..82aa5b3 100644 --- a/docs/models/errors/performsearchresponsebody.md +++ b/docs/models/errors/performsearchresponsebody.md @@ -1,11 +1,11 @@ # PerformSearchResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.PerformSearchErrors](../../models/errors/performsearcherrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.PerformSearchErrors](../../models/errors/performsearcherrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performsearchsearcherrors.md b/docs/models/errors/performsearchsearcherrors.md new file mode 100644 index 0000000..98ea4e7 --- /dev/null +++ b/docs/models/errors/performsearchsearcherrors.md @@ -0,0 +1,10 @@ +# PerformSearchSearchErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/performsearchsearchresponsebody.md b/docs/models/errors/performsearchsearchresponsebody.md new file mode 100644 index 0000000..cc92206 --- /dev/null +++ b/docs/models/errors/performsearchsearchresponsebody.md @@ -0,0 +1,11 @@ +# PerformSearchSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.PerformSearchSearchErrors](../../models/errors/performsearchsearcherrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearcherrors.md b/docs/models/errors/performvoicesearcherrors.md index 26bda08..0b16e72 100644 --- a/docs/models/errors/performvoicesearcherrors.md +++ b/docs/models/errors/performvoicesearcherrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearchresponsebody.md b/docs/models/errors/performvoicesearchresponsebody.md index 5901105..8f4d000 100644 --- a/docs/models/errors/performvoicesearchresponsebody.md +++ b/docs/models/errors/performvoicesearchresponsebody.md @@ -1,6 +1,6 @@ # PerformVoiceSearchResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `errors` | List[[errors.PerformVoiceSearchErrors](../../models/errors/performvoicesearcherrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearchsearcherrors.md b/docs/models/errors/performvoicesearchsearcherrors.md new file mode 100644 index 0000000..97e4d9b --- /dev/null +++ b/docs/models/errors/performvoicesearchsearcherrors.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchSearchErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearchsearchresponsebody.md b/docs/models/errors/performvoicesearchsearchresponsebody.md new file mode 100644 index 0000000..ee03dd7 --- /dev/null +++ b/docs/models/errors/performvoicesearchsearchresponsebody.md @@ -0,0 +1,11 @@ +# PerformVoiceSearchSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.PerformVoiceSearchSearchErrors](../../models/errors/performvoicesearchsearcherrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/postuserssignindataauthenticationerrors.md b/docs/models/errors/postuserssignindataauthenticationerrors.md new file mode 100644 index 0000000..6f69497 --- /dev/null +++ b/docs/models/errors/postuserssignindataauthenticationerrors.md @@ -0,0 +1,10 @@ +# PostUsersSignInDataAuthenticationErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/postuserssignindataauthenticationresponsebody.md b/docs/models/errors/postuserssignindataauthenticationresponsebody.md new file mode 100644 index 0000000..673108b --- /dev/null +++ b/docs/models/errors/postuserssignindataauthenticationresponsebody.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataAuthenticationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.PostUsersSignInDataAuthenticationErrors](../../models/errors/postuserssignindataauthenticationerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/postuserssignindataerrors.md b/docs/models/errors/postuserssignindataerrors.md new file mode 100644 index 0000000..8b0ae72 --- /dev/null +++ b/docs/models/errors/postuserssignindataerrors.md @@ -0,0 +1,10 @@ +# PostUsersSignInDataErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/postuserssignindataresponsebody.md b/docs/models/errors/postuserssignindataresponsebody.md new file mode 100644 index 0000000..529cefb --- /dev/null +++ b/docs/models/errors/postuserssignindataresponsebody.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataResponseBody + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.PostUsersSignInDataErrors](../../models/errors/postuserssignindataerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/refreshlibraryresponsebody.md b/docs/models/errors/refreshlibraryresponsebody.md deleted file mode 100644 index 91684e1..0000000 --- a/docs/models/errors/refreshlibraryresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# RefreshLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.RefreshLibraryErrors](../../models/errors/refreshlibraryerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/searchlibraryerrors.md b/docs/models/errors/searchlibraryerrors.md deleted file mode 100644 index 83c9a37..0000000 --- a/docs/models/errors/searchlibraryerrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# SearchLibraryErrors - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/searchlibraryresponsebody.md b/docs/models/errors/searchlibraryresponsebody.md deleted file mode 100644 index e6a7214..0000000 --- a/docs/models/errors/searchlibraryresponsebody.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.SearchLibraryErrors](../../models/errors/searchlibraryerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startalltasksbutlererrors.md b/docs/models/errors/startalltasksbutlererrors.md new file mode 100644 index 0000000..b59bb2c --- /dev/null +++ b/docs/models/errors/startalltasksbutlererrors.md @@ -0,0 +1,10 @@ +# StartAllTasksButlerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/startalltasksbutlerresponsebody.md b/docs/models/errors/startalltasksbutlerresponsebody.md new file mode 100644 index 0000000..fb085b9 --- /dev/null +++ b/docs/models/errors/startalltasksbutlerresponsebody.md @@ -0,0 +1,11 @@ +# StartAllTasksButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.StartAllTasksButlerErrors](../../models/errors/startalltasksbutlererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startalltaskserrors.md b/docs/models/errors/startalltaskserrors.md index fb27187..9140aa3 100644 --- a/docs/models/errors/startalltaskserrors.md +++ b/docs/models/errors/startalltaskserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/startalltasksresponsebody.md b/docs/models/errors/startalltasksresponsebody.md index 173277c..8cf6358 100644 --- a/docs/models/errors/startalltasksresponsebody.md +++ b/docs/models/errors/startalltasksresponsebody.md @@ -1,11 +1,11 @@ # StartAllTasksResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.StartAllTasksErrors](../../models/errors/startalltaskserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | List[[errors.StartAllTasksErrors](../../models/errors/startalltaskserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/starttaskbutlererrors.md b/docs/models/errors/starttaskbutlererrors.md new file mode 100644 index 0000000..7984d13 --- /dev/null +++ b/docs/models/errors/starttaskbutlererrors.md @@ -0,0 +1,10 @@ +# StartTaskButlerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/starttaskbutlerresponsebody.md b/docs/models/errors/starttaskbutlerresponsebody.md new file mode 100644 index 0000000..c748d20 --- /dev/null +++ b/docs/models/errors/starttaskbutlerresponsebody.md @@ -0,0 +1,11 @@ +# StartTaskButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | List[[errors.StartTaskButlerErrors](../../models/errors/starttaskbutlererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/starttaskerrors.md b/docs/models/errors/starttaskerrors.md index 13fa73f..d483184 100644 --- a/docs/models/errors/starttaskerrors.md +++ b/docs/models/errors/starttaskerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/starttaskresponsebody.md b/docs/models/errors/starttaskresponsebody.md index 50ce58e..ef6582a 100644 --- a/docs/models/errors/starttaskresponsebody.md +++ b/docs/models/errors/starttaskresponsebody.md @@ -1,11 +1,11 @@ # StartTaskResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.StartTaskErrors](../../models/errors/starttaskerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | List[[errors.StartTaskErrors](../../models/errors/starttaskerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscodeerrors.md b/docs/models/errors/startuniversaltranscodeerrors.md index e5d6fe0..5e204c2 100644 --- a/docs/models/errors/startuniversaltranscodeerrors.md +++ b/docs/models/errors/startuniversaltranscodeerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscoderesponsebody.md b/docs/models/errors/startuniversaltranscoderesponsebody.md index 9e95da1..aa584b9 100644 --- a/docs/models/errors/startuniversaltranscoderesponsebody.md +++ b/docs/models/errors/startuniversaltranscoderesponsebody.md @@ -1,6 +1,6 @@ # StartUniversalTranscodeResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `errors` | List[[errors.StartUniversalTranscodeErrors](../../models/errors/startuniversaltranscodeerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscodevideoerrors.md b/docs/models/errors/startuniversaltranscodevideoerrors.md new file mode 100644 index 0000000..59408ee --- /dev/null +++ b/docs/models/errors/startuniversaltranscodevideoerrors.md @@ -0,0 +1,10 @@ +# StartUniversalTranscodeVideoErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscodevideoresponsebody.md b/docs/models/errors/startuniversaltranscodevideoresponsebody.md new file mode 100644 index 0000000..d72db9c --- /dev/null +++ b/docs/models/errors/startuniversaltranscodevideoresponsebody.md @@ -0,0 +1,11 @@ +# StartUniversalTranscodeVideoResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.StartUniversalTranscodeVideoErrors](../../models/errors/startuniversaltranscodevideoerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stopalltasksbutlererrors.md b/docs/models/errors/stopalltasksbutlererrors.md new file mode 100644 index 0000000..b51b940 --- /dev/null +++ b/docs/models/errors/stopalltasksbutlererrors.md @@ -0,0 +1,10 @@ +# StopAllTasksButlerErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stopalltasksbutlerresponsebody.md b/docs/models/errors/stopalltasksbutlerresponsebody.md new file mode 100644 index 0000000..4d216da --- /dev/null +++ b/docs/models/errors/stopalltasksbutlerresponsebody.md @@ -0,0 +1,11 @@ +# StopAllTasksButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | List[[errors.StopAllTasksButlerErrors](../../models/errors/stopalltasksbutlererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stopalltaskserrors.md b/docs/models/errors/stopalltaskserrors.md index 4ae6e32..28f303e 100644 --- a/docs/models/errors/stopalltaskserrors.md +++ b/docs/models/errors/stopalltaskserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/stopalltasksresponsebody.md b/docs/models/errors/stopalltasksresponsebody.md index 8043eba..3b709e0 100644 --- a/docs/models/errors/stopalltasksresponsebody.md +++ b/docs/models/errors/stopalltasksresponsebody.md @@ -1,11 +1,11 @@ # StopAllTasksResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.StopAllTasksErrors](../../models/errors/stopalltaskserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List[[errors.StopAllTasksErrors](../../models/errors/stopalltaskserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadataerrors.md b/docs/models/errors/stoptaskbutlererrors.md similarity index 83% rename from docs/models/errors/getmetadataerrors.md rename to docs/models/errors/stoptaskbutlererrors.md index dd1fc30..1f245a5 100644 --- a/docs/models/errors/getmetadataerrors.md +++ b/docs/models/errors/stoptaskbutlererrors.md @@ -1,10 +1,10 @@ -# GetMetadataErrors +# StopTaskButlerErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | | `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stoptaskbutlerresponsebody.md b/docs/models/errors/stoptaskbutlerresponsebody.md new file mode 100644 index 0000000..f92edb4 --- /dev/null +++ b/docs/models/errors/stoptaskbutlerresponsebody.md @@ -0,0 +1,11 @@ +# StopTaskButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.StopTaskButlerErrors](../../models/errors/stoptaskbutlererrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stoptaskerrors.md b/docs/models/errors/stoptaskerrors.md index 503ae15..a173564 100644 --- a/docs/models/errors/stoptaskerrors.md +++ b/docs/models/errors/stoptaskerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/stoptaskresponsebody.md b/docs/models/errors/stoptaskresponsebody.md index fc61e45..6780833 100644 --- a/docs/models/errors/stoptaskresponsebody.md +++ b/docs/models/errors/stoptaskresponsebody.md @@ -1,11 +1,11 @@ # StopTaskResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.StopTaskErrors](../../models/errors/stoptaskerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `errors` | List[[errors.StopTaskErrors](../../models/errors/stoptaskerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionerrors.md b/docs/models/errors/stoptranscodesessionerrors.md index cb4043a..776e0f3 100644 --- a/docs/models/errors/stoptranscodesessionerrors.md +++ b/docs/models/errors/stoptranscodesessionerrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionresponsebody.md b/docs/models/errors/stoptranscodesessionresponsebody.md index bbb4bb8..06c83ef 100644 --- a/docs/models/errors/stoptranscodesessionresponsebody.md +++ b/docs/models/errors/stoptranscodesessionresponsebody.md @@ -1,6 +1,6 @@ # StopTranscodeSessionResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `errors` | List[[errors.StopTranscodeSessionErrors](../../models/errors/stoptranscodesessionerrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionsessionserrors.md b/docs/models/errors/stoptranscodesessionsessionserrors.md new file mode 100644 index 0000000..57d6d0e --- /dev/null +++ b/docs/models/errors/stoptranscodesessionsessionserrors.md @@ -0,0 +1,10 @@ +# StopTranscodeSessionSessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionsessionsresponsebody.md b/docs/models/errors/stoptranscodesessionsessionsresponsebody.md new file mode 100644 index 0000000..19a483e --- /dev/null +++ b/docs/models/errors/stoptranscodesessionsessionsresponsebody.md @@ -0,0 +1,11 @@ +# StopTranscodeSessionSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | List[[errors.StopTranscodeSessionSessionsErrors](../../models/errors/stoptranscodesessionsessionserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplaylisterrors.md b/docs/models/errors/updateplaylisterrors.md index 587558e..a3f9659 100644 --- a/docs/models/errors/updateplaylisterrors.md +++ b/docs/models/errors/updateplaylisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/updateplaylistplaylistserrors.md b/docs/models/errors/updateplaylistplaylistserrors.md new file mode 100644 index 0000000..9eafca2 --- /dev/null +++ b/docs/models/errors/updateplaylistplaylistserrors.md @@ -0,0 +1,10 @@ +# UpdatePlaylistPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/updateplaylistplaylistsresponsebody.md b/docs/models/errors/updateplaylistplaylistsresponsebody.md new file mode 100644 index 0000000..8af94f2 --- /dev/null +++ b/docs/models/errors/updateplaylistplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# UpdatePlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.UpdatePlaylistPlaylistsErrors](../../models/errors/updateplaylistplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplaylistresponsebody.md b/docs/models/errors/updateplaylistresponsebody.md index 5a367b2..e0ecded 100644 --- a/docs/models/errors/updateplaylistresponsebody.md +++ b/docs/models/errors/updateplaylistresponsebody.md @@ -1,11 +1,11 @@ # UpdatePlaylistResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.UpdatePlaylistErrors](../../models/errors/updateplaylisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.UpdatePlaylistErrors](../../models/errors/updateplaylisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogresserrors.md b/docs/models/errors/updateplayprogresserrors.md index 557087d..9266ed2 100644 --- a/docs/models/errors/updateplayprogresserrors.md +++ b/docs/models/errors/updateplayprogresserrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogressmediaerrors.md b/docs/models/errors/updateplayprogressmediaerrors.md new file mode 100644 index 0000000..a34725c --- /dev/null +++ b/docs/models/errors/updateplayprogressmediaerrors.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressMediaErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogressmediaresponsebody.md b/docs/models/errors/updateplayprogressmediaresponsebody.md new file mode 100644 index 0000000..94691f9 --- /dev/null +++ b/docs/models/errors/updateplayprogressmediaresponsebody.md @@ -0,0 +1,11 @@ +# UpdatePlayProgressMediaResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.UpdatePlayProgressMediaErrors](../../models/errors/updateplayprogressmediaerrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogressresponsebody.md b/docs/models/errors/updateplayprogressresponsebody.md index ac5a4a3..b0c7dbd 100644 --- a/docs/models/errors/updateplayprogressresponsebody.md +++ b/docs/models/errors/updateplayprogressresponsebody.md @@ -1,6 +1,6 @@ # UpdatePlayProgressResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields @@ -8,4 +8,4 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `errors` | List[[errors.UpdatePlayProgressErrors](../../models/errors/updateplayprogresserrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylisterrors.md b/docs/models/errors/uploadplaylisterrors.md index ce5ccc6..5e87b10 100644 --- a/docs/models/errors/uploadplaylisterrors.md +++ b/docs/models/errors/uploadplaylisterrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylistplaylistserrors.md b/docs/models/errors/uploadplaylistplaylistserrors.md new file mode 100644 index 0000000..d2cedfa --- /dev/null +++ b/docs/models/errors/uploadplaylistplaylistserrors.md @@ -0,0 +1,10 @@ +# UploadPlaylistPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylistplaylistsresponsebody.md b/docs/models/errors/uploadplaylistplaylistsresponsebody.md new file mode 100644 index 0000000..205a932 --- /dev/null +++ b/docs/models/errors/uploadplaylistplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# UploadPlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `errors` | List[[errors.UploadPlaylistPlaylistsErrors](../../models/errors/uploadplaylistplaylistserrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylistresponsebody.md b/docs/models/errors/uploadplaylistresponsebody.md index 3e0ab71..ea017ed 100644 --- a/docs/models/errors/uploadplaylistresponsebody.md +++ b/docs/models/errors/uploadplaylistresponsebody.md @@ -1,11 +1,11 @@ # UploadPlaylistResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | List[[errors.UploadPlaylistErrors](../../models/errors/uploadplaylisterrors.md)] | :heavy_minus_sign: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | List[[errors.UploadPlaylistErrors](../../models/errors/uploadplaylisterrors.md)] | :heavy_minus_sign: | N/A | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/internal/globals.md b/docs/models/internal/globals.md index e2265e6..816b5fd 100644 --- a/docs/models/internal/globals.md +++ b/docs/models/internal/globals.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_plex_client_identifier` | *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)
| Postman | \ No newline at end of file +| `x_plex_client_identifier` | *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/addplaylistcontentsresponse.md b/docs/models/operations/addplaylistcontentsresponse.md index 279d13c..af1a6cd 100644 --- a/docs/models/operations/addplaylistcontentsresponse.md +++ b/docs/models/operations/addplaylistcontentsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.AddPlaylistContentsResponseBody]](../../models/operations/addplaylistcontentsresponsebody.md) | :heavy_minus_sign: | Playlist Updated | \ No newline at end of file diff --git a/docs/models/operations/applyupdatesrequest.md b/docs/models/operations/applyupdatesrequest.md index 33c2cb1..61e10a8 100644 --- a/docs/models/operations/applyupdatesrequest.md +++ b/docs/models/operations/applyupdatesrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tonight` | [Optional[operations.Tonight]](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `skip` | [Optional[operations.Skip]](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file +| `skip` | [Optional[operations.Skip]](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file diff --git a/docs/models/operations/applyupdatesresponse.md b/docs/models/operations/applyupdatesresponse.md index 0d45000..89c03c1 100644 --- a/docs/models/operations/applyupdatesresponse.md +++ b/docs/models/operations/applyupdatesresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/autoselectsubtitle.md b/docs/models/operations/autoselectsubtitle.md new file mode 100644 index 0000000..3fcdee9 --- /dev/null +++ b/docs/models/operations/autoselectsubtitle.md @@ -0,0 +1,11 @@ +# AutoSelectSubtitle + +The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/billing.md b/docs/models/operations/billing.md new file mode 100644 index 0000000..b21aeca --- /dev/null +++ b/docs/models/operations/billing.md @@ -0,0 +1,9 @@ +# Billing + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `internal_payment_method` | [operations.InternalPaymentMethod](../../models/operations/internalpaymentmethod.md) | :heavy_check_mark: | N/A | +| `payment_method_id` | *Nullable[int]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/cancelserveractivitiesresponse.md b/docs/models/operations/cancelserveractivitiesresponse.md index e189097..cdb7e43 100644 --- a/docs/models/operations/cancelserveractivitiesresponse.md +++ b/docs/models/operations/cancelserveractivitiesresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/checkforupdatesresponse.md b/docs/models/operations/checkforupdatesresponse.md index 41bc842..6bcf227 100644 --- a/docs/models/operations/checkforupdatesresponse.md +++ b/docs/models/operations/checkforupdatesresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/clearplaylistcontentsresponse.md b/docs/models/operations/clearplaylistcontentsresponse.md index ba09599..17d62b8 100644 --- a/docs/models/operations/clearplaylistcontentsresponse.md +++ b/docs/models/operations/clearplaylistcontentsresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/connections.md b/docs/models/operations/connections.md new file mode 100644 index 0000000..110e330 --- /dev/null +++ b/docs/models/operations/connections.md @@ -0,0 +1,14 @@ +# Connections + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `protocol` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `port` | *float* | :heavy_check_mark: | N/A | +| `uri` | *str* | :heavy_check_mark: | N/A | +| `local` | *bool* | :heavy_check_mark: | N/A | +| `relay` | *bool* | :heavy_check_mark: | N/A | +| `i_pv6` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createplaylistqueryparamtype.md b/docs/models/operations/createplaylistqueryparamtype.md new file mode 100644 index 0000000..bb012f2 --- /dev/null +++ b/docs/models/operations/createplaylistqueryparamtype.md @@ -0,0 +1,12 @@ +# CreatePlaylistQueryParamType + +type of playlist to create + + +## Values + +| Name | Value | +| ------- | ------- | +| `AUDIO` | audio | +| `VIDEO` | video | +| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/operations/createplaylistrequest.md b/docs/models/operations/createplaylistrequest.md index 788bc30..8da6116 100644 --- a/docs/models/operations/createplaylistrequest.md +++ b/docs/models/operations/createplaylistrequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `title` | *str* | :heavy_check_mark: | name of the playlist | -| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | type of playlist to create | -| `smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not | -| `uri` | *str* | :heavy_check_mark: | the content URI for the playlist | -| `play_queue_id` | *Optional[float]* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `title` | *str* | :heavy_check_mark: | name of the playlist | +| `type` | [operations.CreatePlaylistQueryParamType](../../models/operations/createplaylistqueryparamtype.md) | :heavy_check_mark: | type of playlist to create | +| `smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not | +| `uri` | *str* | :heavy_check_mark: | the content URI for the playlist | +| `play_queue_id` | *Optional[float]* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file diff --git a/docs/models/operations/createplaylistresponse.md b/docs/models/operations/createplaylistresponse.md index 2867e87..cf543bd 100644 --- a/docs/models/operations/createplaylistresponse.md +++ b/docs/models/operations/createplaylistresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.CreatePlaylistResponseBody]](../../models/operations/createplaylistresponsebody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/models/operations/defaultsubtitleaccessibility.md b/docs/models/operations/defaultsubtitleaccessibility.md new file mode 100644 index 0000000..cbc38d9 --- /dev/null +++ b/docs/models/operations/defaultsubtitleaccessibility.md @@ -0,0 +1,11 @@ +# DefaultSubtitleAccessibility + +The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/defaultsubtitleforced.md b/docs/models/operations/defaultsubtitleforced.md new file mode 100644 index 0000000..83704a5 --- /dev/null +++ b/docs/models/operations/defaultsubtitleforced.md @@ -0,0 +1,11 @@ +# DefaultSubtitleForced + +The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/deletelibraryrequest.md b/docs/models/operations/deletelibraryrequest.md index 8392df0..c030394 100644 --- a/docs/models/operations/deletelibraryrequest.md +++ b/docs/models/operations/deletelibraryrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/models/operations/deletelibraryresponse.md b/docs/models/operations/deletelibraryresponse.md index 7640204..51da590 100644 --- a/docs/models/operations/deletelibraryresponse.md +++ b/docs/models/operations/deletelibraryresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteplaylistresponse.md b/docs/models/operations/deleteplaylistresponse.md index 4fd9122..14c915d 100644 --- a/docs/models/operations/deleteplaylistresponse.md +++ b/docs/models/operations/deleteplaylistresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/enablepapertrailresponse.md b/docs/models/operations/enablepapertrailresponse.md index 34b13f5..2c86b6e 100644 --- a/docs/models/operations/enablepapertrailresponse.md +++ b/docs/models/operations/enablepapertrailresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/feature.md b/docs/models/operations/feature.md new file mode 100644 index 0000000..08fbe5e --- /dev/null +++ b/docs/models/operations/feature.md @@ -0,0 +1,10 @@ +# Feature + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `directory` | List[[operations.GetMediaProvidersDirectory](../../models/operations/getmediaprovidersdirectory.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/features.md b/docs/models/operations/features.md new file mode 100644 index 0000000..057a174 --- /dev/null +++ b/docs/models/operations/features.md @@ -0,0 +1,66 @@ +# Features + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `ANDROID_DOLBY_VISION` | Android - Dolby Vision | +| `ANDROID_PI_P` | Android - PiP | +| `CU_SUNSET` | CU Sunset | +| `HRK_ENABLE_EUR` | HRK_enable_EUR | +| `TREBLE_SHOW_FEATURES` | TREBLE-show-features | +| `AD_COUNTDOWN_TIMER` | ad-countdown-timer | +| `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `AMAZON_LOOP_DEBUG` | amazon-loop-debug | +| `AVOD_AD_ANALYSIS` | avod-ad-analysis | +| `AVOD_NEW_MEDIA` | avod-new-media | +| `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `CLIENT_RADIO_STATIONS` | client-radio-stations | +| `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `COLLECTIONS` | collections | +| `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | +| `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | +| `COMPANIONS_SONOS` | companions_sonos | +| `CUSTOM_HOME_REMOVAL` | custom-home-removal | +| `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | +| `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DRM_SUPPORT` | drm_support | +| `EXCLUDE_RESTRICTIONS` | exclude restrictions | +| `FEDERATED_AUTH` | federated-auth | +| `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GUIDED_UPGRADE` | guided-upgrade | +| `HOME` | home | +| `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | +| `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | +| `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `KEEP_PAYMENT_METHOD` | keep-payment-method | +| `KEVIN_BACON` | kevin-bacon | +| `KOREA_CONSENT` | korea-consent | +| `LE_ISRG_ROOT_X1` | le_isrg_root_x1 | +| `LETS_ENCRYPT` | lets_encrypt | +| `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | +| `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | +| `LIVETV` | livetv | +| `METADATA_SEARCH` | metadata_search | +| `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | +| `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `PHOTOS_FAVORITES` | photos-favorites | +| `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PMS_HEALTH` | pms_health | +| `RADIO` | radio | +| `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | +| `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SHARED_SERVER_NOTIFICATION` | shared_server_notification | +| `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `TRANSCODER_CACHE` | transcoder_cache | +| `TUNER_SHARING` | tuner-sharing | +| `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | +| `UNSUPPORTEDTUNERS` | unsupportedtuners | +| `UPGRADE_3DS2` | upgrade-3ds2 | +| `VOD_SCHEMA` | vod-schema | +| `VOD_CLOUDFLARE` | vod_cloudflare | +| `WATCH_TOGETHER_INVITE` | watch-together-invite | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file diff --git a/docs/models/operations/filter_.md b/docs/models/operations/filter_.md index 6b3af5a..2736d3d 100644 --- a/docs/models/operations/filter_.md +++ b/docs/models/operations/filter_.md @@ -1,11 +1,12 @@ # Filter -Filters content by field and direction/equality -(Unknown if viewedAt is the only supported column) +Filter +## Values -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `ALL` | all | +| `AVAILABLE` | available | +| `RELEASED` | released | \ No newline at end of file diff --git a/docs/models/operations/force.md b/docs/models/operations/force.md index 9bacc5e..97b7709 100644 --- a/docs/models/operations/force.md +++ b/docs/models/operations/force.md @@ -1,10 +1,6 @@ # Force -Force overwriting of duplicate playlists. -By default, a playlist file uploaded with the same path will overwrite the existing playlist. -The `force` argument is used to disable overwriting. -If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - +Force the refresh even if the library is already being refreshed. ## Values diff --git a/docs/models/operations/friend.md b/docs/models/operations/friend.md new file mode 100644 index 0000000..478debd --- /dev/null +++ b/docs/models/operations/friend.md @@ -0,0 +1,19 @@ +# Friend + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `email` | *str* | :heavy_check_mark: | The account email address | username@email.com | +| `friendly_name` | *Nullable[str]* | :heavy_check_mark: | The account full name | exampleUser | +| `home` | *bool* | :heavy_check_mark: | If the account is a Plex Home user | | +| `id` | *int* | :heavy_check_mark: | The Plex account ID | | +| `shared_servers` | List[[operations.SharedServers](../../models/operations/sharedservers.md)] | :heavy_check_mark: | N/A | | +| `shared_sources` | List[[operations.SharedSources](../../models/operations/sharedsources.md)] | :heavy_check_mark: | N/A | | +| `status` | [operations.Status](../../models/operations/status.md) | :heavy_check_mark: | Current friend request status | accepted | +| `thumb` | *str* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 | +| `title` | *str* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 | +| `username` | *str* | :heavy_check_mark: | The account username | username123 | +| `uuid` | *str* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b | +| `restricted` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home managed user | | \ No newline at end of file diff --git a/docs/models/operations/geodata.md b/docs/models/operations/geodata.md new file mode 100644 index 0000000..f766cc3 --- /dev/null +++ b/docs/models/operations/geodata.md @@ -0,0 +1,20 @@ +# GeoData + +Geo location data + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | +| `continent_code` | *str* | :heavy_check_mark: | The continent code where the country is located. | NA | +| `country` | *str* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | +| `city` | *str* | :heavy_check_mark: | The name of the city. | Amsterdam | +| `time_zone` | *str* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | +| `postal_code` | *int* | :heavy_check_mark: | The postal code of the location. | 802 | +| `subdivisions` | *str* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | +| `coordinates` | *str* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | +| `european_union_member` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | +| `in_privacy_restricted_country` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | +| `in_privacy_restricted_region` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariesdirectory.md b/docs/models/operations/getalllibrariesdirectory.md new file mode 100644 index 0000000..799db22 --- /dev/null +++ b/docs/models/operations/getalllibrariesdirectory.md @@ -0,0 +1,28 @@ +# GetAllLibrariesDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `composite` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 | +| `filters` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `refreshing` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | +| `agent` | *Optional[str]* | :heavy_minus_sign: | N/A | tv.plex.agents.movie | +| `scanner` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Movie | +| `language` | *Optional[str]* | :heavy_minus_sign: | N/A | en-US | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `updated_at` | *Optional[int]* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `created_at` | *Optional[int]* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `scanned_at` | *Optional[int]* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `content` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `directory` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `content_changed_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 3192854 | +| `hidden` | *Optional[int]* | :heavy_minus_sign: | N/A | 0 | +| `location` | List[[operations.Location](../../models/operations/location.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariesmediacontainer.md b/docs/models/operations/getalllibrariesmediacontainer.md new file mode 100644 index 0000000..56e84ac --- /dev/null +++ b/docs/models/operations/getalllibrariesmediacontainer.md @@ -0,0 +1,11 @@ +# GetAllLibrariesMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `size` | *int* | :heavy_check_mark: | N/A | 5 | +| `allow_sync` | *bool* | :heavy_check_mark: | N/A | false | +| `title1` | *str* | :heavy_check_mark: | N/A | Plex Library | +| `directory` | List[[operations.GetAllLibrariesDirectory](../../models/operations/getalllibrariesdirectory.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariesresponse.md b/docs/models/operations/getalllibrariesresponse.md new file mode 100644 index 0000000..001251f --- /dev/null +++ b/docs/models/operations/getalllibrariesresponse.md @@ -0,0 +1,11 @@ +# GetAllLibrariesResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetAllLibrariesResponseBody]](../../models/operations/getalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariesresponsebody.md b/docs/models/operations/getalllibrariesresponsebody.md new file mode 100644 index 0000000..8f8269e --- /dev/null +++ b/docs/models/operations/getalllibrariesresponsebody.md @@ -0,0 +1,10 @@ +# GetAllLibrariesResponseBody + +The libraries available on the Server + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `media_container` | [Optional[operations.GetAllLibrariesMediaContainer]](../../models/operations/getalllibrariesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getavailableclientsresponse.md b/docs/models/operations/getavailableclientsresponse.md index 96f1ce7..019b760 100644 --- a/docs/models/operations/getavailableclientsresponse.md +++ b/docs/models/operations/getavailableclientsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetAvailableClientsResponseBody]](../../models/operations/getavailableclientsresponsebody.md) | :heavy_minus_sign: | Available Clients | \ No newline at end of file diff --git a/docs/models/operations/getbandwidthstatisticsresponse.md b/docs/models/operations/getbandwidthstatisticsresponse.md index 559c930..bb8e036 100644 --- a/docs/models/operations/getbandwidthstatisticsresponse.md +++ b/docs/models/operations/getbandwidthstatisticsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetBandwidthStatisticsResponseBody]](../../models/operations/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics | \ No newline at end of file diff --git a/docs/models/operations/getbannerimagerequest.md b/docs/models/operations/getbannerimagerequest.md new file mode 100644 index 0000000..812d336 --- /dev/null +++ b/docs/models/operations/getbannerimagerequest.md @@ -0,0 +1,13 @@ +# GetBannerImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `rating_key` | *int* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | +| `width` | *int* | :heavy_check_mark: | N/A | 396 | +| `height` | *int* | :heavy_check_mark: | N/A | 396 | +| `min_size` | *int* | :heavy_check_mark: | N/A | 1 | +| `upscale` | *int* | :heavy_check_mark: | N/A | 1 | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getbannerimageresponse.md b/docs/models/operations/getbannerimageresponse.md new file mode 100644 index 0000000..a66758d --- /dev/null +++ b/docs/models/operations/getbannerimageresponse.md @@ -0,0 +1,12 @@ +# GetBannerImageResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successful response returning an image | \ No newline at end of file diff --git a/docs/models/operations/getbutlertasksresponse.md b/docs/models/operations/getbutlertasksresponse.md index 0baf1a2..914be1f 100644 --- a/docs/models/operations/getbutlertasksresponse.md +++ b/docs/models/operations/getbutlertasksresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetButlerTasksResponseBody]](../../models/operations/getbutlertasksresponsebody.md) | :heavy_minus_sign: | All butler tasks | \ No newline at end of file diff --git a/docs/models/operations/getcompanionsdataresponse.md b/docs/models/operations/getcompanionsdataresponse.md new file mode 100644 index 0000000..194df2f --- /dev/null +++ b/docs/models/operations/getcompanionsdataresponse.md @@ -0,0 +1,11 @@ +# GetCompanionsDataResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_bodies` | List[[operations.ResponseBody](../../models/operations/responsebody.md)] | :heavy_minus_sign: | Companions Data | \ No newline at end of file diff --git a/docs/models/operations/getdevicesresponse.md b/docs/models/operations/getdevicesresponse.md index 62350d1..37d8d3b 100644 --- a/docs/models/operations/getdevicesresponse.md +++ b/docs/models/operations/getdevicesresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetDevicesResponseBody]](../../models/operations/getdevicesresponsebody.md) | :heavy_minus_sign: | Devices | \ No newline at end of file diff --git a/docs/models/operations/getfilehashresponse.md b/docs/models/operations/getfilehashresponse.md index 625674f..49c5c88 100644 --- a/docs/models/operations/getfilehashresponse.md +++ b/docs/models/operations/getfilehashresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getgeodatageodata.md b/docs/models/operations/getgeodatageodata.md new file mode 100644 index 0000000..8a67a07 --- /dev/null +++ b/docs/models/operations/getgeodatageodata.md @@ -0,0 +1,20 @@ +# GetGeoDataGeoData + +Geo location data + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | +| `continent_code` | *str* | :heavy_check_mark: | The continent code where the country is located. | NA | +| `country` | *str* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | +| `city` | *str* | :heavy_check_mark: | The name of the city. | Amsterdam | +| `time_zone` | *str* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | +| `postal_code` | *int* | :heavy_check_mark: | The postal code of the location. | 802 | +| `subdivisions` | *str* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | +| `coordinates` | *str* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | +| `european_union_member` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | +| `in_privacy_restricted_country` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | +| `in_privacy_restricted_region` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | \ No newline at end of file diff --git a/docs/models/operations/getpinresponsebody.md b/docs/models/operations/getgeodataresponse.md similarity index 57% rename from docs/models/operations/getpinresponsebody.md rename to docs/models/operations/getgeodataresponse.md index c912ecd..74843d7 100644 --- a/docs/models/operations/getpinresponsebody.md +++ b/docs/models/operations/getgeodataresponse.md @@ -1,21 +1,11 @@ -# GetPinResponseBody - -The Pin +# GetGeoDataResponse ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional[float]* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | -| `code` | *Optional[str]* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | -| `product` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Web | -| `trusted` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `qr` | *Optional[str]* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv
The QR code redirects to the relevant `plex.tv/link` authentication page
Which then prompts the user for the 4 Digit Link Pin
| https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t | -| `client_identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | Postman | -| `location` | [Optional[operations.Location]](../../models/operations/location.md) | :heavy_minus_sign: | N/A | | -| `expires_in` | *Optional[float]* | :heavy_minus_sign: | N/A | 1800 | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | -| `auth_token` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `new_registration` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `geo_data` | [Optional[operations.GetGeoDataGeoData]](../../models/operations/getgeodatageodata.md) | :heavy_minus_sign: | Gets the geo location data of the user | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | \ No newline at end of file diff --git a/docs/models/operations/getglobalhubsresponse.md b/docs/models/operations/getglobalhubsresponse.md index 0803979..78a7d0c 100644 --- a/docs/models/operations/getglobalhubsresponse.md +++ b/docs/models/operations/getglobalhubsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetGlobalHubsResponseBody]](../../models/operations/getglobalhubsresponsebody.md) | :heavy_minus_sign: | returns global hubs | \ No newline at end of file diff --git a/docs/models/operations/gethomedataresponse.md b/docs/models/operations/gethomedataresponse.md index 64ffa96..c4b7442 100644 --- a/docs/models/operations/gethomedataresponse.md +++ b/docs/models/operations/gethomedataresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetHomeDataResponseBody]](../../models/operations/gethomedataresponsebody.md) | :heavy_minus_sign: | Home Data | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesdirectory.md b/docs/models/operations/getlibrariesdirectory.md deleted file mode 100644 index 4adc039..0000000 --- a/docs/models/operations/getlibrariesdirectory.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetLibrariesDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `composite` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 | -| `filters` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `refreshing` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 | -| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | -| `agent` | *Optional[str]* | :heavy_minus_sign: | N/A | tv.plex.agents.movie | -| `scanner` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Movie | -| `language` | *Optional[str]* | :heavy_minus_sign: | N/A | en-US | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705615634 | -| `created_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1654131312 | -| `scanned_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705615584 | -| `content` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `directory` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `content_changed_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 3192854 | -| `hidden` | *Optional[int]* | :heavy_minus_sign: | N/A | 0 | -| `location` | List[[operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibrarieslocation.md b/docs/models/operations/getlibrarieslocation.md deleted file mode 100644 index f0fbcab..0000000 --- a/docs/models/operations/getlibrarieslocation.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibrariesLocation - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | -| `path` | *Optional[str]* | :heavy_minus_sign: | N/A | /movies | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesmediacontainer.md b/docs/models/operations/getlibrariesmediacontainer.md deleted file mode 100644 index be944cc..0000000 --- a/docs/models/operations/getlibrariesmediacontainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrariesMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 5 | -| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `title1` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Library | -| `directory` | List[[operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesresponse.md b/docs/models/operations/getlibrariesresponse.md deleted file mode 100644 index ddb8362..0000000 --- a/docs/models/operations/getlibrariesresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrariesResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetLibrariesResponseBody]](../../models/operations/getlibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/models/operations/getlibrarydirectory.md b/docs/models/operations/getlibrarydetailsdirectory.md similarity index 96% rename from docs/models/operations/getlibrarydirectory.md rename to docs/models/operations/getlibrarydetailsdirectory.md index 31449d6..054cfc5 100644 --- a/docs/models/operations/getlibrarydirectory.md +++ b/docs/models/operations/getlibrarydetailsdirectory.md @@ -1,4 +1,4 @@ -# GetLibraryDirectory +# GetLibraryDetailsDirectory ## Fields diff --git a/docs/models/operations/getlibraryfilter.md b/docs/models/operations/getlibrarydetailsfilter.md similarity index 97% rename from docs/models/operations/getlibraryfilter.md rename to docs/models/operations/getlibrarydetailsfilter.md index 06fbff4..ddc0629 100644 --- a/docs/models/operations/getlibraryfilter.md +++ b/docs/models/operations/getlibrarydetailsfilter.md @@ -1,4 +1,4 @@ -# GetLibraryFilter +# GetLibraryDetailsFilter ## Fields diff --git a/docs/models/operations/getlibrarydetailsmediacontainer.md b/docs/models/operations/getlibrarydetailsmediacontainer.md new file mode 100644 index 0000000..68a8bdd --- /dev/null +++ b/docs/models/operations/getlibrarydetailsmediacontainer.md @@ -0,0 +1,22 @@ +# GetLibraryDetailsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 29 | +| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `content` | *Optional[str]* | :heavy_minus_sign: | N/A | secondary | +| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | +| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1701731894 | +| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `title1` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | +| `view_group` | *Optional[str]* | :heavy_minus_sign: | N/A | secondary | +| `view_mode` | *Optional[int]* | :heavy_minus_sign: | N/A | 65592 | +| `directory` | List[[operations.GetLibraryDetailsDirectory](../../models/operations/getlibrarydetailsdirectory.md)] | :heavy_minus_sign: | N/A | | +| `type` | List[[operations.GetLibraryDetailsType](../../models/operations/getlibrarydetailstype.md)] | :heavy_minus_sign: | N/A | | +| `field_type` | List[[operations.FieldType](../../models/operations/fieldtype.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryrequest.md b/docs/models/operations/getlibrarydetailsrequest.md similarity index 89% rename from docs/models/operations/getlibraryrequest.md rename to docs/models/operations/getlibrarydetailsrequest.md index 3803e90..dd1b9f9 100644 --- a/docs/models/operations/getlibraryrequest.md +++ b/docs/models/operations/getlibrarydetailsrequest.md @@ -1,9 +1,9 @@ -# GetLibraryRequest +# GetLibraryDetailsRequest ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `include_details` | [Optional[operations.IncludeDetails]](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | \ No newline at end of file diff --git a/docs/models/operations/getlibrarydetailsresponse.md b/docs/models/operations/getlibrarydetailsresponse.md new file mode 100644 index 0000000..e2b67ed --- /dev/null +++ b/docs/models/operations/getlibrarydetailsresponse.md @@ -0,0 +1,11 @@ +# GetLibraryDetailsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetLibraryDetailsResponseBody]](../../models/operations/getlibrarydetailsresponsebody.md) | :heavy_minus_sign: | The details of the library | \ No newline at end of file diff --git a/docs/models/operations/getlibrarydetailsresponsebody.md b/docs/models/operations/getlibrarydetailsresponsebody.md new file mode 100644 index 0000000..1fb01f6 --- /dev/null +++ b/docs/models/operations/getlibrarydetailsresponsebody.md @@ -0,0 +1,10 @@ +# GetLibraryDetailsResponseBody + +The details of the library + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `media_container` | [Optional[operations.GetLibraryDetailsMediaContainer]](../../models/operations/getlibrarydetailsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getlibrarydetailstype.md b/docs/models/operations/getlibrarydetailstype.md new file mode 100644 index 0000000..29af755 --- /dev/null +++ b/docs/models/operations/getlibrarydetailstype.md @@ -0,0 +1,14 @@ +# GetLibraryDetailsType + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | +| `active` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `filter_` | List[[operations.GetLibraryDetailsFilter](../../models/operations/getlibrarydetailsfilter.md)] | :heavy_minus_sign: | N/A | | +| `sort` | List[[operations.Sort](../../models/operations/sort.md)] | :heavy_minus_sign: | N/A | | +| `field` | List[[operations.Field](../../models/operations/field.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsresponse.md b/docs/models/operations/getlibraryhubsresponse.md index 88c82bf..5ac6667 100644 --- a/docs/models/operations/getlibraryhubsresponse.md +++ b/docs/models/operations/getlibraryhubsresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetLibraryHubsResponseBody]](../../models/operations/getlibraryhubsresponsebody.md) | :heavy_minus_sign: | The hubs specific to the library | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrequest.md b/docs/models/operations/getlibraryitemsrequest.md index c7ecabb..98a376d 100644 --- a/docs/models/operations/getlibraryitemsrequest.md +++ b/docs/models/operations/getlibraryitemsrequest.md @@ -3,8 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `section_id` | *Any* | :heavy_check_mark: | the Id of the library to query | | -| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | -| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | +| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `include_guids` | [Optional[operations.IncludeGuids]](../../models/operations/includeguids.md) | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| `include_meta` | [Optional[operations.IncludeMeta]](../../models/operations/includemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | +| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsresponse.md b/docs/models/operations/getlibraryitemsresponse.md index 0f7a620..b3a18a3 100644 --- a/docs/models/operations/getlibraryitemsresponse.md +++ b/docs/models/operations/getlibraryitemsresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetLibraryItemsResponseBody]](../../models/operations/getlibraryitemsresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file diff --git a/docs/models/operations/getlibrarymediacontainer.md b/docs/models/operations/getlibrarymediacontainer.md deleted file mode 100644 index 052928b..0000000 --- a/docs/models/operations/getlibrarymediacontainer.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 29 | -| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `content` | *Optional[str]* | :heavy_minus_sign: | N/A | secondary | -| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | -| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1701731894 | -| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `title1` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | -| `view_group` | *Optional[str]* | :heavy_minus_sign: | N/A | secondary | -| `view_mode` | *Optional[int]* | :heavy_minus_sign: | N/A | 65592 | -| `directory` | List[[operations.GetLibraryDirectory](../../models/operations/getlibrarydirectory.md)] | :heavy_minus_sign: | N/A | | -| `type` | List[[operations.GetLibraryType](../../models/operations/getlibrarytype.md)] | :heavy_minus_sign: | N/A | | -| `field_type` | List[[operations.FieldType](../../models/operations/fieldtype.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryresponse.md b/docs/models/operations/getlibraryresponse.md deleted file mode 100644 index 73d299d..0000000 --- a/docs/models/operations/getlibraryresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetLibraryResponseBody]](../../models/operations/getlibraryresponsebody.md) | :heavy_minus_sign: | The details of the library | \ No newline at end of file diff --git a/docs/models/operations/getlibrarytype.md b/docs/models/operations/getlibrarytype.md deleted file mode 100644 index b4e896a..0000000 --- a/docs/models/operations/getlibrarytype.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLibraryType - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | -| `active` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `filter_` | List[[operations.GetLibraryFilter](../../models/operations/getlibraryfilter.md)] | :heavy_minus_sign: | N/A | | -| `sort` | List[[operations.Sort](../../models/operations/sort.md)] | :heavy_minus_sign: | N/A | | -| `field` | List[[operations.Field](../../models/operations/field.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersdirectory.md b/docs/models/operations/getmediaprovidersdirectory.md new file mode 100644 index 0000000..69a834f --- /dev/null +++ b/docs/models/operations/getmediaprovidersdirectory.md @@ -0,0 +1,21 @@ +# GetMediaProvidersDirectory + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `hub_key` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `agent` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `language` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `refreshing` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `scanner` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `subtype` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `scanned_at` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `pivot` | List[[operations.Pivot](../../models/operations/pivot.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersmediacontainer.md b/docs/models/operations/getmediaprovidersmediacontainer.md new file mode 100644 index 0000000..44ab848 --- /dev/null +++ b/docs/models/operations/getmediaprovidersmediacontainer.md @@ -0,0 +1,51 @@ +# GetMediaProvidersMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `allow_camera_upload` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `allow_channel_access` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `allow_sharing` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `allow_tuners` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `background_processing` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `certificate` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `companion_proxy` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `country_code` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `diagnostics` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `event_stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `friendly_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `livetv` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `machine_identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `music_analysis` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `my_plex` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `my_plex_mapping_state` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `my_plex_signin_state` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `my_plex_subscription` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `my_plex_username` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `offline_transcode` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `owner_features` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `platform` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `platform_version` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `plugin_host` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `push_notifications` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `read_only_libraries` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `streaming_brain_abr_version` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `streaming_brain_version` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `transcoder_active_video_sessions` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `transcoder_audio` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `transcoder_lyrics` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `transcoder_subtitles` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `transcoder_video` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `transcoder_video_bitrates` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `transcoder_video_qualities` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `transcoder_video_resolutions` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `updater` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `version` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `voice_search` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `media_provider` | List[[operations.MediaProvider](../../models/operations/mediaprovider.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersrequest.md b/docs/models/operations/getmediaprovidersrequest.md new file mode 100644 index 0000000..1515831 --- /dev/null +++ b/docs/models/operations/getmediaprovidersrequest.md @@ -0,0 +1,8 @@ +# GetMediaProvidersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersresponse.md b/docs/models/operations/getmediaprovidersresponse.md new file mode 100644 index 0000000..af28420 --- /dev/null +++ b/docs/models/operations/getmediaprovidersresponse.md @@ -0,0 +1,11 @@ +# GetMediaProvidersResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetMediaProvidersResponseBody]](../../models/operations/getmediaprovidersresponsebody.md) | :heavy_minus_sign: | Media providers and their features | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersresponsebody.md b/docs/models/operations/getmediaprovidersresponsebody.md new file mode 100644 index 0000000..d1cbab3 --- /dev/null +++ b/docs/models/operations/getmediaprovidersresponsebody.md @@ -0,0 +1,10 @@ +# GetMediaProvidersResponseBody + +Media providers and their features + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `media_container` | [Optional[operations.GetMediaProvidersMediaContainer]](../../models/operations/getmediaprovidersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmetadatacountry.md b/docs/models/operations/getmetadatabyratingkeycountry.md similarity index 95% rename from docs/models/operations/getmetadatacountry.md rename to docs/models/operations/getmetadatabyratingkeycountry.md index f9000a2..8781b56 100644 --- a/docs/models/operations/getmetadatacountry.md +++ b/docs/models/operations/getmetadatabyratingkeycountry.md @@ -1,4 +1,4 @@ -# GetMetadataCountry +# GetMetaDataByRatingKeyCountry ## Fields diff --git a/docs/models/operations/getmetadatadirector.md b/docs/models/operations/getmetadatabyratingkeydirector.md similarity index 98% rename from docs/models/operations/getmetadatadirector.md rename to docs/models/operations/getmetadatabyratingkeydirector.md index e25dc83..e8de61b 100644 --- a/docs/models/operations/getmetadatadirector.md +++ b/docs/models/operations/getmetadatabyratingkeydirector.md @@ -1,4 +1,4 @@ -# GetMetadataDirector +# GetMetaDataByRatingKeyDirector ## Fields diff --git a/docs/models/operations/getmetadatagenre.md b/docs/models/operations/getmetadatabyratingkeygenre.md similarity index 94% rename from docs/models/operations/getmetadatagenre.md rename to docs/models/operations/getmetadatabyratingkeygenre.md index 1be34af..81bedd3 100644 --- a/docs/models/operations/getmetadatagenre.md +++ b/docs/models/operations/getmetadatabyratingkeygenre.md @@ -1,4 +1,4 @@ -# GetMetadataGenre +# GetMetaDataByRatingKeyGenre ## Fields diff --git a/docs/models/operations/getmetadatabyratingkeymedia.md b/docs/models/operations/getmetadatabyratingkeymedia.md new file mode 100644 index 0000000..0947452 --- /dev/null +++ b/docs/models/operations/getmetadatabyratingkeymedia.md @@ -0,0 +1,24 @@ +# GetMetaDataByRatingKeyMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 15 | +| `duration` | *Optional[int]* | :heavy_minus_sign: | N/A | 141417 | +| `bitrate` | *Optional[int]* | :heavy_minus_sign: | N/A | 2278 | +| `width` | *Optional[int]* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional[int]* | :heavy_minus_sign: | N/A | 814 | +| `aspect_ratio` | *Optional[float]* | :heavy_minus_sign: | N/A | 2.35 | +| `audio_channels` | *Optional[int]* | :heavy_minus_sign: | N/A | 2 | +| `audio_codec` | *Optional[str]* | :heavy_minus_sign: | N/A | aac | +| `video_codec` | *Optional[str]* | :heavy_minus_sign: | N/A | h264 | +| `video_resolution` | *Optional[str]* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional[str]* | :heavy_minus_sign: | N/A | mp4 | +| `video_frame_rate` | *Optional[str]* | :heavy_minus_sign: | N/A | 24p | +| `optimized_for_streaming` | *Optional[int]* | :heavy_minus_sign: | N/A | 0 | +| `audio_profile` | *Optional[str]* | :heavy_minus_sign: | N/A | lc | +| `has64bit_offsets` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `video_profile` | *Optional[str]* | :heavy_minus_sign: | N/A | high | +| `part` | List[[operations.GetMetaDataByRatingKeyPart](../../models/operations/getmetadatabyratingkeypart.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatabyratingkeymediacontainer.md b/docs/models/operations/getmetadatabyratingkeymediacontainer.md new file mode 100644 index 0000000..e2518c6 --- /dev/null +++ b/docs/models/operations/getmetadatabyratingkeymediacontainer.md @@ -0,0 +1,16 @@ +# GetMetaDataByRatingKeyMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | +| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | +| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | +| `library_section_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | +| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1698860922 | +| `metadata` | List[[operations.GetMetaDataByRatingKeyMetadata](../../models/operations/getmetadatabyratingkeymetadata.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatametadata.md b/docs/models/operations/getmetadatabyratingkeymetadata.md similarity index 98% rename from docs/models/operations/getmetadatametadata.md rename to docs/models/operations/getmetadatabyratingkeymetadata.md index bd59f27..280537d 100644 --- a/docs/models/operations/getmetadatametadata.md +++ b/docs/models/operations/getmetadatabyratingkeymetadata.md @@ -1,4 +1,4 @@ -# GetMetadataMetadata +# GetMetaDataByRatingKeyMetadata ## Fields @@ -29,12 +29,12 @@ | `audience_rating_image` | *Optional[str]* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | | `has_premium_primary_extra` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 | | `rating_image` | *Optional[str]* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | List[[operations.GetMetadataMedia](../../models/operations/getmetadatamedia.md)] | :heavy_minus_sign: | N/A | | -| `genre` | List[[operations.GetMetadataGenre](../../models/operations/getmetadatagenre.md)] | :heavy_minus_sign: | N/A | | -| `country` | List[[operations.GetMetadataCountry](../../models/operations/getmetadatacountry.md)] | :heavy_minus_sign: | N/A | | +| `media` | List[[operations.GetMetaDataByRatingKeyMedia](../../models/operations/getmetadatabyratingkeymedia.md)] | :heavy_minus_sign: | N/A | | +| `genre` | List[[operations.GetMetaDataByRatingKeyGenre](../../models/operations/getmetadatabyratingkeygenre.md)] | :heavy_minus_sign: | N/A | | +| `country` | List[[operations.GetMetaDataByRatingKeyCountry](../../models/operations/getmetadatabyratingkeycountry.md)] | :heavy_minus_sign: | N/A | | | `guids` | List[[operations.Guids](../../models/operations/guids.md)] | :heavy_minus_sign: | N/A | | | `ratings` | List[[operations.Ratings](../../models/operations/ratings.md)] | :heavy_minus_sign: | N/A | | -| `director` | List[[operations.GetMetadataDirector](../../models/operations/getmetadatadirector.md)] | :heavy_minus_sign: | N/A | | -| `writer` | List[[operations.GetMetadataWriter](../../models/operations/getmetadatawriter.md)] | :heavy_minus_sign: | N/A | | -| `role` | List[[operations.GetMetadataRole](../../models/operations/getmetadatarole.md)] | :heavy_minus_sign: | N/A | | +| `director` | List[[operations.GetMetaDataByRatingKeyDirector](../../models/operations/getmetadatabyratingkeydirector.md)] | :heavy_minus_sign: | N/A | | +| `writer` | List[[operations.GetMetaDataByRatingKeyWriter](../../models/operations/getmetadatabyratingkeywriter.md)] | :heavy_minus_sign: | N/A | | +| `role` | List[[operations.GetMetaDataByRatingKeyRole](../../models/operations/getmetadatabyratingkeyrole.md)] | :heavy_minus_sign: | N/A | | | `producer` | List[[operations.Producer](../../models/operations/producer.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatapart.md b/docs/models/operations/getmetadatabyratingkeypart.md similarity index 99% rename from docs/models/operations/getmetadatapart.md rename to docs/models/operations/getmetadatabyratingkeypart.md index ceb1207..dad51de 100644 --- a/docs/models/operations/getmetadatapart.md +++ b/docs/models/operations/getmetadatabyratingkeypart.md @@ -1,4 +1,4 @@ -# GetMetadataPart +# GetMetaDataByRatingKeyPart ## Fields diff --git a/docs/models/operations/getmetadatarequest.md b/docs/models/operations/getmetadatabyratingkeyrequest.md similarity index 51% rename from docs/models/operations/getmetadatarequest.md rename to docs/models/operations/getmetadatabyratingkeyrequest.md index b2761e6..0e283ab 100644 --- a/docs/models/operations/getmetadatarequest.md +++ b/docs/models/operations/getmetadatabyratingkeyrequest.md @@ -1,8 +1,8 @@ -# GetMetadataRequest +# GetMetaDataByRatingKeyRequest ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `rating_key` | *int* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | \ No newline at end of file diff --git a/docs/models/operations/getmetadatabyratingkeyresponse.md b/docs/models/operations/getmetadatabyratingkeyresponse.md new file mode 100644 index 0000000..08f84d7 --- /dev/null +++ b/docs/models/operations/getmetadatabyratingkeyresponse.md @@ -0,0 +1,11 @@ +# GetMetaDataByRatingKeyResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetMetaDataByRatingKeyResponseBody]](../../models/operations/getmetadatabyratingkeyresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/models/operations/getmetadatabyratingkeyresponsebody.md b/docs/models/operations/getmetadatabyratingkeyresponsebody.md new file mode 100644 index 0000000..a7d34c6 --- /dev/null +++ b/docs/models/operations/getmetadatabyratingkeyresponsebody.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyResponseBody + +The metadata of the library item. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `media_container` | [Optional[operations.GetMetaDataByRatingKeyMediaContainer]](../../models/operations/getmetadatabyratingkeymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmetadatarole.md b/docs/models/operations/getmetadatabyratingkeyrole.md similarity index 99% rename from docs/models/operations/getmetadatarole.md rename to docs/models/operations/getmetadatabyratingkeyrole.md index fb7d5da..e3c5bd9 100644 --- a/docs/models/operations/getmetadatarole.md +++ b/docs/models/operations/getmetadatabyratingkeyrole.md @@ -1,4 +1,4 @@ -# GetMetadataRole +# GetMetaDataByRatingKeyRole ## Fields diff --git a/docs/models/operations/getmetadatawriter.md b/docs/models/operations/getmetadatabyratingkeywriter.md similarity index 98% rename from docs/models/operations/getmetadatawriter.md rename to docs/models/operations/getmetadatabyratingkeywriter.md index b2bcc5f..f780784 100644 --- a/docs/models/operations/getmetadatawriter.md +++ b/docs/models/operations/getmetadatabyratingkeywriter.md @@ -1,4 +1,4 @@ -# GetMetadataWriter +# GetMetaDataByRatingKeyWriter ## Fields diff --git a/docs/models/operations/getmetadatachildrenresponse.md b/docs/models/operations/getmetadatachildrenresponse.md index 8ab7303..2397b6e 100644 --- a/docs/models/operations/getmetadatachildrenresponse.md +++ b/docs/models/operations/getmetadatachildrenresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetMetadataChildrenResponseBody]](../../models/operations/getmetadatachildrenresponsebody.md) | :heavy_minus_sign: | The children of the library item. | \ No newline at end of file diff --git a/docs/models/operations/getmetadatamedia.md b/docs/models/operations/getmetadatamedia.md deleted file mode 100644 index c2ac19a..0000000 --- a/docs/models/operations/getmetadatamedia.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetMetadataMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 15 | -| `duration` | *Optional[int]* | :heavy_minus_sign: | N/A | 141417 | -| `bitrate` | *Optional[int]* | :heavy_minus_sign: | N/A | 2278 | -| `width` | *Optional[int]* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *Optional[int]* | :heavy_minus_sign: | N/A | 814 | -| `aspect_ratio` | *Optional[float]* | :heavy_minus_sign: | N/A | 2.35 | -| `audio_channels` | *Optional[int]* | :heavy_minus_sign: | N/A | 2 | -| `audio_codec` | *Optional[str]* | :heavy_minus_sign: | N/A | aac | -| `video_codec` | *Optional[str]* | :heavy_minus_sign: | N/A | h264 | -| `video_resolution` | *Optional[str]* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *Optional[str]* | :heavy_minus_sign: | N/A | mp4 | -| `video_frame_rate` | *Optional[str]* | :heavy_minus_sign: | N/A | 24p | -| `optimized_for_streaming` | *Optional[int]* | :heavy_minus_sign: | N/A | 0 | -| `audio_profile` | *Optional[str]* | :heavy_minus_sign: | N/A | lc | -| `has64bit_offsets` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `video_profile` | *Optional[str]* | :heavy_minus_sign: | N/A | high | -| `part` | List[[operations.GetMetadataPart](../../models/operations/getmetadatapart.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatamediacontainer.md b/docs/models/operations/getmetadatamediacontainer.md deleted file mode 100644 index 4c2419a..0000000 --- a/docs/models/operations/getmetadatamediacontainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetMetadataMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | -| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | -| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies | -| `library_section_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | -| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1698860922 | -| `metadata` | List[[operations.GetMetadataMetadata](../../models/operations/getmetadatametadata.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadataresponse.md b/docs/models/operations/getmetadataresponse.md deleted file mode 100644 index 0e88ed4..0000000 --- a/docs/models/operations/getmetadataresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMetadataResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetMetadataResponseBody]](../../models/operations/getmetadataresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/models/operations/getmyplexaccountresponse.md b/docs/models/operations/getmyplexaccountresponse.md index 74dfeb3..2e714cf 100644 --- a/docs/models/operations/getmyplexaccountresponse.md +++ b/docs/models/operations/getmyplexaccountresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetMyPlexAccountResponseBody]](../../models/operations/getmyplexaccountresponsebody.md) | :heavy_minus_sign: | MyPlex Account | \ No newline at end of file diff --git a/docs/models/operations/getondeckresponse.md b/docs/models/operations/getondeckresponse.md index 243d9a8..545f9ca 100644 --- a/docs/models/operations/getondeckresponse.md +++ b/docs/models/operations/getondeckresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetOnDeckResponseBody]](../../models/operations/getondeckresponsebody.md) | :heavy_minus_sign: | The on Deck content | \ No newline at end of file diff --git a/docs/models/operations/getpinauthpincontainer.md b/docs/models/operations/getpinauthpincontainer.md new file mode 100644 index 0000000..7fffbe3 --- /dev/null +++ b/docs/models/operations/getpinauthpincontainer.md @@ -0,0 +1,21 @@ +# GetPinAuthPinContainer + +Requests a new pin id used in the authentication flow + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | N/A | 308667304 | +| `code` | *str* | :heavy_check_mark: | N/A | 7RQZ | +| `product` | *str* | :heavy_check_mark: | N/A | 0 | +| `qr` | *str* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | +| `client_identifier` | *str* | :heavy_check_mark: | The X-Client-Identifier used in the request | | +| `location` | [operations.GeoData](../../models/operations/geodata.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | +| `trusted` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `expires_in` | *Optional[int]* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | +| `auth_token` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | | +| `new_registration` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getpinglobals.md b/docs/models/operations/getpinglobals.md index 519d677..2c8d93c 100644 --- a/docs/models/operations/getpinglobals.md +++ b/docs/models/operations/getpinglobals.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_plex_client_identifier` | *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)
| Postman | \ No newline at end of file +| `x_plex_client_identifier` | *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/getpinrequest.md b/docs/models/operations/getpinrequest.md index 642a2f7..d946355 100644 --- a/docs/models/operations/getpinrequest.md +++ b/docs/models/operations/getpinrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_plex_product` | *str* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `strong` | *Optional[bool]* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `x_plex_client_identifier` | *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)
| Postman | \ No newline at end of file +| `x_plex_client_identifier` | *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 | +| `x_plex_product` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Web | \ No newline at end of file diff --git a/docs/models/operations/getpinresponse.md b/docs/models/operations/getpinresponse.md index 7d0f69d..628bb01 100644 --- a/docs/models/operations/getpinresponse.md +++ b/docs/models/operations/getpinresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetPinResponseBody]](../../models/operations/getpinresponsebody.md) | :heavy_minus_sign: | The Pin | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `auth_pin_container` | [Optional[operations.GetPinAuthPinContainer]](../../models/operations/getpinauthpincontainer.md) | :heavy_minus_sign: | Requests a new pin id used in the authentication flow | {
"id": 308667304,
"code": "7RQZ",
"product": "0",
"trusted": false,
"qr": "https://plex.tv/api/v2/pins/qr/7RQZ",
"clientIdentifier": "string",
"location": {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
},
"expiresIn": 876,
"createdAt": "2024-07-16T17:03:05Z",
"expiresAt": "2024-07-16T17:18:05Z",
"authToken": null,
"newRegistration": null
} | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsqueryparamtype.md b/docs/models/operations/getplaylistcontentsqueryparamtype.md new file mode 100644 index 0000000..e6e4dc8 --- /dev/null +++ b/docs/models/operations/getplaylistcontentsqueryparamtype.md @@ -0,0 +1,19 @@ +# GetPlaylistContentsQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| ------- | ------- | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsrequest.md b/docs/models/operations/getplaylistcontentsrequest.md index b5240cb..ed7c0fa 100644 --- a/docs/models/operations/getplaylistcontentsrequest.md +++ b/docs/models/operations/getplaylistcontentsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | -| `type` | *float* | :heavy_check_mark: | the metadata type of the item to return | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | | +| `type` | [operations.GetPlaylistContentsQueryParamType](../../models/operations/getplaylistcontentsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsresponse.md b/docs/models/operations/getplaylistcontentsresponse.md index d498734..d3159b4 100644 --- a/docs/models/operations/getplaylistcontentsresponse.md +++ b/docs/models/operations/getplaylistcontentsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetPlaylistContentsResponseBody]](../../models/operations/getplaylistcontentsresponsebody.md) | :heavy_minus_sign: | The playlist contents | \ No newline at end of file diff --git a/docs/models/operations/getplaylistresponse.md b/docs/models/operations/getplaylistresponse.md index 5b6b372..8eeaa73 100644 --- a/docs/models/operations/getplaylistresponse.md +++ b/docs/models/operations/getplaylistresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetPlaylistResponseBody]](../../models/operations/getplaylistresponsebody.md) | :heavy_minus_sign: | The playlist | \ No newline at end of file diff --git a/docs/models/operations/getplaylistsresponse.md b/docs/models/operations/getplaylistsresponse.md index 254eb4a..474f9de 100644 --- a/docs/models/operations/getplaylistsresponse.md +++ b/docs/models/operations/getplaylistsresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetPlaylistsResponseBody]](../../models/operations/getplaylistsresponsebody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedrequest.md b/docs/models/operations/getrecentlyaddedrequest.md new file mode 100644 index 0000000..87ab7bf --- /dev/null +++ b/docs/models/operations/getrecentlyaddedrequest.md @@ -0,0 +1,9 @@ +# GetRecentlyAddedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedresponse.md b/docs/models/operations/getrecentlyaddedresponse.md index 8794c6f..db317e8 100644 --- a/docs/models/operations/getrecentlyaddedresponse.md +++ b/docs/models/operations/getrecentlyaddedresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetRecentlyAddedResponseBody]](../../models/operations/getrecentlyaddedresponsebody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file diff --git a/docs/models/operations/getrefreshlibrarymetadatarequest.md b/docs/models/operations/getrefreshlibrarymetadatarequest.md new file mode 100644 index 0000000..0048d64 --- /dev/null +++ b/docs/models/operations/getrefreshlibrarymetadatarequest.md @@ -0,0 +1,9 @@ +# GetRefreshLibraryMetadataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `force` | [Optional[operations.Force]](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | \ No newline at end of file diff --git a/docs/models/operations/getrefreshlibrarymetadataresponse.md b/docs/models/operations/getrefreshlibrarymetadataresponse.md new file mode 100644 index 0000000..1c5763e --- /dev/null +++ b/docs/models/operations/getrefreshlibrarymetadataresponse.md @@ -0,0 +1,10 @@ +# GetRefreshLibraryMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getresizedphotoresponse.md b/docs/models/operations/getresizedphotoresponse.md index 33a3ee9..1eeeb08 100644 --- a/docs/models/operations/getresizedphotoresponse.md +++ b/docs/models/operations/getresizedphotoresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getresourcesstatisticsresponse.md b/docs/models/operations/getresourcesstatisticsresponse.md index aa219c2..b49ba09 100644 --- a/docs/models/operations/getresourcesstatisticsresponse.md +++ b/docs/models/operations/getresourcesstatisticsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetResourcesStatisticsResponseBody]](../../models/operations/getresourcesstatisticsresponsebody.md) | :heavy_minus_sign: | Resource Statistics | \ No newline at end of file diff --git a/docs/models/operations/getsearchlibrarymediacontainer.md b/docs/models/operations/getsearchlibrarymediacontainer.md new file mode 100644 index 0000000..b5448f8 --- /dev/null +++ b/docs/models/operations/getsearchlibrarymediacontainer.md @@ -0,0 +1,20 @@ +# GetSearchLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 2 | +| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | +| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1698860922 | +| `nocache` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/show.png | +| `title1` | *Optional[str]* | :heavy_minus_sign: | N/A | TV Shows | +| `title2` | *Optional[str]* | :heavy_minus_sign: | N/A | Search for '' | +| `view_group` | *Optional[str]* | :heavy_minus_sign: | N/A | season | +| `view_mode` | *Optional[int]* | :heavy_minus_sign: | N/A | 65593 | +| `metadata` | List[[operations.GetSearchLibraryMetadata](../../models/operations/getsearchlibrarymetadata.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/searchlibrarymetadata.md b/docs/models/operations/getsearchlibrarymetadata.md similarity index 99% rename from docs/models/operations/searchlibrarymetadata.md rename to docs/models/operations/getsearchlibrarymetadata.md index f8802d1..2c418e4 100644 --- a/docs/models/operations/searchlibrarymetadata.md +++ b/docs/models/operations/getsearchlibrarymetadata.md @@ -1,4 +1,4 @@ -# SearchLibraryMetadata +# GetSearchLibraryMetadata ## Fields diff --git a/docs/models/operations/getsearchlibraryrequest.md b/docs/models/operations/getsearchlibraryrequest.md new file mode 100644 index 0000000..20314fa --- /dev/null +++ b/docs/models/operations/getsearchlibraryrequest.md @@ -0,0 +1,9 @@ +# GetSearchLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/getsearchlibraryresponse.md b/docs/models/operations/getsearchlibraryresponse.md new file mode 100644 index 0000000..5cc9d1c --- /dev/null +++ b/docs/models/operations/getsearchlibraryresponse.md @@ -0,0 +1,11 @@ +# GetSearchLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetSearchLibraryResponseBody]](../../models/operations/getsearchlibraryresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/models/operations/getsearchlibraryresponsebody.md b/docs/models/operations/getsearchlibraryresponsebody.md new file mode 100644 index 0000000..e735587 --- /dev/null +++ b/docs/models/operations/getsearchlibraryresponsebody.md @@ -0,0 +1,10 @@ +# GetSearchLibraryResponseBody + +The contents of the library by section and type + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `media_container` | [Optional[operations.GetSearchLibraryMediaContainer]](../../models/operations/getsearchlibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsresponse.md b/docs/models/operations/getsearchresultsresponse.md index c55f125..3ec9265 100644 --- a/docs/models/operations/getsearchresultsresponse.md +++ b/docs/models/operations/getsearchresultsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetSearchResultsResponseBody]](../../models/operations/getsearchresultsresponsebody.md) | :heavy_minus_sign: | Search Results | \ No newline at end of file diff --git a/docs/models/operations/getserveractivitiesresponse.md b/docs/models/operations/getserveractivitiesresponse.md index ff7d925..23aaa87 100644 --- a/docs/models/operations/getserveractivitiesresponse.md +++ b/docs/models/operations/getserveractivitiesresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetServerActivitiesResponseBody]](../../models/operations/getserveractivitiesresponsebody.md) | :heavy_minus_sign: | The Server Activities | \ No newline at end of file diff --git a/docs/models/operations/getservercapabilitiesresponse.md b/docs/models/operations/getservercapabilitiesresponse.md index 6d2c323..173dccf 100644 --- a/docs/models/operations/getservercapabilitiesresponse.md +++ b/docs/models/operations/getservercapabilitiesresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetServerCapabilitiesResponseBody]](../../models/operations/getservercapabilitiesresponsebody.md) | :heavy_minus_sign: | The Server Capabilities | \ No newline at end of file diff --git a/docs/models/operations/getserveridentityresponse.md b/docs/models/operations/getserveridentityresponse.md index b6b8833..de7b493 100644 --- a/docs/models/operations/getserveridentityresponse.md +++ b/docs/models/operations/getserveridentityresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetServerIdentityResponseBody]](../../models/operations/getserveridentityresponsebody.md) | :heavy_minus_sign: | The Server Identity information | \ No newline at end of file diff --git a/docs/models/operations/getserverlistresponse.md b/docs/models/operations/getserverlistresponse.md index ab7d986..0303454 100644 --- a/docs/models/operations/getserverlistresponse.md +++ b/docs/models/operations/getserverlistresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetServerListResponseBody]](../../models/operations/getserverlistresponsebody.md) | :heavy_minus_sign: | List of Servers | \ No newline at end of file diff --git a/docs/models/operations/getserverpreferencesresponse.md b/docs/models/operations/getserverpreferencesresponse.md index 8907f64..3caa8f4 100644 --- a/docs/models/operations/getserverpreferencesresponse.md +++ b/docs/models/operations/getserverpreferencesresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetServerPreferencesResponseBody]](../../models/operations/getserverpreferencesresponsebody.md) | :heavy_minus_sign: | Server Preferences | \ 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..193f78f --- /dev/null +++ b/docs/models/operations/getserverresourcesglobals.md @@ -0,0 +1,8 @@ +# GetServerResourcesGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_client_identifier` | *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 new file mode 100644 index 0000000..e58d150 --- /dev/null +++ b/docs/models/operations/getserverresourcesrequest.md @@ -0,0 +1,12 @@ +# GetServerResourcesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `x_plex_client_identifier` | *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 | +| `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 diff --git a/docs/models/operations/getserverresourcesresponse.md b/docs/models/operations/getserverresourcesresponse.md new file mode 100644 index 0000000..aa86ae4 --- /dev/null +++ b/docs/models/operations/getserverresourcesresponse.md @@ -0,0 +1,11 @@ +# GetServerResourcesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `plex_devices` | List[[operations.PlexDevice](../../models/operations/plexdevice.md)] | :heavy_minus_sign: | List of Plex Devices. This includes Plex hosted servers and clients | \ No newline at end of file diff --git a/docs/models/operations/getsessionhistoryrequest.md b/docs/models/operations/getsessionhistoryrequest.md index 3a05ca4..0699f9c 100644 --- a/docs/models/operations/getsessionhistoryrequest.md +++ b/docs/models/operations/getsessionhistoryrequest.md @@ -7,5 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sort` | *Optional[str]* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | | `account_id` | *Optional[int]* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `filter_` | [Optional[operations.Filter]](../../models/operations/filter_.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | +| `filter_` | [Optional[operations.QueryParamFilter]](../../models/operations/queryparamfilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | | `library_section_id` | *Optional[int]* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | \ No newline at end of file diff --git a/docs/models/operations/getsessionhistoryresponse.md b/docs/models/operations/getsessionhistoryresponse.md index 67c3d90..273575a 100644 --- a/docs/models/operations/getsessionhistoryresponse.md +++ b/docs/models/operations/getsessionhistoryresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetSessionHistoryResponseBody]](../../models/operations/getsessionhistoryresponsebody.md) | :heavy_minus_sign: | List of Plex Sessions | \ No newline at end of file diff --git a/docs/models/operations/getsessionsresponse.md b/docs/models/operations/getsessionsresponse.md index b91c7bf..16ff237 100644 --- a/docs/models/operations/getsessionsresponse.md +++ b/docs/models/operations/getsessionsresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetSessionsResponseBody]](../../models/operations/getsessionsresponsebody.md) | :heavy_minus_sign: | List of Active Plex Sessions | \ No newline at end of file diff --git a/docs/models/operations/getsourceconnectioninformationresponse.md b/docs/models/operations/getsourceconnectioninformationresponse.md index f041f06..3f49272 100644 --- a/docs/models/operations/getsourceconnectioninformationresponse.md +++ b/docs/models/operations/getsourceconnectioninformationresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getstatisticsresponse.md b/docs/models/operations/getstatisticsresponse.md index 8e0c09e..d495e8d 100644 --- a/docs/models/operations/getstatisticsresponse.md +++ b/docs/models/operations/getstatisticsresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetStatisticsResponseBody]](../../models/operations/getstatisticsresponsebody.md) | :heavy_minus_sign: | Media Statistics | \ No newline at end of file diff --git a/docs/models/operations/getthumbimagerequest.md b/docs/models/operations/getthumbimagerequest.md new file mode 100644 index 0000000..67083b5 --- /dev/null +++ b/docs/models/operations/getthumbimagerequest.md @@ -0,0 +1,13 @@ +# GetThumbImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `rating_key` | *int* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | +| `width` | *int* | :heavy_check_mark: | N/A | 396 | +| `height` | *int* | :heavy_check_mark: | N/A | 396 | +| `min_size` | *int* | :heavy_check_mark: | N/A | 1 | +| `upscale` | *int* | :heavy_check_mark: | N/A | 1 | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getthumbimageresponse.md b/docs/models/operations/getthumbimageresponse.md new file mode 100644 index 0000000..d8b0e65 --- /dev/null +++ b/docs/models/operations/getthumbimageresponse.md @@ -0,0 +1,12 @@ +# GetThumbImageResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successful response returning an image | \ No newline at end of file diff --git a/docs/models/operations/gettimelineresponse.md b/docs/models/operations/gettimelineresponse.md index 8bb136c..8bea94e 100644 --- a/docs/models/operations/gettimelineresponse.md +++ b/docs/models/operations/gettimelineresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettokenbypinidauthpincontainer.md b/docs/models/operations/gettokenbypinidauthpincontainer.md new file mode 100644 index 0000000..1614fac --- /dev/null +++ b/docs/models/operations/gettokenbypinidauthpincontainer.md @@ -0,0 +1,21 @@ +# GetTokenByPinIDAuthPinContainer + +The Pin with a non-null authToken when it has been verified by the user + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | N/A | 308667304 | +| `code` | *str* | :heavy_check_mark: | N/A | 7RQZ | +| `product` | *str* | :heavy_check_mark: | N/A | 0 | +| `qr` | *str* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | +| `client_identifier` | *str* | :heavy_check_mark: | The X-Client-Identifier used in the request | | +| `location` | [operations.GetTokenByPinIDGeoData](../../models/operations/gettokenbypinidgeodata.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | +| `trusted` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `expires_in` | *Optional[int]* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | +| `auth_token` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | | +| `new_registration` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettokenbypinidgeodata.md b/docs/models/operations/gettokenbypinidgeodata.md new file mode 100644 index 0000000..7d269c1 --- /dev/null +++ b/docs/models/operations/gettokenbypinidgeodata.md @@ -0,0 +1,20 @@ +# GetTokenByPinIDGeoData + +Geo location data + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | +| `continent_code` | *str* | :heavy_check_mark: | The continent code where the country is located. | NA | +| `country` | *str* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | +| `city` | *str* | :heavy_check_mark: | The name of the city. | Amsterdam | +| `time_zone` | *str* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | +| `postal_code` | *int* | :heavy_check_mark: | The postal code of the location. | 802 | +| `subdivisions` | *str* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | +| `coordinates` | *str* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | +| `european_union_member` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | +| `in_privacy_restricted_country` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | +| `in_privacy_restricted_region` | *Optional[bool]* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | \ No newline at end of file diff --git a/docs/models/operations/gettokenglobals.md b/docs/models/operations/gettokenbypinidglobals.md similarity index 94% rename from docs/models/operations/gettokenglobals.md rename to docs/models/operations/gettokenbypinidglobals.md index ecfb080..5c31c3d 100644 --- a/docs/models/operations/gettokenglobals.md +++ b/docs/models/operations/gettokenbypinidglobals.md @@ -1,8 +1,8 @@ -# GetTokenGlobals +# GetTokenByPinIDGlobals ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_plex_client_identifier` | *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)
| Postman | \ No newline at end of file +| `x_plex_client_identifier` | *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/gettokenrequest.md b/docs/models/operations/gettokenbypinidrequest.md similarity index 93% rename from docs/models/operations/gettokenrequest.md rename to docs/models/operations/gettokenbypinidrequest.md index dc1687a..271d149 100644 --- a/docs/models/operations/gettokenrequest.md +++ b/docs/models/operations/gettokenbypinidrequest.md @@ -1,9 +1,9 @@ -# GetTokenRequest +# GetTokenByPinIDRequest ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pin_id` | *str* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `x_plex_client_identifier` | *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)
| Postman | \ No newline at end of file +| `pin_id` | *int* | :heavy_check_mark: | The PinID to retrieve an access token for | | +| `x_plex_client_identifier` | *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/gettokenbypinidresponse.md b/docs/models/operations/gettokenbypinidresponse.md new file mode 100644 index 0000000..bccc75e --- /dev/null +++ b/docs/models/operations/gettokenbypinidresponse.md @@ -0,0 +1,11 @@ +# GetTokenByPinIDResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `auth_pin_container` | [Optional[operations.GetTokenByPinIDAuthPinContainer]](../../models/operations/gettokenbypinidauthpincontainer.md) | :heavy_minus_sign: | The Pin with a non-null authToken when it has been verified by the user | {
"id": 308667304,
"code": "7RQZ",
"product": "0",
"trusted": false,
"qr": "https://plex.tv/api/v2/pins/qr/7RQZ",
"clientIdentifier": "string",
"location": {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
},
"expiresIn": 876,
"createdAt": "2024-07-16T17:03:05Z",
"expiresAt": "2024-07-16T17:18:05Z",
"authToken": null,
"newRegistration": null
} | \ No newline at end of file diff --git a/docs/models/operations/gettokenlocation.md b/docs/models/operations/gettokenlocation.md deleted file mode 100644 index 04600f5..0000000 --- a/docs/models/operations/gettokenlocation.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTokenLocation - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[str]* | :heavy_minus_sign: | N/A | US | -| `european_union_member` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `continent_code` | *Optional[str]* | :heavy_minus_sign: | N/A | NA | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | United States | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | Austin | -| `time_zone` | *Optional[str]* | :heavy_minus_sign: | N/A | America/Chicago | -| `postal_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 78732 | -| `in_privacy_restricted_country` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `subdivisions` | *Optional[str]* | :heavy_minus_sign: | N/A | Texas | -| `coordinates` | *Optional[str]* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/models/operations/gettokenresponse.md b/docs/models/operations/gettokenresponse.md deleted file mode 100644 index 9062f07..0000000 --- a/docs/models/operations/gettokenresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetTokenResponseBody]](../../models/operations/gettokenresponsebody.md) | :heavy_minus_sign: | Access Token | \ No newline at end of file diff --git a/docs/models/operations/gettokenresponsebody.md b/docs/models/operations/gettokenresponsebody.md deleted file mode 100644 index 42cf6e3..0000000 --- a/docs/models/operations/gettokenresponsebody.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenResponseBody - -Access Token - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional[float]* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | -| `code` | *Optional[str]* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | -| `product` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Web | -| `trusted` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `qr` | *Optional[str]* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv
The QR code redirects to the relevant `plex.tv/link` authentication page
Which then prompts the user for the 4 Digit Link Pin
| https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t | -| `client_identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | Postman | -| `location` | [Optional[operations.GetTokenLocation]](../../models/operations/gettokenlocation.md) | :heavy_minus_sign: | N/A | | -| `expires_in` | *Optional[float]* | :heavy_minus_sign: | N/A | 1800 | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | -| `auth_token` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `new_registration` | *Optional[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentqueryparamtype.md b/docs/models/operations/gettopwatchedcontentqueryparamtype.md new file mode 100644 index 0000000..56ac05a --- /dev/null +++ b/docs/models/operations/gettopwatchedcontentqueryparamtype.md @@ -0,0 +1,19 @@ +# GetTopWatchedContentQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| ------- | ------- | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentrequest.md b/docs/models/operations/gettopwatchedcontentrequest.md index d2cd03f..f7c062d 100644 --- a/docs/models/operations/gettopwatchedcontentrequest.md +++ b/docs/models/operations/gettopwatchedcontentrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `type` | *int* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | | -| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentresponse.md b/docs/models/operations/gettopwatchedcontentresponse.md index e3c39d5..1841d49 100644 --- a/docs/models/operations/gettopwatchedcontentresponse.md +++ b/docs/models/operations/gettopwatchedcontentresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetTopWatchedContentResponseBody]](../../models/operations/gettopwatchedcontentresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/models/operations/gettranscodesessionsresponse.md b/docs/models/operations/gettranscodesessionsresponse.md index cbbbee2..8e7a13a 100644 --- a/docs/models/operations/gettranscodesessionsresponse.md +++ b/docs/models/operations/gettranscodesessionsresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetTranscodeSessionsResponseBody]](../../models/operations/gettranscodesessionsresponsebody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/models/operations/gettransienttokenresponse.md b/docs/models/operations/gettransienttokenresponse.md index f9d76ec..da14eff 100644 --- a/docs/models/operations/gettransienttokenresponse.md +++ b/docs/models/operations/gettransienttokenresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getupdatestatusresponse.md b/docs/models/operations/getupdatestatusresponse.md index f609b4f..505d24e 100644 --- a/docs/models/operations/getupdatestatusresponse.md +++ b/docs/models/operations/getupdatestatusresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `object` | [Optional[operations.GetUpdateStatusResponseBody]](../../models/operations/getupdatestatusresponsebody.md) | :heavy_minus_sign: | The Server Updates | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsauthenticationresponsestatus.md b/docs/models/operations/getuserdetailsauthenticationresponsestatus.md new file mode 100644 index 0000000..7050ad2 --- /dev/null +++ b/docs/models/operations/getuserdetailsauthenticationresponsestatus.md @@ -0,0 +1,11 @@ +# GetUserDetailsAuthenticationResponseStatus + +String representation of subscriptionActive + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `INACTIVE` | Inactive | +| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsauthenticationstatus.md b/docs/models/operations/getuserdetailsauthenticationstatus.md new file mode 100644 index 0000000..2f89cda --- /dev/null +++ b/docs/models/operations/getuserdetailsauthenticationstatus.md @@ -0,0 +1,11 @@ +# GetUserDetailsAuthenticationStatus + +String representation of subscriptionActive + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `INACTIVE` | Inactive | +| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsfeatures.md b/docs/models/operations/getuserdetailsfeatures.md new file mode 100644 index 0000000..e3b2b6f --- /dev/null +++ b/docs/models/operations/getuserdetailsfeatures.md @@ -0,0 +1,66 @@ +# GetUserDetailsFeatures + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `ANDROID_DOLBY_VISION` | Android - Dolby Vision | +| `ANDROID_PI_P` | Android - PiP | +| `CU_SUNSET` | CU Sunset | +| `HRK_ENABLE_EUR` | HRK_enable_EUR | +| `TREBLE_SHOW_FEATURES` | TREBLE-show-features | +| `AD_COUNTDOWN_TIMER` | ad-countdown-timer | +| `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `AMAZON_LOOP_DEBUG` | amazon-loop-debug | +| `AVOD_AD_ANALYSIS` | avod-ad-analysis | +| `AVOD_NEW_MEDIA` | avod-new-media | +| `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `CLIENT_RADIO_STATIONS` | client-radio-stations | +| `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `COLLECTIONS` | collections | +| `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | +| `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | +| `COMPANIONS_SONOS` | companions_sonos | +| `CUSTOM_HOME_REMOVAL` | custom-home-removal | +| `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | +| `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DRM_SUPPORT` | drm_support | +| `EXCLUDE_RESTRICTIONS` | exclude restrictions | +| `FEDERATED_AUTH` | federated-auth | +| `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GUIDED_UPGRADE` | guided-upgrade | +| `HOME` | home | +| `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | +| `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | +| `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `KEEP_PAYMENT_METHOD` | keep-payment-method | +| `KEVIN_BACON` | kevin-bacon | +| `KOREA_CONSENT` | korea-consent | +| `LE_ISRG_ROOT_X1` | le_isrg_root_x1 | +| `LETS_ENCRYPT` | lets_encrypt | +| `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | +| `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | +| `LIVETV` | livetv | +| `METADATA_SEARCH` | metadata_search | +| `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | +| `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `PHOTOS_FAVORITES` | photos-favorites | +| `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PMS_HEALTH` | pms_health | +| `RADIO` | radio | +| `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | +| `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SHARED_SERVER_NOTIFICATION` | shared_server_notification | +| `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `TRANSCODER_CACHE` | transcoder_cache | +| `TUNER_SHARING` | tuner-sharing | +| `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | +| `UNSUPPORTEDTUNERS` | unsupportedtuners | +| `UPGRADE_3DS2` | upgrade-3ds2 | +| `VOD_SCHEMA` | vod-schema | +| `VOD_CLOUDFLARE` | vod_cloudflare | +| `WATCH_TOGETHER_INVITE` | watch-together-invite | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsrequest.md b/docs/models/operations/getuserdetailsrequest.md new file mode 100644 index 0000000..0628f7e --- /dev/null +++ b/docs/models/operations/getuserdetailsrequest.md @@ -0,0 +1,8 @@ +# GetUserDetailsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsresponse.md b/docs/models/operations/getuserdetailsresponse.md new file mode 100644 index 0000000..86595ba --- /dev/null +++ b/docs/models/operations/getuserdetailsresponse.md @@ -0,0 +1,11 @@ +# GetUserDetailsResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `user_plex_account` | [Optional[operations.GetUserDetailsUserPlexAccount]](../../models/operations/getuserdetailsuserplexaccount.md) | :heavy_minus_sign: | Logged in user details | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsstatus.md b/docs/models/operations/getuserdetailsstatus.md new file mode 100644 index 0000000..62cef4a --- /dev/null +++ b/docs/models/operations/getuserdetailsstatus.md @@ -0,0 +1,9 @@ +# GetUserDetailsStatus + + +## Values + +| Name | Value | +| --------- | --------- | +| `ONLINE` | online | +| `OFFLINE` | offline | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailssubscription.md b/docs/models/operations/getuserdetailssubscription.md new file mode 100644 index 0000000..9e4061e --- /dev/null +++ b/docs/models/operations/getuserdetailssubscription.md @@ -0,0 +1,13 @@ +# GetUserDetailsSubscription + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `features` | List[[operations.GetUserDetailsFeatures](../../models/operations/getuserdetailsfeatures.md)] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribed_at` | *OptionalNullable[str]* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [Optional[operations.GetUserDetailsAuthenticationResponseStatus]](../../models/operations/getuserdetailsauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `payment_service` | *OptionalNullable[str]* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/getuserdetailsuserplexaccount.md b/docs/models/operations/getuserdetailsuserplexaccount.md new file mode 100644 index 0000000..f03cb51 --- /dev/null +++ b/docs/models/operations/getuserdetailsuserplexaccount.md @@ -0,0 +1,49 @@ +# GetUserDetailsUserPlexAccount + +Logged in user details + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ads_consent` | *Nullable[bool]* | :heavy_check_mark: | Unknown | | +| `ads_consent_reminder_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Unknown | | +| `ads_consent_set_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Unknown | | +| `auth_token` | *str* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | +| `country` | *str* | :heavy_check_mark: | The account country | US | +| `email` | *str* | :heavy_check_mark: | The account email address | username@email.com | +| `friendly_name` | *str* | :heavy_check_mark: | Your account full name | friendlyUsername | +| `entitlements` | List[*str*] | :heavy_check_mark: | List of devices your allowed to use with this account | | +| `home_size` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | +| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | +| `joined_at` | *int* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `locale` | *Nullable[str]* | :heavy_check_mark: | The account locale | | +| `mailing_list_status` | [operations.MailingListStatus](../../models/operations/mailingliststatus.md) | :heavy_check_mark: | Your current mailing list status | | +| `max_home_size` | *int* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | +| `profile` | [operations.UserProfile](../../models/operations/userprofile.md) | :heavy_check_mark: | N/A | | +| `remember_expires_at` | *int* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `scrobble_types` | *str* | :heavy_check_mark: | Unknown | | +| `services` | List[[operations.Services](../../models/operations/services.md)] | :heavy_check_mark: | N/A | | +| `subscription` | [operations.Subscription](../../models/operations/subscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | | +| `subscription_description` | *Nullable[str]* | :heavy_check_mark: | Description of the Plex Pass subscription | | +| `subscriptions` | List[[operations.GetUserDetailsSubscription](../../models/operations/getuserdetailssubscription.md)] | :heavy_check_mark: | N/A | | +| `thumb` | *str* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | +| `title` | *str* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | +| `username` | *str* | :heavy_check_mark: | The account username | Username | +| `uuid` | *str* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | +| `anonymous` | *OptionalNullable[bool]* | :heavy_minus_sign: | Unknown | | +| `backup_codes_created` | *Optional[bool]* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | +| `confirmed` | *Optional[bool]* | :heavy_minus_sign: | If the account has been confirmed | | +| `email_only_auth` | *Optional[bool]* | :heavy_minus_sign: | If login with email only is enabled | | +| `experimental_features` | *Optional[bool]* | :heavy_minus_sign: | If experimental features are enabled | | +| `guest` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home guest user | | +| `has_password` | *Optional[bool]* | :heavy_minus_sign: | If the account has a password | | +| `home` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home user | | +| `home_admin` | *Optional[bool]* | :heavy_minus_sign: | If the account is the Plex Home admin | | +| `mailing_list_active` | *Optional[bool]* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | +| ~~`pin`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | +| `protected` | *Optional[bool]* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | +| `restricted` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home managed user | | +| `roles` | List[*str*] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | +| `two_factor_enabled` | *Optional[bool]* | :heavy_minus_sign: | If two-factor authentication is enabled | | \ No newline at end of file diff --git a/docs/models/operations/getuserfriendsresponse.md b/docs/models/operations/getuserfriendsresponse.md new file mode 100644 index 0000000..32758cc --- /dev/null +++ b/docs/models/operations/getuserfriendsresponse.md @@ -0,0 +1,11 @@ +# GetUserFriendsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `friends` | List[[operations.Friend](../../models/operations/friend.md)] | :heavy_minus_sign: | Friends Data | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistrequest.md b/docs/models/operations/getwatchlistrequest.md index 03df5ad..47835f4 100644 --- a/docs/models/operations/getwatchlistrequest.md +++ b/docs/models/operations/getwatchlistrequest.md @@ -1,16 +1,16 @@ -# GetWatchlistRequest +# GetWatchListRequest ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filter_` | [operations.PathParamFilter](../../models/operations/pathparamfilter.md) | :heavy_check_mark: | Filter | -| `x_plex_token` | *str* | :heavy_check_mark: | User Token | -| `sort` | *Optional[str]* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| -| `libtype` | [Optional[operations.Libtype]](../../models/operations/libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| -| `maxresults` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| -| `include_collections` | [Optional[operations.IncludeCollections]](../../models/operations/includecollections.md) | :heavy_minus_sign: | include collections in the results
| -| `include_external_media` | [Optional[operations.IncludeExternalMedia]](../../models/operations/includeexternalmedia.md) | :heavy_minus_sign: | include external media in the results
| -| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
| -| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `filter_` | [operations.Filter](../../models/operations/filter_.md) | :heavy_check_mark: | Filter | | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `sort` | *Optional[str]* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| | +| `libtype` | [Optional[operations.Libtype]](../../models/operations/libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| | +| `maxresults` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| | +| `include_collections` | [Optional[operations.IncludeCollections]](../../models/operations/includecollections.md) | :heavy_minus_sign: | include collections in the results
| | +| `include_external_media` | [Optional[operations.IncludeExternalMedia]](../../models/operations/includeexternalmedia.md) | :heavy_minus_sign: | include external media in the results
| | +| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistresponse.md b/docs/models/operations/getwatchlistresponse.md index c2fc5ac..b10a528 100644 --- a/docs/models/operations/getwatchlistresponse.md +++ b/docs/models/operations/getwatchlistresponse.md @@ -1,4 +1,4 @@ -# GetWatchlistResponse +# GetWatchListResponse ## Fields @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.GetWatchlistResponseBody]](../../models/operations/getwatchlistresponsebody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetWatchListResponseBody]](../../models/operations/getwatchlistresponsebody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistresponsebody.md b/docs/models/operations/getwatchlistresponsebody.md index 97bacca..7ad64e0 100644 --- a/docs/models/operations/getwatchlistresponsebody.md +++ b/docs/models/operations/getwatchlistresponsebody.md @@ -1,4 +1,4 @@ -# GetWatchlistResponseBody +# GetWatchListResponseBody Watchlist Data diff --git a/docs/models/operations/includeguids.md b/docs/models/operations/includeguids.md new file mode 100644 index 0000000..47d1345 --- /dev/null +++ b/docs/models/operations/includeguids.md @@ -0,0 +1,12 @@ +# IncludeGuids + +Adds the Guids object to the response + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/includehttps.md b/docs/models/operations/includehttps.md new file mode 100644 index 0000000..81502b1 --- /dev/null +++ b/docs/models/operations/includehttps.md @@ -0,0 +1,11 @@ +# IncludeHTTPS + +Include Https entries in the results + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/includeipv6.md b/docs/models/operations/includeipv6.md new file mode 100644 index 0000000..8cc0f7f --- /dev/null +++ b/docs/models/operations/includeipv6.md @@ -0,0 +1,11 @@ +# IncludeIPv6 + +Include IPv6 entries in the results + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/includemeta.md b/docs/models/operations/includemeta.md new file mode 100644 index 0000000..4ef7e97 --- /dev/null +++ b/docs/models/operations/includemeta.md @@ -0,0 +1,12 @@ +# IncludeMeta + +Adds the Meta object to the response + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/includerelay.md b/docs/models/operations/includerelay.md new file mode 100644 index 0000000..a207a52 --- /dev/null +++ b/docs/models/operations/includerelay.md @@ -0,0 +1,13 @@ +# IncludeRelay + +Include Relay addresses in the results +E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/internalpaymentmethod.md b/docs/models/operations/internalpaymentmethod.md new file mode 100644 index 0000000..f1103c2 --- /dev/null +++ b/docs/models/operations/internalpaymentmethod.md @@ -0,0 +1,7 @@ +# InternalPaymentMethod + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/location.md b/docs/models/operations/location.md index 0f23d0f..21a8e22 100644 --- a/docs/models/operations/location.md +++ b/docs/models/operations/location.md @@ -3,15 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional[str]* | :heavy_minus_sign: | N/A | US | -| `european_union_member` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `continent_code` | *Optional[str]* | :heavy_minus_sign: | N/A | NA | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | United States | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | Austin | -| `time_zone` | *Optional[str]* | :heavy_minus_sign: | N/A | America/Chicago | -| `postal_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 78732 | -| `in_privacy_restricted_country` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `subdivisions` | *Optional[str]* | :heavy_minus_sign: | N/A | Texas | -| `coordinates` | *Optional[str]* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 | +| `path` | *Optional[str]* | :heavy_minus_sign: | N/A | /movies | \ No newline at end of file diff --git a/docs/models/operations/loglineresponse.md b/docs/models/operations/loglineresponse.md index fdb87bd..8a15ce2 100644 --- a/docs/models/operations/loglineresponse.md +++ b/docs/models/operations/loglineresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/logmultilineresponse.md b/docs/models/operations/logmultilineresponse.md index 538bbe7..ffe4af9 100644 --- a/docs/models/operations/logmultilineresponse.md +++ b/docs/models/operations/logmultilineresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/mailingliststatus.md b/docs/models/operations/mailingliststatus.md new file mode 100644 index 0000000..272f38f --- /dev/null +++ b/docs/models/operations/mailingliststatus.md @@ -0,0 +1,11 @@ +# MailingListStatus + +Your current mailing list status + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `ACTIVE` | active | +| `UNSUBSCRIBED` | unsubscribed | \ No newline at end of file diff --git a/docs/models/operations/markplayedresponse.md b/docs/models/operations/markplayedresponse.md index d42b1e4..274adbf 100644 --- a/docs/models/operations/markplayedresponse.md +++ b/docs/models/operations/markplayedresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/markunplayedresponse.md b/docs/models/operations/markunplayedresponse.md index 3fd7eee..4f17ca8 100644 --- a/docs/models/operations/markunplayedresponse.md +++ b/docs/models/operations/markunplayedresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/mediaprovider.md b/docs/models/operations/mediaprovider.md new file mode 100644 index 0000000..1b94235 --- /dev/null +++ b/docs/models/operations/mediaprovider.md @@ -0,0 +1,12 @@ +# MediaProvider + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `types` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `protocols` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `feature` | List[[operations.Feature](../../models/operations/feature.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/mediareviewsvisibility.md b/docs/models/operations/mediareviewsvisibility.md new file mode 100644 index 0000000..ed29d5d --- /dev/null +++ b/docs/models/operations/mediareviewsvisibility.md @@ -0,0 +1,9 @@ +# MediaReviewsVisibility + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/searchlibrarymediacontainer.md b/docs/models/operations/pastsubscription.md similarity index 50% rename from docs/models/operations/searchlibrarymediacontainer.md rename to docs/models/operations/pastsubscription.md index e0927b5..24c5615 100644 --- a/docs/models/operations/searchlibrarymediacontainer.md +++ b/docs/models/operations/pastsubscription.md @@ -1,20 +1,22 @@ -# SearchLibraryMediaContainer +# PastSubscription ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 2 | -| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | -| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1698860922 | -| `nocache` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/show.png | -| `title1` | *Optional[str]* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *Optional[str]* | :heavy_minus_sign: | N/A | Search for '' | -| `view_group` | *Optional[str]* | :heavy_minus_sign: | N/A | season | -| `view_mode` | *Optional[int]* | :heavy_minus_sign: | N/A | 65593 | -| `metadata` | List[[operations.SearchLibraryMetadata](../../models/operations/searchlibrarymetadata.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `id` | *Nullable[str]* | :heavy_check_mark: | N/A | | +| `mode` | *Nullable[str]* | :heavy_check_mark: | N/A | | +| `renews_at` | *Nullable[int]* | :heavy_check_mark: | N/A | 1556281940 | +| `ends_at` | *Nullable[int]* | :heavy_check_mark: | N/A | 1556281940 | +| `type` | *str* | :heavy_check_mark: | N/A | plexpass | +| `transfer` | *Nullable[str]* | :heavy_check_mark: | N/A | | +| `state` | [operations.PostUsersSignInDataState](../../models/operations/postuserssignindatastate.md) | :heavy_check_mark: | N/A | ended | +| `billing` | [operations.Billing](../../models/operations/billing.md) | :heavy_check_mark: | N/A | | +| `canceled` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `grace_period` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `on_hold` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `can_reactivate` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `can_upgrade` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `can_downgrade` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `can_convert` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | \ No newline at end of file diff --git a/docs/models/operations/pathparamfilter.md b/docs/models/operations/pathparamfilter.md deleted file mode 100644 index f3d9441..0000000 --- a/docs/models/operations/pathparamfilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# PathParamFilter - -Filter - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ALL` | all | -| `AVAILABLE` | available | -| `RELEASED` | released | \ No newline at end of file diff --git a/docs/models/operations/performsearchresponse.md b/docs/models/operations/performsearchresponse.md index 707cbed..99638be 100644 --- a/docs/models/operations/performsearchresponse.md +++ b/docs/models/operations/performsearchresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/performvoicesearchresponse.md b/docs/models/operations/performvoicesearchresponse.md index f321efb..eae4055 100644 --- a/docs/models/operations/performvoicesearchresponse.md +++ b/docs/models/operations/performvoicesearchresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/pivot.md b/docs/models/operations/pivot.md new file mode 100644 index 0000000..d5d5d50 --- /dev/null +++ b/docs/models/operations/pivot.md @@ -0,0 +1,13 @@ +# Pivot + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `context` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `symbol` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/plexdevice.md b/docs/models/operations/plexdevice.md new file mode 100644 index 0000000..f75404d --- /dev/null +++ b/docs/models/operations/plexdevice.md @@ -0,0 +1,31 @@ +# PlexDevice + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `product` | *str* | :heavy_check_mark: | N/A | +| `product_version` | *str* | :heavy_check_mark: | N/A | +| `platform` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `platform_version` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `client_identifier` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `last_seen_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `provides` | *str* | :heavy_check_mark: | N/A | +| `owner_id` | *Nullable[int]* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | +| `source_title` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `public_address` | *str* | :heavy_check_mark: | N/A | +| `access_token` | *str* | :heavy_check_mark: | N/A | +| `owned` | *bool* | :heavy_check_mark: | N/A | +| `home` | *bool* | :heavy_check_mark: | N/A | +| `synced` | *bool* | :heavy_check_mark: | N/A | +| `relay` | *bool* | :heavy_check_mark: | N/A | +| `presence` | *bool* | :heavy_check_mark: | N/A | +| `https_required` | *bool* | :heavy_check_mark: | N/A | +| `public_address_matches` | *bool* | :heavy_check_mark: | N/A | +| `dns_rebinding_protection` | *bool* | :heavy_check_mark: | N/A | +| `nat_loopback_supported` | *bool* | :heavy_check_mark: | N/A | +| `connections` | List[[operations.Connections](../../models/operations/connections.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationfeatures.md b/docs/models/operations/postuserssignindataauthenticationfeatures.md new file mode 100644 index 0000000..48b4a79 --- /dev/null +++ b/docs/models/operations/postuserssignindataauthenticationfeatures.md @@ -0,0 +1,66 @@ +# PostUsersSignInDataAuthenticationFeatures + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `ANDROID_DOLBY_VISION` | Android - Dolby Vision | +| `ANDROID_PI_P` | Android - PiP | +| `CU_SUNSET` | CU Sunset | +| `HRK_ENABLE_EUR` | HRK_enable_EUR | +| `TREBLE_SHOW_FEATURES` | TREBLE-show-features | +| `AD_COUNTDOWN_TIMER` | ad-countdown-timer | +| `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `AMAZON_LOOP_DEBUG` | amazon-loop-debug | +| `AVOD_AD_ANALYSIS` | avod-ad-analysis | +| `AVOD_NEW_MEDIA` | avod-new-media | +| `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `CLIENT_RADIO_STATIONS` | client-radio-stations | +| `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `COLLECTIONS` | collections | +| `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | +| `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | +| `COMPANIONS_SONOS` | companions_sonos | +| `CUSTOM_HOME_REMOVAL` | custom-home-removal | +| `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | +| `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DRM_SUPPORT` | drm_support | +| `EXCLUDE_RESTRICTIONS` | exclude restrictions | +| `FEDERATED_AUTH` | federated-auth | +| `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GUIDED_UPGRADE` | guided-upgrade | +| `HOME` | home | +| `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | +| `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | +| `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `KEEP_PAYMENT_METHOD` | keep-payment-method | +| `KEVIN_BACON` | kevin-bacon | +| `KOREA_CONSENT` | korea-consent | +| `LE_ISRG_ROOT_X1` | le_isrg_root_x1 | +| `LETS_ENCRYPT` | lets_encrypt | +| `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | +| `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | +| `LIVETV` | livetv | +| `METADATA_SEARCH` | metadata_search | +| `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | +| `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `PHOTOS_FAVORITES` | photos-favorites | +| `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PMS_HEALTH` | pms_health | +| `RADIO` | radio | +| `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | +| `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SHARED_SERVER_NOTIFICATION` | shared_server_notification | +| `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `TRANSCODER_CACHE` | transcoder_cache | +| `TUNER_SHARING` | tuner-sharing | +| `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | +| `UNSUPPORTEDTUNERS` | unsupportedtuners | +| `UPGRADE_3DS2` | upgrade-3ds2 | +| `VOD_SCHEMA` | vod-schema | +| `VOD_CLOUDFLARE` | vod_cloudflare | +| `WATCH_TOGETHER_INVITE` | watch-together-invite | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationresponsestatus.md b/docs/models/operations/postuserssignindataauthenticationresponsestatus.md new file mode 100644 index 0000000..cbf43fc --- /dev/null +++ b/docs/models/operations/postuserssignindataauthenticationresponsestatus.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataAuthenticationResponseStatus + +String representation of subscriptionActive + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `INACTIVE` | Inactive | +| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationstatus.md b/docs/models/operations/postuserssignindataauthenticationstatus.md new file mode 100644 index 0000000..b0c9a81 --- /dev/null +++ b/docs/models/operations/postuserssignindataauthenticationstatus.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataAuthenticationStatus + +String representation of subscriptionActive + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `INACTIVE` | Inactive | +| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationsubscription.md b/docs/models/operations/postuserssignindataauthenticationsubscription.md new file mode 100644 index 0000000..6813c3c --- /dev/null +++ b/docs/models/operations/postuserssignindataauthenticationsubscription.md @@ -0,0 +1,13 @@ +# PostUsersSignInDataAuthenticationSubscription + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `features` | List[[operations.PostUsersSignInDataAuthenticationFeatures](../../models/operations/postuserssignindataauthenticationfeatures.md)] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribed_at` | *OptionalNullable[str]* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [Optional[operations.PostUsersSignInDataAuthenticationResponseStatus]](../../models/operations/postuserssignindataauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `payment_service` | *OptionalNullable[str]* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataautoselectsubtitle.md b/docs/models/operations/postuserssignindataautoselectsubtitle.md new file mode 100644 index 0000000..110ba43 --- /dev/null +++ b/docs/models/operations/postuserssignindataautoselectsubtitle.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataAutoSelectSubtitle + +The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatadefaultsubtitleaccessibility.md b/docs/models/operations/postuserssignindatadefaultsubtitleaccessibility.md new file mode 100644 index 0000000..fd7aebb --- /dev/null +++ b/docs/models/operations/postuserssignindatadefaultsubtitleaccessibility.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataDefaultSubtitleAccessibility + +The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatadefaultsubtitleforced.md b/docs/models/operations/postuserssignindatadefaultsubtitleforced.md new file mode 100644 index 0000000..7b918c1 --- /dev/null +++ b/docs/models/operations/postuserssignindatadefaultsubtitleforced.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataDefaultSubtitleForced + +The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatafeatures.md b/docs/models/operations/postuserssignindatafeatures.md new file mode 100644 index 0000000..9f4209b --- /dev/null +++ b/docs/models/operations/postuserssignindatafeatures.md @@ -0,0 +1,66 @@ +# PostUsersSignInDataFeatures + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `ANDROID_DOLBY_VISION` | Android - Dolby Vision | +| `ANDROID_PI_P` | Android - PiP | +| `CU_SUNSET` | CU Sunset | +| `HRK_ENABLE_EUR` | HRK_enable_EUR | +| `TREBLE_SHOW_FEATURES` | TREBLE-show-features | +| `AD_COUNTDOWN_TIMER` | ad-countdown-timer | +| `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `AMAZON_LOOP_DEBUG` | amazon-loop-debug | +| `AVOD_AD_ANALYSIS` | avod-ad-analysis | +| `AVOD_NEW_MEDIA` | avod-new-media | +| `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `CLIENT_RADIO_STATIONS` | client-radio-stations | +| `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `COLLECTIONS` | collections | +| `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | +| `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | +| `COMPANIONS_SONOS` | companions_sonos | +| `CUSTOM_HOME_REMOVAL` | custom-home-removal | +| `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | +| `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DRM_SUPPORT` | drm_support | +| `EXCLUDE_RESTRICTIONS` | exclude restrictions | +| `FEDERATED_AUTH` | federated-auth | +| `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GUIDED_UPGRADE` | guided-upgrade | +| `HOME` | home | +| `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | +| `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | +| `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `KEEP_PAYMENT_METHOD` | keep-payment-method | +| `KEVIN_BACON` | kevin-bacon | +| `KOREA_CONSENT` | korea-consent | +| `LE_ISRG_ROOT_X1` | le_isrg_root_x1 | +| `LETS_ENCRYPT` | lets_encrypt | +| `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | +| `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | +| `LIVETV` | livetv | +| `METADATA_SEARCH` | metadata_search | +| `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | +| `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `PHOTOS_FAVORITES` | photos-favorites | +| `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PMS_HEALTH` | pms_health | +| `RADIO` | radio | +| `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | +| `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SHARED_SERVER_NOTIFICATION` | shared_server_notification | +| `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `TRANSCODER_CACHE` | transcoder_cache | +| `TUNER_SHARING` | tuner-sharing | +| `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | +| `UNSUPPORTEDTUNERS` | unsupportedtuners | +| `UPGRADE_3DS2` | upgrade-3ds2 | +| `VOD_SCHEMA` | vod-schema | +| `VOD_CLOUDFLARE` | vod_cloudflare | +| `WATCH_TOGETHER_INVITE` | watch-together-invite | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataglobals.md b/docs/models/operations/postuserssignindataglobals.md new file mode 100644 index 0000000..28b73c9 --- /dev/null +++ b/docs/models/operations/postuserssignindataglobals.md @@ -0,0 +1,8 @@ +# PostUsersSignInDataGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_client_identifier` | *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/postuserssignindatamailingliststatus.md b/docs/models/operations/postuserssignindatamailingliststatus.md new file mode 100644 index 0000000..a01308e --- /dev/null +++ b/docs/models/operations/postuserssignindatamailingliststatus.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataMailingListStatus + +Your current mailing list status + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `ACTIVE` | active | +| `UNSUBSCRIBED` | unsubscribed | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatamediareviewsvisibility.md b/docs/models/operations/postuserssignindatamediareviewsvisibility.md new file mode 100644 index 0000000..5a357cc --- /dev/null +++ b/docs/models/operations/postuserssignindatamediareviewsvisibility.md @@ -0,0 +1,9 @@ +# PostUsersSignInDataMediaReviewsVisibility + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatarequest.md b/docs/models/operations/postuserssignindatarequest.md new file mode 100644 index 0000000..0862fde --- /dev/null +++ b/docs/models/operations/postuserssignindatarequest.md @@ -0,0 +1,9 @@ +# PostUsersSignInDataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_client_identifier` | *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 | +| `request_body` | [Optional[operations.PostUsersSignInDataRequestBody]](../../models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatarequestbody.md b/docs/models/operations/postuserssignindatarequestbody.md new file mode 100644 index 0000000..f5fde8b --- /dev/null +++ b/docs/models/operations/postuserssignindatarequestbody.md @@ -0,0 +1,13 @@ +# PostUsersSignInDataRequestBody + +Login credentials + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `login` | *str* | :heavy_check_mark: | N/A | username@email.com | +| `password` | *str* | :heavy_check_mark: | N/A | password123 | +| `remember_me` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `verification_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 123456 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataresponse.md b/docs/models/operations/postuserssignindataresponse.md new file mode 100644 index 0000000..96795c5 --- /dev/null +++ b/docs/models/operations/postuserssignindataresponse.md @@ -0,0 +1,11 @@ +# PostUsersSignInDataResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `user_plex_account` | [Optional[operations.PostUsersSignInDataUserPlexAccount]](../../models/operations/postuserssignindatauserplexaccount.md) | :heavy_minus_sign: | Returns the user account data with a valid auth token | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataservices.md b/docs/models/operations/postuserssignindataservices.md new file mode 100644 index 0000000..9c8405f --- /dev/null +++ b/docs/models/operations/postuserssignindataservices.md @@ -0,0 +1,12 @@ +# PostUsersSignInDataServices + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `identifier` | *str* | :heavy_check_mark: | N/A | metadata-dev | +| `endpoint` | *str* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | +| `token` | *Nullable[str]* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | +| `secret` | *Nullable[str]* | :heavy_check_mark: | N/A | | +| `status` | [operations.PostUsersSignInDataStatus](../../models/operations/postuserssignindatastatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatastate.md b/docs/models/operations/postuserssignindatastate.md new file mode 100644 index 0000000..d31f6b6 --- /dev/null +++ b/docs/models/operations/postuserssignindatastate.md @@ -0,0 +1,8 @@ +# PostUsersSignInDataState + + +## Values + +| Name | Value | +| ------- | ------- | +| `ENDED` | ended | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatastatus.md b/docs/models/operations/postuserssignindatastatus.md new file mode 100644 index 0000000..faa7686 --- /dev/null +++ b/docs/models/operations/postuserssignindatastatus.md @@ -0,0 +1,9 @@ +# PostUsersSignInDataStatus + + +## Values + +| Name | Value | +| --------- | --------- | +| `ONLINE` | online | +| `OFFLINE` | offline | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatasubscription.md b/docs/models/operations/postuserssignindatasubscription.md new file mode 100644 index 0000000..9f90485 --- /dev/null +++ b/docs/models/operations/postuserssignindatasubscription.md @@ -0,0 +1,15 @@ +# PostUsersSignInDataSubscription + +If the account’s Plex Pass subscription is active + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `features` | List[[operations.PostUsersSignInDataFeatures](../../models/operations/postuserssignindatafeatures.md)] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribed_at` | *OptionalNullable[str]* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [Optional[operations.PostUsersSignInDataAuthenticationStatus]](../../models/operations/postuserssignindataauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `payment_service` | *OptionalNullable[str]* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatauserplexaccount.md b/docs/models/operations/postuserssignindatauserplexaccount.md new file mode 100644 index 0000000..1a45c85 --- /dev/null +++ b/docs/models/operations/postuserssignindatauserplexaccount.md @@ -0,0 +1,51 @@ +# PostUsersSignInDataUserPlexAccount + +Returns the user account data with a valid auth token + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ads_consent` | *Nullable[bool]* | :heavy_check_mark: | Unknown | | +| `ads_consent_reminder_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Unknown | | +| `ads_consent_set_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Unknown | | +| `auth_token` | *str* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | +| `country` | *str* | :heavy_check_mark: | The account country | US | +| `email` | *str* | :heavy_check_mark: | The account email address | username@email.com | +| `friendly_name` | *str* | :heavy_check_mark: | Your account full name | friendlyUsername | +| `entitlements` | List[*str*] | :heavy_check_mark: | List of devices your allowed to use with this account | | +| `home_size` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | +| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | +| `joined_at` | *int* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `locale` | *Nullable[str]* | :heavy_check_mark: | The account locale | | +| `mailing_list_status` | [operations.PostUsersSignInDataMailingListStatus](../../models/operations/postuserssignindatamailingliststatus.md) | :heavy_check_mark: | Your current mailing list status | | +| `max_home_size` | *int* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | +| `profile` | [operations.PostUsersSignInDataUserProfile](../../models/operations/postuserssignindatauserprofile.md) | :heavy_check_mark: | N/A | | +| `remember_expires_at` | *int* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `scrobble_types` | *str* | :heavy_check_mark: | Unknown | | +| `services` | List[[operations.PostUsersSignInDataServices](../../models/operations/postuserssignindataservices.md)] | :heavy_check_mark: | N/A | | +| `subscription` | [operations.PostUsersSignInDataSubscription](../../models/operations/postuserssignindatasubscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | | +| `subscription_description` | *Nullable[str]* | :heavy_check_mark: | Description of the Plex Pass subscription | | +| `subscriptions` | List[[operations.PostUsersSignInDataAuthenticationSubscription](../../models/operations/postuserssignindataauthenticationsubscription.md)] | :heavy_check_mark: | N/A | | +| `thumb` | *str* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | +| `title` | *str* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | +| `username` | *str* | :heavy_check_mark: | The account username | Username | +| `uuid` | *str* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | +| `past_subscriptions` | List[[operations.PastSubscription](../../models/operations/pastsubscription.md)] | :heavy_check_mark: | N/A | | +| `trials` | List[[operations.Trials](../../models/operations/trials.md)] | :heavy_check_mark: | N/A | | +| `anonymous` | *OptionalNullable[bool]* | :heavy_minus_sign: | Unknown | | +| `backup_codes_created` | *Optional[bool]* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | +| `confirmed` | *Optional[bool]* | :heavy_minus_sign: | If the account has been confirmed | | +| `email_only_auth` | *Optional[bool]* | :heavy_minus_sign: | If login with email only is enabled | | +| `experimental_features` | *Optional[bool]* | :heavy_minus_sign: | If experimental features are enabled | | +| `guest` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home guest user | | +| `has_password` | *Optional[bool]* | :heavy_minus_sign: | If the account has a password | | +| `home` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home user | | +| `home_admin` | *Optional[bool]* | :heavy_minus_sign: | If the account is the Plex Home admin | | +| `mailing_list_active` | *Optional[bool]* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | +| ~~`pin`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | +| `protected` | *Optional[bool]* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | +| `restricted` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home managed user | | +| `roles` | List[*str*] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | +| `two_factor_enabled` | *Optional[bool]* | :heavy_minus_sign: | If two-factor authentication is enabled | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatauserprofile.md b/docs/models/operations/postuserssignindatauserprofile.md new file mode 100644 index 0000000..0d5f770 --- /dev/null +++ b/docs/models/operations/postuserssignindatauserprofile.md @@ -0,0 +1,15 @@ +# PostUsersSignInDataUserProfile + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `default_audio_language` | *Nullable[str]* | :heavy_check_mark: | The preferred audio language for the account | ja | +| `default_subtitle_language` | *Nullable[str]* | :heavy_check_mark: | The preferred subtitle language for the account | en | +| `auto_select_audio` | *Optional[bool]* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | +| `auto_select_subtitle` | [Optional[operations.PostUsersSignInDataAutoSelectSubtitle]](../../models/operations/postuserssignindataautoselectsubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 | +| `default_subtitle_accessibility` | [Optional[operations.PostUsersSignInDataDefaultSubtitleAccessibility]](../../models/operations/postuserssignindatadefaultsubtitleaccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 | +| `default_subtitle_forced` | [Optional[operations.PostUsersSignInDataDefaultSubtitleForced]](../../models/operations/postuserssignindatadefaultsubtitleforced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 | +| `watched_indicator` | [Optional[operations.PostUsersSignInDataWatchedIndicator]](../../models/operations/postuserssignindatawatchedindicator.md) | :heavy_minus_sign: | N/A | 1 | +| `media_reviews_visibility` | [Optional[operations.PostUsersSignInDataMediaReviewsVisibility]](../../models/operations/postuserssignindatamediareviewsvisibility.md) | :heavy_minus_sign: | N/A | 0 | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatawatchedindicator.md b/docs/models/operations/postuserssignindatawatchedindicator.md new file mode 100644 index 0000000..005b272 --- /dev/null +++ b/docs/models/operations/postuserssignindatawatchedindicator.md @@ -0,0 +1,9 @@ +# PostUsersSignInDataWatchedIndicator + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/queryparamfilter.md b/docs/models/operations/queryparamfilter.md new file mode 100644 index 0000000..7167549 --- /dev/null +++ b/docs/models/operations/queryparamfilter.md @@ -0,0 +1,11 @@ +# QueryParamFilter + +Filters content by field and direction/equality +(Unknown if viewedAt is the only supported column) + + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/queryparamforce.md b/docs/models/operations/queryparamforce.md new file mode 100644 index 0000000..1c7d938 --- /dev/null +++ b/docs/models/operations/queryparamforce.md @@ -0,0 +1,15 @@ +# QueryParamForce + +Force overwriting of duplicate playlists. +By default, a playlist file uploaded with the same path will overwrite the existing playlist. +The `force` argument is used to disable overwriting. +If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/queryparamtype.md b/docs/models/operations/queryparamtype.md index c72a4f7..326cf75 100644 --- a/docs/models/operations/queryparamtype.md +++ b/docs/models/operations/queryparamtype.md @@ -1,12 +1,19 @@ # QueryParamType -type of playlist to create +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + ## Values | Name | Value | | ------- | ------- | -| `AUDIO` | audio | -| `VIDEO` | video | -| `PHOTO` | photo | \ No newline at end of file +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/refreshlibraryrequest.md b/docs/models/operations/refreshlibraryrequest.md deleted file mode 100644 index 8f67ab3..0000000 --- a/docs/models/operations/refreshlibraryrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# RefreshLibraryRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to refresh | \ No newline at end of file diff --git a/docs/models/operations/refreshlibraryresponse.md b/docs/models/operations/refreshlibraryresponse.md deleted file mode 100644 index d492f6c..0000000 --- a/docs/models/operations/refreshlibraryresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# RefreshLibraryResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md new file mode 100644 index 0000000..304f907 --- /dev/null +++ b/docs/models/operations/responsebody.md @@ -0,0 +1,13 @@ +# ResponseBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `identifier` | *str* | :heavy_check_mark: | N/A | tv.plex.sonos | +| `base_url` | *str* | :heavy_check_mark: | N/A | https://sonos.plex.tv | +| `title` | *str* | :heavy_check_mark: | N/A | Sonos | +| `link_url` | *str* | :heavy_check_mark: | N/A | https://sonos.plex.tv/link | +| `provides` | *str* | :heavy_check_mark: | N/A | client,player | +| `token` | *str* | :heavy_check_mark: | The plex authtoken used to identify with | | \ No newline at end of file diff --git a/docs/models/operations/searchlibraryrequest.md b/docs/models/operations/searchlibraryrequest.md deleted file mode 100644 index 5633bbb..0000000 --- a/docs/models/operations/searchlibraryrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# SearchLibraryRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `section_id` | *int* | :heavy_check_mark: | the Id of the library to query | -| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for | \ No newline at end of file diff --git a/docs/models/operations/searchlibraryresponse.md b/docs/models/operations/searchlibraryresponse.md deleted file mode 100644 index 996fadc..0000000 --- a/docs/models/operations/searchlibraryresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchLibraryResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional[operations.SearchLibraryResponseBody]](../../models/operations/searchlibraryresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/models/operations/services.md b/docs/models/operations/services.md new file mode 100644 index 0000000..a1a8985 --- /dev/null +++ b/docs/models/operations/services.md @@ -0,0 +1,12 @@ +# Services + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `identifier` | *str* | :heavy_check_mark: | N/A | metadata-dev | +| `endpoint` | *str* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | +| `token` | *Nullable[str]* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | +| `secret` | *Nullable[str]* | :heavy_check_mark: | N/A | | +| `status` | [operations.GetUserDetailsStatus](../../models/operations/getuserdetailsstatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/models/operations/sharedservers.md b/docs/models/operations/sharedservers.md new file mode 100644 index 0000000..d787f3b --- /dev/null +++ b/docs/models/operations/sharedservers.md @@ -0,0 +1,7 @@ +# SharedServers + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/sharedsources.md b/docs/models/operations/sharedsources.md new file mode 100644 index 0000000..ca74299 --- /dev/null +++ b/docs/models/operations/sharedsources.md @@ -0,0 +1,7 @@ +# SharedSources + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/skip.md b/docs/models/operations/skip.md index 5e71f0e..8487d67 100644 --- a/docs/models/operations/skip.md +++ b/docs/models/operations/skip.md @@ -1,6 +1,6 @@ # Skip -Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. +Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. ## Values diff --git a/docs/models/operations/startalltasksresponse.md b/docs/models/operations/startalltasksresponse.md index 19de245..d67bba0 100644 --- a/docs/models/operations/startalltasksresponse.md +++ b/docs/models/operations/startalltasksresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/starttaskresponse.md b/docs/models/operations/starttaskresponse.md index f8e86f8..97190ee 100644 --- a/docs/models/operations/starttaskresponse.md +++ b/docs/models/operations/starttaskresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/startuniversaltranscoderesponse.md b/docs/models/operations/startuniversaltranscoderesponse.md index 91523b3..9d18870 100644 --- a/docs/models/operations/startuniversaltranscoderesponse.md +++ b/docs/models/operations/startuniversaltranscoderesponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/statisticsbandwidth.md b/docs/models/operations/statisticsbandwidth.md index 98dcd5e..7b73948 100644 --- a/docs/models/operations/statisticsbandwidth.md +++ b/docs/models/operations/statisticsbandwidth.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | | `account_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 238960586 | -| `device_id` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| `device_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 208 | | `timespan` | *Optional[int]* | :heavy_minus_sign: | N/A | 6 | | `at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1718387650 | | `lan` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | diff --git a/docs/models/operations/status.md b/docs/models/operations/status.md new file mode 100644 index 0000000..01a1539 --- /dev/null +++ b/docs/models/operations/status.md @@ -0,0 +1,10 @@ +# Status + +Current friend request status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACCEPTED` | accepted | \ No newline at end of file diff --git a/docs/models/operations/stopalltasksresponse.md b/docs/models/operations/stopalltasksresponse.md index 4ea49fb..647ee54 100644 --- a/docs/models/operations/stopalltasksresponse.md +++ b/docs/models/operations/stopalltasksresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/stoptaskresponse.md b/docs/models/operations/stoptaskresponse.md index e1ca15e..2d89381 100644 --- a/docs/models/operations/stoptaskresponse.md +++ b/docs/models/operations/stoptaskresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/stoptranscodesessionresponse.md b/docs/models/operations/stoptranscodesessionresponse.md index 0e4c505..d8c8c35 100644 --- a/docs/models/operations/stoptranscodesessionresponse.md +++ b/docs/models/operations/stoptranscodesessionresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/subscription.md b/docs/models/operations/subscription.md new file mode 100644 index 0000000..c2a350f --- /dev/null +++ b/docs/models/operations/subscription.md @@ -0,0 +1,15 @@ +# Subscription + +If the account’s Plex Pass subscription is active + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `features` | List[[operations.Features](../../models/operations/features.md)] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribed_at` | *OptionalNullable[str]* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [Optional[operations.GetUserDetailsAuthenticationStatus]](../../models/operations/getuserdetailsauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `payment_service` | *OptionalNullable[str]* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/trials.md b/docs/models/operations/trials.md new file mode 100644 index 0000000..1b9b77d --- /dev/null +++ b/docs/models/operations/trials.md @@ -0,0 +1,7 @@ +# Trials + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/type.md b/docs/models/operations/type.md index 8cfa2e4..ad39407 100644 --- a/docs/models/operations/type.md +++ b/docs/models/operations/type.md @@ -1,6 +1,12 @@ # Type -Plex content type to search for +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + ## Values diff --git a/docs/models/operations/updateplaylistresponse.md b/docs/models/operations/updateplaylistresponse.md index d30ced0..c131dc0 100644 --- a/docs/models/operations/updateplaylistresponse.md +++ b/docs/models/operations/updateplaylistresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updateplayprogressresponse.md b/docs/models/operations/updateplayprogressresponse.md index 490de65..6a9164b 100644 --- a/docs/models/operations/updateplayprogressresponse.md +++ b/docs/models/operations/updateplayprogressresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/uploadplaylistrequest.md b/docs/models/operations/uploadplaylistrequest.md index 2940a98..f98d375 100644 --- a/docs/models/operations/uploadplaylistrequest.md +++ b/docs/models/operations/uploadplaylistrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `path` | *str* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `force` | [operations.Force](../../models/operations/force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | \ No newline at end of file +| `force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | \ No newline at end of file diff --git a/docs/models/operations/uploadplaylistresponse.md b/docs/models/operations/uploadplaylistresponse.md index 053e065..5d6dd8d 100644 --- a/docs/models/operations/uploadplaylistresponse.md +++ b/docs/models/operations/uploadplaylistresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/userprofile.md b/docs/models/operations/userprofile.md new file mode 100644 index 0000000..4c16614 --- /dev/null +++ b/docs/models/operations/userprofile.md @@ -0,0 +1,15 @@ +# UserProfile + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `default_audio_language` | *Nullable[str]* | :heavy_check_mark: | The preferred audio language for the account | ja | +| `default_subtitle_language` | *Nullable[str]* | :heavy_check_mark: | The preferred subtitle language for the account | en | +| `auto_select_audio` | *Optional[bool]* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | +| `auto_select_subtitle` | [Optional[operations.AutoSelectSubtitle]](../../models/operations/autoselectsubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 | +| `default_subtitle_accessibility` | [Optional[operations.DefaultSubtitleAccessibility]](../../models/operations/defaultsubtitleaccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 | +| `default_subtitle_forced` | [Optional[operations.DefaultSubtitleForced]](../../models/operations/defaultsubtitleforced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 | +| `watched_indicator` | [Optional[operations.WatchedIndicator]](../../models/operations/watchedindicator.md) | :heavy_minus_sign: | N/A | 1 | +| `media_reviews_visibility` | [Optional[operations.MediaReviewsVisibility]](../../models/operations/mediareviewsvisibility.md) | :heavy_minus_sign: | N/A | 0 | \ No newline at end of file diff --git a/docs/models/operations/watchedindicator.md b/docs/models/operations/watchedindicator.md new file mode 100644 index 0000000..772d650 --- /dev/null +++ b/docs/models/operations/watchedindicator.md @@ -0,0 +1,9 @@ +# WatchedIndicator + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/utils/retryconfig.md b/docs/models/utils/retryconfig.md new file mode 100644 index 0000000..69dd549 --- /dev/null +++ b/docs/models/utils/retryconfig.md @@ -0,0 +1,24 @@ +# RetryConfig + +Allows customizing the default retry configuration. Only usable with methods that mention they support retries. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | --------------------------------------- | --------- | +| `strategy` | `*str*` | The retry strategy to use. | `backoff` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | Configuration for the backoff strategy. | | +| `retry_connection_errors` | `*bool*` | Whether to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | --------- | ----------------------------------------- | -------- | +| `initial_interval` | `*int*` | The initial interval in milliseconds. | `500` | +| `max_interval` | `*int*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*float*` | The exponent to use for the backoff. | `1.5` | +| `max_elapsed_time` | `*int*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 092cf0b..2091e99 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -24,14 +24,13 @@ Get Server Activities ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.activities.get_server_activities() if res.object is not None: @@ -40,16 +39,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetServerActivitiesResponse](../../models/operations/getserveractivitiesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetServerActivitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| errors.GetServerActivitiesResponseBody | 400 | application/json | +| errors.GetServerActivitiesActivitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## cancel_server_activities @@ -58,15 +65,14 @@ Cancel Server Activities ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.activities.cancel_server_activities(activity_uuid='25b71ed5-0f9d-461c-baa7-d404e9e10d3e') +res = s.activities.cancel_server_activities(activity_uuid="25b71ed5-0f9d-461c-baa7-d404e9e10d3e") if res is not None: # handle response @@ -76,17 +82,19 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `activity_uuid` | *str* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `activity_uuid` | *str* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.CancelServerActivitiesResponse](../../models/operations/cancelserveractivitiesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.CancelServerActivitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| errors.CancelServerActivitiesResponseBody | 400 | application/json | +| errors.CancelServerActivitiesActivitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index adc93a6..969cb16 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -10,6 +10,8 @@ API Calls regarding authentication for Plex Media Server * [get_transient_token](#get_transient_token) - Get a Transient Token. * [get_source_connection_information](#get_source_connection_information) - Get Source Connection Information +* [get_user_details](#get_user_details) - Get User Data By Token +* [post_users_sign_in_data](#post_users_sign_in_data) - Get User Sign In Data ## get_transient_token @@ -19,16 +21,15 @@ This endpoint provides the caller with a temporary token with the same access le ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.authentication.get_transient_token(type=operations.GetTransientTokenQueryParamType.DELEGATION, scope=operations.Scope.ALL) +res = s.authentication.get_transient_token(type_=operations.GetTransientTokenQueryParamType.DELEGATION, scope=operations.Scope.ALL) if res is not None: # handle response @@ -42,17 +43,20 @@ if res is not None: | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `type` | [operations.GetTransientTokenQueryParamType](../../models/operations/gettransienttokenqueryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | | `scope` | [operations.Scope](../../models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetTransientTokenResponse](../../models/operations/gettransienttokenresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetTransientTokenResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| errors.GetTransientTokenResponseBody | 400 | application/json | +| errors.GetTransientTokenAuthenticationResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_source_connection_information @@ -63,15 +67,14 @@ Note: requires Plex Media Server >= 1.15.4. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.authentication.get_source_connection_information(source='server://client-identifier') +res = s.authentication.get_source_connection_information(source="server://client-identifier") if res is not None: # handle response @@ -81,17 +84,109 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `source` | *str* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `source` | *str* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetSourceConnectionInformationResponse](../../models/operations/getsourceconnectioninformationresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| errors.GetSourceConnectionInformationResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| errors.GetSourceConnectionInformationResponseBody | 400 | application/json | +| errors.GetSourceConnectionInformationAuthenticationResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_user_details + +Get the User data from the provided X-Plex-Token + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.authentication.get_user_details(x_plex_token="CV5xoxjTpFKUzBTShsaf") + +if res.user_plex_account is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `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 + +**[operations.GetUserDetailsResponse](../../models/operations/getuserdetailsresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.GetUserDetailsResponseBody | 400 | application/json | +| errors.GetUserDetailsAuthenticationResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## post_users_sign_in_data + +Sign in user with username and password and return user data with Plex authentication token + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.authentication.post_users_sign_in_data(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", request_body={ + "login": "username@email.com", + "password": "password123", + "verification_code": "123456", +}) + +if res.user_plex_account is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_client_identifier` | *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 | +| `request_body` | [Optional[operations.PostUsersSignInDataRequestBody]](../../models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | | +| `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 + +**[operations.PostUsersSignInDataResponse](../../models/operations/postuserssignindataresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| errors.PostUsersSignInDataResponseBody | 400 | application/json | +| errors.PostUsersSignInDataAuthenticationResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index fd34f0a..937a772 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -21,14 +21,13 @@ Returns a list of butler tasks ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.get_butler_tasks() if res.object is not None: @@ -37,16 +36,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetButlerTasksResponse](../../models/operations/getbutlertasksresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetButlerTasksResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetButlerTasksResponseBody | 400 | application/json | +| errors.GetButlerTasksButlerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## start_all_tasks @@ -60,14 +67,13 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.start_all_tasks() if res is not None: @@ -76,16 +82,24 @@ if res is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.StartAllTasksResponse](../../models/operations/startalltasksresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.StartAllTasksResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.StartAllTasksResponseBody | 400 | application/json | +| errors.StartAllTasksButlerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## stop_all_tasks @@ -95,14 +109,13 @@ This endpoint will stop all currently running tasks and remove any scheduled tas ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.stop_all_tasks() if res is not None: @@ -111,16 +124,24 @@ if res is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.StopAllTasksResponse](../../models/operations/stopalltasksresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.StopAllTasksResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.StopAllTasksResponseBody | 400 | application/json | +| errors.StopAllTasksButlerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## start_task @@ -134,15 +155,14 @@ This endpoint will attempt to start a single Butler task that is enabled in the ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.start_task(task_name=operations.TaskName.CLEAN_OLD_BUNDLES) if res is not None: @@ -153,20 +173,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `task_name` | [operations.TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `task_name` | [operations.TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.StartTaskResponse](../../models/operations/starttaskresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.StartTaskResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.StartTaskResponseBody | 400 | application/json | +| errors.StartTaskButlerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## stop_task @@ -176,15 +199,14 @@ This endpoint will stop a currently running task by name, or remove it from the ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.butler.stop_task(task_name=operations.PathParamTaskName.BACKUP_DATABASE) if res is not None: @@ -198,14 +220,16 @@ if res is not None: | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `task_name` | [operations.PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.StopTaskResponse](../../models/operations/stoptaskresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.StopTaskResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.StopTaskResponseBody | 400 | application/json | +| errors.StopTaskButlerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index cab18c9..41c5b3d 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -18,16 +18,14 @@ Get Global Hubs filtered by the parameters provided. ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.hubs.get_global_hubs(count=1262.49, only_transient=operations.OnlyTransient.ONE) +res = s.hubs.get_global_hubs() if res.object is not None: # handle response @@ -41,17 +39,20 @@ if res.object is not None: | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `count` | *Optional[float]* | :heavy_minus_sign: | The number of items to return with each hub. | | `only_transient` | [Optional[operations.OnlyTransient]](../../models/operations/onlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetGlobalHubsResponse](../../models/operations/getglobalhubsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetGlobalHubsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetGlobalHubsResponseBody | 400 | application/json | +| errors.GetGlobalHubsHubsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_library_hubs @@ -61,16 +62,14 @@ This endpoint will return a list of library specific hubs ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=operations.QueryParamOnlyTransient.ZERO) +res = s.hubs.get_library_hubs(section_id=6728.76) if res.object is not None: # handle response @@ -85,14 +84,16 @@ if res.object is not None: | `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | | `count` | *Optional[float]* | :heavy_minus_sign: | The number of items to return with each hub. | | `only_transient` | [Optional[operations.QueryParamOnlyTransient]](../../models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetLibraryHubsResponse](../../models/operations/getlibraryhubsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetLibraryHubsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.GetLibraryHubsResponseBody | 400 | application/json | +| errors.GetLibraryHubsHubsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 96e8b6f..9a913b7 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -10,13 +10,13 @@ API Calls interacting with Plex Media Server Libraries * [get_file_hash](#get_file_hash) - Get Hash Value * [get_recently_added](#get_recently_added) - Get Recently Added -* [get_libraries](#get_libraries) - Get All Libraries -* [get_library](#get_library) - Get Library Details +* [get_all_libraries](#get_all_libraries) - Get All Libraries +* [get_library_details](#get_library_details) - Get Library Details * [delete_library](#delete_library) - Delete Library Section * [get_library_items](#get_library_items) - Get Library Items -* [refresh_library](#refresh_library) - Refresh Library -* [search_library](#search_library) - Search Library -* [get_metadata](#get_metadata) - Get Items Metadata +* [get_refresh_library_metadata](#get_refresh_library_metadata) - Refresh Metadata Of The Library +* [get_search_library](#get_search_library) - Search Library +* [get_meta_data_by_rating_key](#get_meta_data_by_rating_key) - Get Metadata by RatingKey * [get_metadata_children](#get_metadata_children) - Get Items Children * [get_top_watched_content](#get_top_watched_content) - Get Top Watched Content * [get_on_deck](#get_on_deck) - Get On Deck @@ -28,15 +28,14 @@ This resource returns hash values for local files ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_file_hash(url='file://C:\Image.png&type=13', type=4462.17) +res = s.library.get_file_hash(url="file://C:\Image.png&type=13") if res is not None: # handle response @@ -46,21 +45,24 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `url` | *str* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | -| `type` | *Optional[float]* | :heavy_minus_sign: | Item type | | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `url` | *str* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | +| `type` | *Optional[float]* | :heavy_minus_sign: | Item type | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetFileHashResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.GetFileHashResponseBody | 400 | application/json | +| errors.GetFileHashLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_recently_added @@ -70,15 +72,14 @@ This endpoint will return the recently added content. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_recently_added() +res = s.library.get_recently_added(x_plex_container_start=0, x_plex_container_size=50) if res.object is not None: # handle response @@ -86,18 +87,28 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetRecentlyAddedResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.GetRecentlyAddedResponseBody | 400 | application/json | +| errors.GetRecentlyAddedLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## get_libraries + +## get_all_libraries A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. @@ -110,15 +121,14 @@ This allows a client to provide a rich interface around the media (e.g. allow so ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_libraries() +res = s.library.get_all_libraries() if res.object is not None: # handle response @@ -126,18 +136,26 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[operations.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)** +**[operations.GetAllLibrariesResponse](../../models/operations/getalllibrariesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.GetLibrariesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetAllLibrariesResponseBody | 400 | application/json | +| errors.GetAllLibrariesLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## get_library + +## get_library_details ## Library Details Endpoint @@ -183,16 +201,14 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_library(section_id=1000, include_details=operations.IncludeDetails.ZERO) +res = s.library.get_library_details(section_key=9518) if res.object is not None: # handle response @@ -204,36 +220,38 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `include_details` | [Optional[operations.IncludeDetails]](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)** +**[operations.GetLibraryDetailsResponse](../../models/operations/getlibrarydetailsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.GetLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| errors.GetLibraryDetailsResponseBody | 400 | application/json | +| errors.GetLibraryDetailsLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## delete_library -Delate a library using a specific section +Delete a library using a specific section id ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.delete_library(section_id=1000) +res = s.library.delete_library(section_key=9518) if res is not None: # handle response @@ -243,20 +261,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 | - +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.DeleteLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.DeleteLibraryResponseBody | 400 | application/json | +| errors.DeleteLibraryLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_library_items @@ -285,16 +306,23 @@ Fetches details from a specific section of the library identified by a section k ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_library_items(section_id='', tag=operations.Tag.GENRE, include_guids=1) +res = s.library.get_library_items(request={ + "section_key": 9518, + "tag": operations.Tag.EDITION, + "type": operations.Type.TWO, + "include_guids": operations.IncludeGuids.ONE, + "include_meta": operations.IncludeMeta.ONE, + "x_plex_container_start": 0, + "x_plex_container_size": 50, +}) if res.object is not None: # handle response @@ -304,40 +332,41 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `section_id` | *Any* | :heavy_check_mark: | the Id of the library to query | | -| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | -| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | - +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.GetLibraryItemsRequest](../../models/operations/getlibraryitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetLibraryItemsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetLibraryItemsResponseBody | 400 | application/json | +| errors.GetLibraryItemsLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## refresh_library -This endpoint Refreshes the library. +## get_refresh_library_metadata + +This endpoint Refreshes all the Metadata of the library. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.refresh_library(section_id=934.16) +res = s.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ONE) if res is not None: # handle response @@ -347,22 +376,26 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `section_id` | *float* | :heavy_check_mark: | the Id of the library to refresh | - +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `force` | [Optional[operations.Force]](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)** +**[operations.GetRefreshLibraryMetadataResponse](../../models/operations/getrefreshlibrarymetadataresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.RefreshLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| errors.GetRefreshLibraryMetadataResponseBody | 400 | application/json | +| errors.GetRefreshLibraryMetadataLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## search_library + +## get_search_library Search for content within a specific section of the library. @@ -387,16 +420,15 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.search_library(section_id=933505, type=operations.Type.FOUR) +res = s.library.get_search_library(section_key=9518, type_=operations.QueryParamType.TWO) if res.object is not None: # handle response @@ -406,23 +438,26 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `section_id` | *int* | :heavy_check_mark: | the Id of the library to query | -| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[operations.SearchLibraryResponse](../../models/operations/searchlibraryresponse.md)** +**[operations.GetSearchLibraryResponse](../../models/operations/getsearchlibraryresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.SearchLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.GetSearchLibraryResponseBody | 400 | application/json | +| errors.GetSearchLibraryLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## get_metadata + +## get_meta_data_by_rating_key This endpoint will return the metadata of a library item specified with the ratingKey. @@ -430,15 +465,14 @@ This endpoint will return the metadata of a library item specified with the rati ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_metadata(rating_key=8382.31) +res = s.library.get_meta_data_by_rating_key(rating_key=9518) if res.object is not None: # handle response @@ -448,20 +482,23 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `rating_key` | *int* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)** +**[operations.GetMetaDataByRatingKeyResponse](../../models/operations/getmetadatabyratingkeyresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetMetadataResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| errors.GetMetaDataByRatingKeyResponseBody | 400 | application/json | +| errors.GetMetaDataByRatingKeyLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_metadata_children @@ -471,15 +508,14 @@ This endpoint will return the children of of a library item specified with the r ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_metadata_children(rating_key=1539.14, include_elements='') +res = s.library.get_metadata_children(rating_key=1539.14, include_elements="Stream") if res.object is not None: # handle response @@ -493,17 +529,20 @@ if res.object is not None: | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. | | `include_elements` | *Optional[str]* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetMetadataChildrenResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| errors.GetMetadataChildrenResponseBody | 400 | application/json | +| errors.GetMetadataChildrenLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_top_watched_content @@ -513,15 +552,15 @@ This endpoint will return the top watched content from libraries of a certain ty ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.library.get_top_watched_content(type=505531, include_guids=1) +res = s.library.get_top_watched_content(type_=operations.GetTopWatchedContentQueryParamType.TWO, include_guids=1) if res.object is not None: # handle response @@ -531,20 +570,24 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `type` | *int* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | | -| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetTopWatchedContentResponse](../../models/operations/gettopwatchedcontentresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| errors.GetTopWatchedContentResponseBody | 400 | application/json | +| errors.GetTopWatchedContentLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_on_deck @@ -554,14 +597,13 @@ This endpoint will return the on deck content. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.library.get_on_deck() if res.object is not None: @@ -570,13 +612,20 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetOnDeckResponse](../../models/operations/getondeckresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.GetOnDeckResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetOnDeckResponseBody | 400 | application/json | +| errors.GetOnDeckLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 2f6ad15..99f3293 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -20,16 +20,15 @@ This endpoint will write a single-line log message, including a level and source ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.log.log_line(level=operations.Level.THREE, message='Test log message', source='Postman') +res = s.log.log_line(level=operations.Level.THREE, message="Test log message", source="Postman") if res is not None: # handle response @@ -44,17 +43,20 @@ if res is not None: | `level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | | `message` | *str* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | | `source` | *str* | :heavy_check_mark: | a string indicating the source of the message. | Postman | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.LogLineResponse](../../models/operations/loglineresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.LogLineResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.LogLineResponseBody | 400 | application/json | +| errors.LogLineLogResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## log_multi_line @@ -84,17 +86,16 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.log.log_multi_line(request='level=4&message=Test%20message%201&source=postman -level=3&message=Test%20message%202&source=postman -level=1&message=Test%20message%203&source=postman') +res = s.log.log_multi_line(request="level=4&message=Test%20message%201&source=postman\n" + +"level=3&message=Test%20message%202&source=postman\n" + +"level=1&message=Test%20message%203&source=postman") if res is not None: # handle response @@ -104,20 +105,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `request` | [str](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [str](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.LogMultiLineResponse](../../models/operations/logmultilineresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.LogMultiLineResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.LogMultiLineResponseBody | 400 | application/json | +| errors.LogMultiLineLogResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## enable_paper_trail @@ -127,14 +131,13 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.log.enable_paper_trail() if res is not None: @@ -143,13 +146,20 @@ if res is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.EnablePaperTrailResponse](../../models/operations/enablepapertrailresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.EnablePaperTrailResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.EnablePaperTrailResponseBody | 400 | application/json | +| errors.EnablePaperTrailLogResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 65a5aee..9655efb 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -11,6 +11,8 @@ API Calls interacting with Plex Media Server Media * [mark_played](#mark_played) - Mark Media Played * [mark_unplayed](#mark_unplayed) - Mark Media Unplayed * [update_play_progress](#update_play_progress) - Update Media Play Progress +* [get_banner_image](#get_banner_image) - Get Banner Image +* [get_thumb_image](#get_thumb_image) - Get Thumb Image ## mark_played @@ -19,14 +21,13 @@ This will mark the provided media key as Played. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.media.mark_played(key=59398) if res is not None: @@ -37,20 +38,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `key` | *float* | :heavy_check_mark: | The media key to mark as played | 59398 | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *float* | :heavy_check_mark: | The media key to mark as played | 59398 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.MarkPlayedResponse](../../models/operations/markplayedresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.MarkPlayedResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.MarkPlayedResponseBody | 400 | application/json | +| errors.MarkPlayedMediaResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## mark_unplayed @@ -59,14 +63,13 @@ This will mark the provided media key as Unplayed. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.media.mark_unplayed(key=59398) if res is not None: @@ -77,20 +80,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `key` | *float* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *float* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.MarkUnplayedResponse](../../models/operations/markunplayedresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.MarkUnplayedResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.MarkUnplayedResponseBody | 400 | application/json | +| errors.MarkUnplayedMediaResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## update_play_progress @@ -100,15 +106,14 @@ This API command can be used to update the play progress of a media item. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.media.update_play_progress(key='', time=90000, state='played') +res = s.media.update_play_progress(key="", time=90000, state="played") if res is not None: # handle response @@ -123,14 +128,114 @@ if res is not None: | `key` | *str* | :heavy_check_mark: | the media key | | | `time` | *float* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | | `state` | *str* | :heavy_check_mark: | The playback state of the media item. | played | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.UpdatePlayProgressResponse](../../models/operations/updateplayprogressresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.UpdatePlayProgressResponseBody | 400 | application/json | +| errors.UpdatePlayProgressMediaResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_banner_image + +Gets the banner image of the media item + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.media.get_banner_image(request={ + "rating_key": 9518, + "width": 396, + "height": 396, + "min_size": 1, + "upscale": 1, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", +}) + +if res.response_stream is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `request` | [operations.GetBannerImageRequest](../../models/operations/getbannerimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetBannerImageResponse](../../models/operations/getbannerimageresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetBannerImageResponseBody | 400 | application/json | +| errors.GetBannerImageMediaResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_thumb_image + +Gets the thumbnail image of the media item + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.media.get_thumb_image(request={ + "rating_key": 9518, + "width": 396, + "height": 396, + "min_size": 1, + "upscale": 1, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", +}) + +if res.response_stream is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `request` | [operations.GetThumbImageRequest](../../models/operations/getthumbimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetThumbImageResponse](../../models/operations/getthumbimageresponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UpdatePlayProgressResponseBody | 401 | application/json | +| errors.GetThumbImageResponseBody | 400 | application/json | +| errors.GetThumbImageMediaResponseBody | 401 | application/json | | errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index e7b3a2a..4cf2627 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -31,21 +31,20 @@ Create a new playlist. By default the playlist is blank. To create a playlist al ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.create_playlist(request=operations.CreatePlaylistRequest( - title='', - type=operations.QueryParamType.PHOTO, - smart=operations.Smart.ONE, - uri='https://inborn-brochure.biz', -)) +res = s.playlists.create_playlist(request={ + "title": "", + "type": operations.CreatePlaylistQueryParamType.PHOTO, + "smart": operations.Smart.ONE, + "uri": "https://inborn-brochure.biz", +}) if res.object is not None: # handle response @@ -58,17 +57,20 @@ if res.object is not None: | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `request` | [operations.CreatePlaylistRequest](../../models/operations/createplaylistrequest.md) | :heavy_check_mark: | The request object to use for the request. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.CreatePlaylistResponse](../../models/operations/createplaylistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.CreatePlaylistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.CreatePlaylistResponseBody | 400 | application/json | +| errors.CreatePlaylistPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_playlists @@ -77,16 +79,14 @@ Get All Playlists given the specified filters. ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.get_playlists(playlist_type=operations.PlaylistType.AUDIO, smart=operations.QueryParamSmart.ZERO) +res = s.playlists.get_playlists() if res.object is not None: # handle response @@ -100,17 +100,20 @@ if res.object is not None: | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `playlist_type` | [Optional[operations.PlaylistType]](../../models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. | | `smart` | [Optional[operations.QueryParamSmart]](../../models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetPlaylistsResponse](../../models/operations/getplaylistsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.GetPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetPlaylistsResponseBody | 400 | application/json | +| errors.GetPlaylistsPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_playlist @@ -121,14 +124,13 @@ Smart playlist details contain the `content` attribute. This is the content URI ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.playlists.get_playlist(playlist_id=4109.48) if res.object is not None: @@ -139,20 +141,23 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetPlaylistResponse](../../models/operations/getplaylistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetPlaylistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetPlaylistResponseBody | 400 | application/json | +| errors.GetPlaylistPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## delete_playlist @@ -162,14 +167,13 @@ This endpoint will delete a playlist ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.playlists.delete_playlist(playlist_id=216.22) if res is not None: @@ -180,20 +184,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.DeletePlaylistResponse](../../models/operations/deleteplaylistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.DeletePlaylistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.DeletePlaylistResponseBody | 400 | application/json | +| errors.DeletePlaylistPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## update_playlist @@ -203,15 +210,14 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.update_playlist(playlist_id=3915, title='', summary='') +res = s.playlists.update_playlist(playlist_id=3915) if res is not None: # handle response @@ -221,22 +227,25 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | -| `title` | *Optional[str]* | :heavy_minus_sign: | name of the playlist | -| `summary` | *Optional[str]* | :heavy_minus_sign: | summary description of the playlist | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | +| `title` | *Optional[str]* | :heavy_minus_sign: | name of the playlist | +| `summary` | *Optional[str]* | :heavy_minus_sign: | summary description of the playlist | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.UpdatePlaylistResponse](../../models/operations/updateplaylistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.UpdatePlaylistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.UpdatePlaylistResponseBody | 400 | application/json | +| errors.UpdatePlaylistPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_playlist_contents @@ -249,15 +258,15 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.get_playlist_contents(playlist_id=5004.46, type=9403.59) +res = s.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TWO) if res.object is not None: # handle response @@ -267,21 +276,24 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | -| `type` | *float* | :heavy_check_mark: | the metadata type of the item to return | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | | +| `type` | [operations.GetPlaylistContentsQueryParamType](../../models/operations/getplaylistcontentsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetPlaylistContentsResponse](../../models/operations/getplaylistcontentsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetPlaylistContentsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.GetPlaylistContentsResponseBody | 400 | application/json | +| errors.GetPlaylistContentsPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## clear_playlist_contents @@ -291,14 +303,13 @@ Clears a playlist, only works with dumb playlists. Returns the playlist. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.playlists.clear_playlist_contents(playlist_id=1893.18) if res is not None: @@ -309,20 +320,23 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.ClearPlaylistContentsResponse](../../models/operations/clearplaylistcontentsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.ClearPlaylistContentsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| errors.ClearPlaylistContentsResponseBody | 400 | application/json | +| errors.ClearPlaylistContentsPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## add_playlist_contents @@ -333,15 +347,14 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.add_playlist_contents(playlist_id=8502.01, uri='server://12345/com.plexapp.plugins.library/library/metadata/1', play_queue_id=123) +res = s.playlists.add_playlist_contents(playlist_id=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123) if res.object is not None: # handle response @@ -351,22 +364,25 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | | -| `uri` | *str* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | -| `play_queue_id` | *Optional[float]* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `playlist_id` | *float* | :heavy_check_mark: | the ID of the playlist | | +| `uri` | *str* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | +| `play_queue_id` | *Optional[float]* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.AddPlaylistContentsResponse](../../models/operations/addplaylistcontentsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.AddPlaylistContentsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.AddPlaylistContentsResponseBody | 400 | application/json | +| errors.AddPlaylistContentsPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## upload_playlist @@ -376,16 +392,15 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.playlists.upload_playlist(path='/home/barkley/playlist.m3u', force=operations.Force.ZERO) +res = s.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ZERO) if res is not None: # handle response @@ -398,15 +413,17 @@ if res is not None: | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `path` | *str* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `force` | [operations.Force](../../models/operations/force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | - +| `force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.UploadPlaylistResponse](../../models/operations/uploadplaylistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.UploadPlaylistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.UploadPlaylistResponseBody | 400 | application/json | +| errors.UploadPlaylistPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index c04fd38..da03a2a 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -8,9 +8,138 @@ API Calls that perform operations directly against https://Plex.tv ### Available Operations +* [get_companions_data](#get_companions_data) - Get Companions Data +* [get_user_friends](#get_user_friends) - Get list of friends of the user logged in +* [get_geo_data](#get_geo_data) - Get Geo Data * [get_home_data](#get_home_data) - Get Plex Home Data +* [get_server_resources](#get_server_resources) - Get Server Resources * [get_pin](#get_pin) - Get a Pin -* [get_token](#get_token) - Get Access Token +* [get_token_by_pin_id](#get_token_by_pin_id) - Get Access Token by PinId + +## get_companions_data + +Get Companions Data + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.plex.get_companions_data() + +if res.response_bodies is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `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. | + +### Response + +**[operations.GetCompanionsDataResponse](../../models/operations/getcompanionsdataresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetCompanionsDataResponseBody | 400 | application/json | +| errors.GetCompanionsDataPlexResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_user_friends + +Get friends of provided auth token. + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.plex.get_user_friends() + +if res.friends is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `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. | + +### Response + +**[operations.GetUserFriendsResponse](../../models/operations/getuserfriendsresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.GetUserFriendsResponseBody | 400 | application/json | +| errors.GetUserFriendsPlexResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_geo_data + +Returns the geolocation and locale data of the caller + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.plex.get_geo_data() + +if res.geo_data is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `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. | + +### Response + +**[operations.GetGeoDataResponse](../../models/operations/getgeodataresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetGeoDataResponseBody | 400 | application/json | +| errors.GetGeoDataPlexResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_home_data @@ -19,14 +148,13 @@ Retrieves the home data for the authenticated user, including details like home ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.plex.get_home_data() if res.object is not None: @@ -35,16 +163,73 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetHomeDataResponse](../../models/operations/gethomedataresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetHomeDataResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetHomeDataResponseBody | 400 | application/json | +| errors.GetHomeDataPlexResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_server_resources + +Get Plex server access tokens and server connections + +### Example Usage + +```python +from plex_api_client import PlexAPI +from plex_api_client.models import operations + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.plex.get_server_resources(request={ + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + "include_https": operations.IncludeHTTPS.ONE, + "include_relay": operations.IncludeRelay.ONE, + "include_i_pv6": operations.IncludeIPv6.ONE, +}) + +if res.plex_devices is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `request` | [operations.GetServerResourcesRequest](../../models/operations/getserverresourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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. | + +### Response + +**[operations.GetServerResourcesResponse](../../models/operations/getserverresourcesresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetServerResourcesResponseBody | 400 | application/json | +| errors.GetServerResourcesPlexResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_pin @@ -53,16 +238,15 @@ Retrieve a Pin from Plex.tv for authentication flows ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', +s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) +res = s.plex.get_pin(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", x_plex_product="Plex Web") -res = s.plex.get_pin(x_plex_product='Postman', strong=False, x_plex_client_identifier='Postman') - -if res.object is not None: +if res.auth_pin_container is not None: # handle response pass @@ -72,15 +256,16 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_plex_product` | *str* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `strong` | *Optional[bool]* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `x_plex_client_identifier` | *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)
| Postman | +| `x_plex_client_identifier` | *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 | +| `x_plex_product` | *Optional[str]* | :heavy_minus_sign: | N/A | Plex Web | +| `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 **[operations.GetPinResponse](../../models/operations/getpinresponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -88,23 +273,23 @@ if res.object is not None: | errors.GetPinResponseBody | 400 | application/json | | errors.SDKError | 4xx-5xx | */* | -## get_token -Retrieve an Access Token from Plex.tv after the Pin has already been authenticated +## get_token_by_pin_id + +Retrieve an Access Token from Plex.tv after the Pin has been authenticated ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( - x_plex_client_identifier='Postman', +s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) +res = s.plex.get_token_by_pin_id(pin_id=408895, x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40") -res = s.plex.get_token(pin_id='', x_plex_client_identifier='Postman') - -if res.object is not None: +if res.auth_pin_container is not None: # handle response pass @@ -114,17 +299,19 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pin_id` | *str* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `x_plex_client_identifier` | *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)
| Postman | +| `pin_id` | *int* | :heavy_check_mark: | The PinID to retrieve an access token for | | +| `x_plex_client_identifier` | *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 -**[operations.GetTokenResponse](../../models/operations/gettokenresponse.md)** +**[operations.GetTokenByPinIDResponse](../../models/operations/gettokenbypinidresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.GetTokenResponseBody | 400 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetTokenByPinIDResponseBody | 400 | application/json | +| errors.GetTokenByPinIDPlexResponseBody | 404 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/plexapi/README.md b/docs/sdks/plexapi/README.md index 8ee580c..2fd26ab 100644 --- a/docs/sdks/plexapi/README.md +++ b/docs/sdks/plexapi/README.md @@ -1,9 +1,5 @@ # PlexAPI SDK - ## Overview -An Open API Spec for interacting with Plex.tv and Plex Servers - -### Available Operations - +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 0354078..f6e3be7 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -31,15 +31,14 @@ This request is intended to be very fast, and called as the user types. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.search.perform_search(query='dylan', section_id=1516.53, limit=5) +res = s.search.perform_search(query="dylan", limit=5) if res is not None: # handle response @@ -54,17 +53,20 @@ if res is not None: | `query` | *str* | :heavy_check_mark: | The query term | arnold | | `section_id` | *Optional[float]* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | | `limit` | *Optional[float]* | :heavy_minus_sign: | The number of items to return per hub | 5 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.PerformSearchResponse](../../models/operations/performsearchresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.PerformSearchResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.PerformSearchResponseBody | 400 | application/json | +| errors.PerformSearchSearchResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## perform_voice_search @@ -77,15 +79,14 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.search.perform_voice_search(query='dead+poop', section_id=4094.8, limit=5) +res = s.search.perform_voice_search(query="dead+poop", limit=5) if res is not None: # handle response @@ -100,17 +101,20 @@ if res is not None: | `query` | *str* | :heavy_check_mark: | The query term | dead+poop | | `section_id` | *Optional[float]* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | | `limit` | *Optional[float]* | :heavy_minus_sign: | The number of items to return per hub | 5 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.PerformVoiceSearchResponse](../../models/operations/performvoicesearchresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.PerformVoiceSearchResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| errors.PerformVoiceSearchResponseBody | 400 | application/json | +| errors.PerformVoiceSearchSearchResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_search_results @@ -119,15 +123,14 @@ This will search the database for the string provided. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.search.get_search_results(query='110') +res = s.search.get_search_results(query="110") if res.object is not None: # handle response @@ -137,17 +140,19 @@ if res.object is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `query` | *str* | :heavy_check_mark: | The search query string to use | 110 | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `query` | *str* | :heavy_check_mark: | The search query string to use | 110 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetSearchResultsResponse](../../models/operations/getsearchresultsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetSearchResultsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetSearchResultsResponseBody | 400 | application/json | +| errors.GetSearchResultsSearchResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index c7f87ce..5ba4cee 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -15,6 +15,7 @@ Operations against the Plex Media Server System. * [get_server_identity](#get_server_identity) - Get Server Identity * [get_my_plex_account](#get_my_plex_account) - Get MyPlex Account * [get_resized_photo](#get_resized_photo) - Get a Resized Photo +* [get_media_providers](#get_media_providers) - Get Media Providers * [get_server_list](#get_server_list) - Get Server List ## get_server_capabilities @@ -24,14 +25,13 @@ Get Server Capabilities ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_capabilities() if res.object is not None: @@ -40,16 +40,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetServerCapabilitiesResponse](../../models/operations/getservercapabilitiesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetServerCapabilitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| errors.GetServerCapabilitiesResponseBody | 400 | application/json | +| errors.GetServerCapabilitiesServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_server_preferences @@ -58,14 +66,13 @@ Get Server Preferences ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_preferences() if res.object is not None: @@ -74,16 +81,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetServerPreferencesResponse](../../models/operations/getserverpreferencesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetServerPreferencesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| errors.GetServerPreferencesResponseBody | 400 | application/json | +| errors.GetServerPreferencesServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_available_clients @@ -92,14 +107,13 @@ Get Available Clients ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_available_clients() if res.object is not None: @@ -108,16 +122,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetAvailableClientsResponse](../../models/operations/getavailableclientsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetAvailableClientsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| errors.GetAvailableClientsResponseBody | 400 | application/json | +| errors.GetAvailableClientsServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_devices @@ -126,14 +148,13 @@ Get Devices ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_devices() if res.object is not None: @@ -142,32 +163,38 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetDevicesResponse](../../models/operations/getdevicesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.GetDevicesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetDevicesResponseBody | 400 | application/json | +| errors.GetDevicesServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_server_identity -Get Server Identity +This request is useful to determine if the server is online or offline ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( - access_token="", - x_plex_client_identifier='Postman', +s = PlexAPI( + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_identity() if res.object is not None: @@ -176,17 +203,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetServerIdentityResponse](../../models/operations/getserveridentityresponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetServerIdentityResponseBody | 401 | application/json | +| errors.GetServerIdentityResponseBody | 408 | application/json | | errors.SDKError | 4xx-5xx | */* | + ## get_my_plex_account Returns MyPlex Account Information @@ -194,14 +228,13 @@ Returns MyPlex Account Information ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_my_plex_account() if res.object is not None: @@ -210,16 +243,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetMyPlexAccountResponse](../../models/operations/getmyplexaccountresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetMyPlexAccountResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetMyPlexAccountResponseBody | 400 | application/json | +| errors.GetMyPlexAccountServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_resized_photo @@ -229,24 +270,23 @@ Plex's Photo transcoder is used throughout the service to serve images at specif ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.server.get_resized_photo(request=operations.GetResizedPhotoRequest( - width=110, - height=165, - blur=20, - min_size=operations.MinSize.ONE, - upscale=operations.Upscale.ZERO, - url='/library/metadata/49564/thumb/1654258204', - opacity=100, -)) +res = s.server.get_resized_photo(request={ + "width": 110, + "height": 165, + "blur": 20, + "min_size": operations.MinSize.ONE, + "upscale": operations.Upscale.ONE, + "url": "/library/metadata/49564/thumb/1654258204", + "opacity": 100, +}) if res is not None: # handle response @@ -259,17 +299,62 @@ if res is not None: | Parameter | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `request` | [operations.GetResizedPhotoRequest](../../models/operations/getresizedphotorequest.md) | :heavy_check_mark: | The request object to use for the request. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetResizedPhotoResponse](../../models/operations/getresizedphotoresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetResizedPhotoResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetResizedPhotoResponseBody | 400 | application/json | +| errors.GetResizedPhotoServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get_media_providers + +Retrieves media providers and their features from the Plex server. + +### Example Usage + +```python +from plex_api_client import PlexAPI + +s = PlexAPI( + access_token="", + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", +) + +res = s.server.get_media_providers(x_plex_token="CV5xoxjTpFKUzBTShsaf") + +if res.object is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[operations.GetMediaProvidersResponse](../../models/operations/getmediaprovidersresponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.GetMediaProvidersResponseBody | 400 | application/json | +| errors.GetMediaProvidersServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_server_list @@ -278,14 +363,13 @@ Get Server List ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.server.get_server_list() if res.object is not None: @@ -294,13 +378,20 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetServerListResponse](../../models/operations/getserverlistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetServerListResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetServerListResponseBody | 400 | application/json | +| errors.GetServerListServerResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index a4de93f..a2c3f6a 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -20,14 +20,13 @@ This will retrieve the "Now Playing" Information of the PMS. ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.sessions.get_sessions() if res.object is not None: @@ -36,16 +35,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetSessionsResponse](../../models/operations/getsessionsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetSessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetSessionsResponseBody | 400 | application/json | +| errors.GetSessionsSessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_session_history @@ -54,16 +61,14 @@ This will Retrieve a listing of all history views. ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.sessions.get_session_history(sort='', account_id=1, filter_=operations.Filter(), library_section_id=12) +res = s.sessions.get_session_history(sort="viewedAt:desc", account_id=1, filter_={}, library_section_id=12) if res.object is not None: # handle response @@ -77,19 +82,22 @@ if res.object is not None: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sort` | *Optional[str]* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | | `account_id` | *Optional[int]* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `filter_` | [Optional[operations.Filter]](../../models/operations/filter_.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | +| `filter_` | [Optional[operations.QueryParamFilter]](../../models/operations/queryparamfilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | | `library_section_id` | *Optional[int]* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetSessionHistoryResponse](../../models/operations/getsessionhistoryresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetSessionHistoryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| errors.GetSessionHistoryResponseBody | 400 | application/json | +| errors.GetSessionHistorySessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_transcode_sessions @@ -98,14 +106,13 @@ Get Transcode Sessions ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.sessions.get_transcode_sessions() if res.object is not None: @@ -114,16 +121,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetTranscodeSessionsResponse](../../models/operations/gettranscodesessionsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetTranscodeSessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.GetTranscodeSessionsResponseBody | 400 | application/json | +| errors.GetTranscodeSessionsSessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## stop_transcode_session @@ -132,15 +147,14 @@ Stop a Transcode Session ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.sessions.stop_transcode_session(session_key='zz7llzqlx8w9vnrsbnwhbmep') +res = s.sessions.stop_transcode_session(session_key="zz7llzqlx8w9vnrsbnwhbmep") if res is not None: # handle response @@ -150,17 +164,19 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `session_key` | *str* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | - +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `session_key` | *str* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.StopTranscodeSessionResponse](../../models/operations/stoptranscodesessionresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.StopTranscodeSessionResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.StopTranscodeSessionResponseBody | 400 | application/json | +| errors.StopTranscodeSessionSessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index e07c308..797e8f4 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -19,14 +19,13 @@ This will return the media statistics for the server ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.statistics.get_statistics(timespan=4) if res.object is not None: @@ -40,17 +39,20 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.GetStatisticsResponseBody | 400 | application/json | +| errors.GetStatisticsStatisticsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_resources_statistics @@ -59,14 +61,13 @@ This will return the resources for the server ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.statistics.get_resources_statistics(timespan=4) if res.object is not None: @@ -80,17 +81,20 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetResourcesStatisticsResponse](../../models/operations/getresourcesstatisticsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetResourcesStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| errors.GetResourcesStatisticsResponseBody | 400 | application/json | +| errors.GetResourcesStatisticsStatisticsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get_bandwidth_statistics @@ -99,14 +103,13 @@ This will return the bandwidth statistics for the server ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.statistics.get_bandwidth_statistics(timespan=4) if res.object is not None: @@ -120,14 +123,16 @@ if res.object is not None: | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.GetBandwidthStatisticsResponse](../../models/operations/getbandwidthstatisticsresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetBandwidthStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| errors.GetBandwidthStatisticsResponseBody | 400 | application/json | +| errors.GetBandwidthStatisticsStatisticsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index e9c0e24..dedc337 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -20,14 +20,13 @@ Querying status of updates ### Example Usage ```python -import plex_api +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.updater.get_update_status() if res.object is not None: @@ -36,16 +35,24 @@ if res.object is not None: ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetUpdateStatusResponse](../../models/operations/getupdatestatusresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetUpdateStatusResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetUpdateStatusResponseBody | 400 | application/json | +| errors.GetUpdateStatusUpdaterResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## check_for_updates @@ -54,15 +61,14 @@ Checking for updates ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.updater.check_for_updates(download=operations.Download.ONE) if res is not None: @@ -76,17 +82,20 @@ if res is not None: | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `download` | [Optional[operations.Download]](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.CheckForUpdatesResponse](../../models/operations/checkforupdatesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.CheckForUpdatesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.CheckForUpdatesResponseBody | 400 | application/json | +| errors.CheckForUpdatesUpdaterResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## apply_updates @@ -96,15 +105,14 @@ Note that these two parameters are effectively mutually exclusive. The `tonight` ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - res = s.updater.apply_updates(tonight=operations.Tonight.ONE, skip=operations.Skip.ONE) if res is not None: @@ -118,15 +126,17 @@ if res is not None: | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tonight` | [Optional[operations.Tonight]](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `skip` | [Optional[operations.Skip]](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | - +| `skip` | [Optional[operations.Skip]](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response **[operations.ApplyUpdatesResponse](../../models/operations/applyupdatesresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.ApplyUpdatesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.ApplyUpdatesResponseBody | 400 | application/json | +| errors.ApplyUpdatesUpdaterResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 937e9c7..cb2cbc2 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -18,27 +18,26 @@ Get the timeline for a media item ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.video.get_timeline(request=operations.GetTimelineRequest( - rating_key=23409, - key='/library/metadata/23409', - state=operations.State.PLAYING, - has_mde=1, - time=2000, - duration=10000, - context='home:hub.continueWatching', - play_queue_item_id=1, - play_back_time=2000, - row=1, -)) +res = s.video.get_timeline(request={ + "rating_key": 23409, + "key": "/library/metadata/23409", + "state": operations.State.PLAYING, + "has_mde": 1, + "time": 2000, + "duration": 10000, + "context": "home:hub.continueWatching", + "play_queue_item_id": 1, + "play_back_time": 2000, + "row": 1, +}) if res is not None: # handle response @@ -51,17 +50,20 @@ if res is not None: | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `request` | [operations.GetTimelineRequest](../../models/operations/gettimelinerequest.md) | :heavy_check_mark: | The request object to use for the request. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetTimelineResponse](../../models/operations/gettimelineresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetTimelineResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetTimelineResponseBody | 400 | application/json | +| errors.GetTimelineVideoResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## start_universal_transcode @@ -70,33 +72,31 @@ Begin a Universal Transcode Session ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.video.start_universal_transcode(request=operations.StartUniversalTranscodeRequest( - has_mde=1, - path='/library/metadata/23409', - media_index=0, - part_index=0, - protocol='hls', - fast_seek=0, - direct_play=0, - direct_stream=0, - subtitle_size=100, - subtites='burn', - audio_boost=100, - location='lan', - media_buffer_size=102400, - session='zvcage8b7rkioqcm8f4uns4c', - add_debug_overlay=0, - auto_adjust_quality=0, -)) +res = s.video.start_universal_transcode(request={ + "has_mde": 1, + "path": "/library/metadata/23409", + "media_index": 0, + "part_index": 0, + "protocol": "hls", + "fast_seek": 0, + "direct_play": 0, + "direct_stream": 0, + "subtitle_size": 100, + "subtites": "burn", + "audio_boost": 100, + "location": "lan", + "media_buffer_size": 102400, + "session": "zvcage8b7rkioqcm8f4uns4c", + "add_debug_overlay": 0, + "auto_adjust_quality": 0, +}) if res is not None: # handle response @@ -109,14 +109,16 @@ if res is not None: | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `request` | [operations.StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. | - +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.StartUniversalTranscodeResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| errors.StartUniversalTranscodeResponseBody | 400 | application/json | +| errors.StartUniversalTranscodeVideoResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 3c74cdc..3e7c475 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -8,28 +8,29 @@ API Calls that perform operations with Plex Media Server Watchlists ### Available Operations -* [get_watchlist](#get_watchlist) - Get User Watchlist +* [get_watch_list](#get_watch_list) - Get User Watchlist -## get_watchlist +## get_watch_list Get User Watchlist ### Example Usage ```python -import plex_api -from plex_api.models import operations +from plex_api_client import PlexAPI +from plex_api_client.models import operations -s = plex_api.PlexAPI( +s = PlexAPI( access_token="", - x_plex_client_identifier='Postman', + x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", ) - -res = s.watchlist.get_watchlist(request=operations.GetWatchlistRequest( - filter_=operations.PathParamFilter.RELEASED, - x_plex_token='', -)) +res = s.watchlist.get_watch_list(request={ + "filter_": operations.Filter.AVAILABLE, + "x_plex_token": "CV5xoxjTpFKUzBTShsaf", + "x_plex_container_start": 0, + "x_plex_container_size": 50, +}) if res.object is not None: # handle response @@ -41,16 +42,18 @@ if res.object is not None: | Parameter | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `request` | [operations.GetWatchlistRequest](../../models/operations/getwatchlistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetWatchListRequest](../../models/operations/getwatchlistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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. | - ### Response -**[operations.GetWatchlistResponse](../../models/operations/getwatchlistresponse.md)** +**[operations.GetWatchListResponse](../../models/operations/getwatchlistresponse.md)** + ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.GetWatchlistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetWatchListResponseBody | 400 | application/json | +| errors.GetWatchListWatchlistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 0000000..ab1033b --- /dev/null +++ b/poetry.toml @@ -0,0 +1,2 @@ +[virtualenvs] +in-project = true diff --git a/pylintrc b/pylintrc index db1592c..1097440 100644 --- a/pylintrc +++ b/pylintrc @@ -59,10 +59,11 @@ ignore-paths= # Emacs file locks ignore-patterns=^\.# -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis). It -# supports qualified module names, as well as Unix pattern matching. +# List of module names for which member attributes should not be checked and +# will not be imported (useful for modules/projects where namespaces are +# manipulated during runtime and thus existing member attributes cannot be +# deduced by static analysis). It supports qualified module names, as well as +# Unix pattern matching. ignored-modules= # Python code to execute, usually for sys.path manipulation such as @@ -93,6 +94,12 @@ py-version=3.8 # Discover python modules and packages in the file system subtree. recursive=no +# Add paths to the list of the source roots. Supports globbing patterns. The +# source root is an absolute path or a path relative to the current working +# directory used to determine a package namespace for modules located under the +# source root. +source-roots=src + # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes @@ -228,6 +235,10 @@ no-docstring-rgx=^_ # These decorators are taken in consideration only for invalid-name. property-classes=abc.abstractproperty +# Regular expression matching correct type alias names. If left empty, type +# alias names will be checked with the set naming style. +typealias-rgx=.* + # Regular expression matching correct type variable names. If left empty, type # variable names will be checked with the set naming style. #typevar-rgx= @@ -250,15 +261,12 @@ check-protected-access-in-special-methods=no defining-attr-methods=__init__, __new__, setUp, + asyncSetUp, __post_init__ # List of member names, which should be excluded from the protected access # warning. -exclude-protected=_asdict, - _fields, - _replace, - _source, - _make +exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls @@ -421,6 +429,8 @@ disable=raw-checker-failed, suppressed-message, useless-suppression, deprecated-pragma, + use-implicit-booleaness-not-comparison-to-string, + use-implicit-booleaness-not-comparison-to-zero, use-symbolic-message-instead, trailing-whitespace, line-too-long, @@ -433,7 +443,6 @@ disable=raw-checker-failed, broad-exception-raised, too-few-public-methods, too-many-branches, - chained-comparison, duplicate-code, trailing-newlines, too-many-public-methods, @@ -446,13 +455,15 @@ disable=raw-checker-failed, too-many-boolean-expressions, no-else-raise, bare-except, - broad-exception-caught + broad-exception-caught, + fixme, + relative-beyond-top-level # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. -enable=c-extension-no-member +enable= [METHOD_ARGS] @@ -498,8 +509,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor # used to format the message information. See doc for all details. msg-template= -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio). You can also give a reporter class, e.g. +# Set the output format. Available formats are: text, parseable, colorized, +# json2 (improved json format), json (old json format) and msvs (visual +# studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. #output-format= @@ -533,8 +545,8 @@ min-similarity-lines=4 # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 -# Spelling dictionary name. Available dictionaries: none. To make it work, -# install the 'python-enchant' package. +# Spelling dictionary name. No available dictionaries : You need to install +# both the python package and the system dependency for enchant to work. spelling-dict= # List of comma separated words that should be considered directives if they diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1dfdaf4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[tool.poetry] +name = "plex-api-client" +version = "0.11.0" +description = "Python Client SDK Generated by Speakeasy" +authors = ["Speakeasy",] +readme = "README-PYPI.md" +repository = "https://github.com/LukeHagar/plexpy.git" +packages = [ + { include = "plex_api_client", from = "src" } +] +include = ["py.typed", "src/plex_api_client/py.typed"] + +[tool.setuptools.package-data] +"*" = ["py.typed", "src/plex_api_client/py.typed"] + +[virtualenvs] +in-project = true + +[tool.poetry.dependencies] +python = "^3.8" +eval-type-backport = "^0.2.0" +httpx = "^0.27.0" +jsonpath-python = "^1.0.6" +pydantic = "~2.9.0" +python-dateutil = "2.8.2" +typing-inspect = "^0.9.0" + +[tool.poetry.group.dev.dependencies] +mypy = "==1.10.1" +pylint = "==3.2.3" +types-python-dateutil = "^2.9.0.20240316" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.pytest.ini_options] +pythonpath = ["src"] + +[tool.mypy] +disable_error_code = "misc" + +[[tool.mypy.overrides]] +module = "typing_inspect" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "jsonpath" +ignore_missing_imports = true + +[tool.pyright] +venvPath = "." +venv = ".venv" + + diff --git a/scripts/compile.sh b/scripts/compile.sh new file mode 100755 index 0000000..fafe635 --- /dev/null +++ b/scripts/compile.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +set -o pipefail # Ensure pipeline failures are propagated + +# Use temporary files to store outputs and exit statuses +declare -A output_files +declare -A status_files + +# Function to run a command with temporary output and status files +run_command() { + local cmd="$1" + local key="$2" + local output_file="$3" + local status_file="$4" + + # Run the command and store output and exit status + { + eval "$cmd" + echo $? > "$status_file" + } &> "$output_file" & +} + +poetry run python scripts/prepare-readme.py + +# Create temporary files for outputs and statuses +for cmd in compileall pylint mypy pyright; do + output_files[$cmd]=$(mktemp) + status_files[$cmd]=$(mktemp) +done + +# Collect PIDs for background processes +declare -a pids + +# Run commands in parallel using temporary files +echo "Running python -m compileall" +run_command 'poetry run python -m compileall -q . && echo "Success"' 'compileall' "${output_files[compileall]}" "${status_files[compileall]}" +pids+=($!) + +echo "Running pylint" +run_command 'poetry run pylint src' 'pylint' "${output_files[pylint]}" "${status_files[pylint]}" +pids+=($!) + +echo "Running mypy" +run_command 'poetry run mypy src' 'mypy' "${output_files[mypy]}" "${status_files[mypy]}" +pids+=($!) + +echo "Running pyright (optional)" +run_command 'if command -v pyright > /dev/null 2>&1; then pyright src; else echo "pyright not found, skipping"; fi' 'pyright' "${output_files[pyright]}" "${status_files[pyright]}" +pids+=($!) + +# Wait for all processes to complete +echo "Waiting for processes to complete" +for pid in "${pids[@]}"; do + wait "$pid" +done + +# Print output sequentially and check for failures +failed=false +for key in "${!output_files[@]}"; do + echo "--- Output from Command: $key ---" + echo + cat "${output_files[$key]}" + echo # Empty line for separation + echo "--- End of Output from Command: $key ---" + echo + + exit_status=$(cat "${status_files[$key]}") + if [ "$exit_status" -ne 0 ]; then + echo "Command $key failed with exit status $exit_status" >&2 + failed=true + fi +done + +# Clean up temporary files +for tmp_file in "${output_files[@]}" "${status_files[@]}"; do + rm -f "$tmp_file" +done + +if $failed; then + echo "One or more commands failed." >&2 + exit 1 +else + echo "All commands completed successfully." + exit 0 +fi diff --git a/scripts/prepare-readme.py b/scripts/prepare-readme.py new file mode 100644 index 0000000..c910d43 --- /dev/null +++ b/scripts/prepare-readme.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import re +import shutil + +try: + with open("README.md", "r") as rh: + readme_contents = rh.read() + GITHUB_URL = "https://github.com/LukeHagar/plexpy.git" + GITHUB_URL = ( + GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL + ) + # links on PyPI should have absolute URLs + readme_contents = re.sub( + r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", + lambda m: m.group(1) + + GITHUB_URL + + "/blob/master/" + + m.group(2) + + m.group(3), + readme_contents, + ) + + with open("README-PYPI.md", "w") as wh: + wh.write(readme_contents) +except Exception as e: + try: + print("Failed to rewrite README.md to README-PYPI.md, copying original instead") + print(e) + shutil.copyfile("README.md", "README-PYPI.md") + except Exception as e: + print("Failed to copy README.md to README-PYPI.md") + print(e) diff --git a/scripts/publish.sh b/scripts/publish.sh index ed45d8a..ab45b1f 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash -export TWINE_USERNAME=__token__ -export TWINE_PASSWORD=${PYPI_TOKEN} +export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} -python -m pip install --upgrade pip -pip install setuptools wheel twine -python setup.py sdist bdist_wheel -twine upload dist/* +poetry run python scripts/prepare-readme.py + +poetry publish --build --skip-existing diff --git a/setup.py b/setup.py deleted file mode 100644 index 4192374..0000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import setuptools -import re - -try: - with open('README.md', 'r') as fh: - long_description = fh.read() - GITHUB_URL = 'https://github.com/LukeHagar/plexpy.git' - GITHUB_URL = GITHUB_URL[: -len('.git')] if GITHUB_URL.endswith('.git') else GITHUB_URL - # links on PyPI should have absolute URLs - long_description = re.sub( - r'(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))', - lambda m: m.group(1) + GITHUB_URL + '/blob/master/' + m.group(2) + m.group(3), - long_description, - ) -except FileNotFoundError: - long_description = '' - -setuptools.setup( - name='plex-api-client', - version='0.10.0', - author='LukeHagar', - description='Python Client SDK Generated by Speakeasy', - url='https://github.com/LukeHagar/plexpy.git', - long_description=long_description, - long_description_content_type='text/markdown', - packages=setuptools.find_packages(where='src'), - install_requires=[ - "certifi>=2023.7.22", - "charset-normalizer>=3.2.0", - "dataclasses-json>=0.6.4", - "idna>=3.4", - "jsonpath-python>=1.0.6", - "marshmallow>=3.19.0", - "mypy-extensions>=1.0.0", - "packaging>=23.1", - "python-dateutil>=2.8.2", - "requests>=2.31.0", - "six>=1.16.0", - "typing-inspect>=0.9.0", - "typing_extensions>=4.7.1", - "urllib3>=1.26.18", - ], - extras_require={ - "dev": [ - "pylint==3.1.0", - ], - }, - package_dir={'': 'src'}, - python_requires='>=3.8', - package_data={ - 'plex-api-client': ['py.typed'] - }, -) diff --git a/src/plex_api/__init__.py b/src/plex_api/__init__.py deleted file mode 100644 index e6c0dee..0000000 --- a/src/plex_api/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .sdk import * -from .sdkconfiguration import * diff --git a/src/plex_api/_hooks/__init__.py b/src/plex_api/_hooks/__init__.py deleted file mode 100644 index 5fd985a..0000000 --- a/src/plex_api/_hooks/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .sdkhooks import * -from .types import * -from .registration import * diff --git a/src/plex_api/activities.py b/src/plex_api/activities.py deleted file mode 100644 index 134ec31..0000000 --- a/src/plex_api/activities.py +++ /dev/null @@ -1,155 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Activities: - r"""Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - - They must contain an `type` which is used by clients to distinguish the specific activity. - - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. - """ - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_server_activities(self) -> operations.GetServerActivitiesResponse: - r"""Get Server Activities - Get Server Activities - """ - hook_ctx = HookContext(operation_id='getServerActivities', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/activities' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetServerActivitiesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetServerActivitiesResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetServerActivitiesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def cancel_server_activities(self, activity_uuid: str) -> operations.CancelServerActivitiesResponse: - r"""Cancel Server Activities - Cancel Server Activities - """ - hook_ctx = HookContext(operation_id='cancelServerActivities', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.CancelServerActivitiesRequest( - activity_uuid=activity_uuid, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/activities/{activityUUID}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.CancelServerActivitiesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.CancelServerActivitiesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/authentication.py b/src/plex_api/authentication.py deleted file mode 100644 index 0defa0e..0000000 --- a/src/plex_api/authentication.py +++ /dev/null @@ -1,149 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations - -class Authentication: - r"""API Calls regarding authentication for Plex Media Server""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_transient_token(self, type_: operations.GetTransientTokenQueryParamType, scope: operations.Scope) -> operations.GetTransientTokenResponse: - r"""Get a Transient Token. - This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - """ - hook_ctx = HookContext(operation_id='getTransientToken', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetTransientTokenRequest( - type=type_, - scope=scope, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/security/token' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetTransientTokenResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetTransientTokenResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_source_connection_information(self, source: str) -> operations.GetSourceConnectionInformationResponse: - r"""Get Source Connection Information - If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - Note: requires Plex Media Server >= 1.15.4. - """ - hook_ctx = HookContext(operation_id='getSourceConnectionInformation', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetSourceConnectionInformationRequest( - source=source, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/security/resources' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetSourceConnectionInformationResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetSourceConnectionInformationResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/butler.py b/src/plex_api/butler.py deleted file mode 100644 index 20e86d3..0000000 --- a/src/plex_api/butler.py +++ /dev/null @@ -1,340 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Butler: - r"""Butler is the task manager of the Plex Media Server Ecosystem.""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_butler_tasks(self) -> operations.GetButlerTasksResponse: - r"""Get Butler tasks - Returns a list of butler tasks - """ - hook_ctx = HookContext(operation_id='getButlerTasks', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/butler' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetButlerTasksResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetButlerTasksResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetButlerTasksResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def start_all_tasks(self) -> operations.StartAllTasksResponse: - r"""Start all Butler tasks - This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - 1. Any tasks not scheduled to run on the current day will be skipped. - 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - 4. If we are outside the configured window, the task will start immediately. - """ - hook_ctx = HookContext(operation_id='startAllTasks', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/butler' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StartAllTasksResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StartAllTasksResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def stop_all_tasks(self) -> operations.StopAllTasksResponse: - r"""Stop all Butler tasks - This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - """ - hook_ctx = HookContext(operation_id='stopAllTasks', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/butler' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StopAllTasksResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StopAllTasksResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def start_task(self, task_name: operations.TaskName) -> operations.StartTaskResponse: - r"""Start a single Butler task - This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - 1. Any tasks not scheduled to run on the current day will be skipped. - 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - 4. If we are outside the configured window, the task will start immediately. - """ - hook_ctx = HookContext(operation_id='startTask', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.StartTaskRequest( - task_name=task_name, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/butler/{taskName}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StartTaskResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code in [200, 202]: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StartTaskResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def stop_task(self, task_name: operations.PathParamTaskName) -> operations.StopTaskResponse: - r"""Stop a single Butler task - This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. - """ - hook_ctx = HookContext(operation_id='stopTask', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.StopTaskRequest( - task_name=task_name, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/butler/{taskName}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','404','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StopTaskResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code == 404 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StopTaskResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/hubs.py b/src/plex_api/hubs.py deleted file mode 100644 index d7c7196..0000000 --- a/src/plex_api/hubs.py +++ /dev/null @@ -1,163 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Hubs: - r"""Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_global_hubs(self, count: Optional[float] = None, only_transient: Optional[operations.OnlyTransient] = None) -> operations.GetGlobalHubsResponse: - r"""Get Global Hubs - Get Global Hubs filtered by the parameters provided. - """ - hook_ctx = HookContext(operation_id='getGlobalHubs', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetGlobalHubsRequest( - count=count, - only_transient=only_transient, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/hubs' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetGlobalHubsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetGlobalHubsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetGlobalHubsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_library_hubs(self, section_id: float, count: Optional[float] = None, only_transient: Optional[operations.QueryParamOnlyTransient] = None) -> operations.GetLibraryHubsResponse: - r"""Get library specific hubs - This endpoint will return a list of library specific hubs - """ - hook_ctx = HookContext(operation_id='getLibraryHubs', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetLibraryHubsRequest( - section_id=section_id, - count=count, - only_transient=only_transient, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/hubs/sections/{sectionId}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetLibraryHubsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetLibraryHubsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetLibraryHubsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/library.py b/src/plex_api/library.py deleted file mode 100644 index 9c99c9f..0000000 --- a/src/plex_api/library.py +++ /dev/null @@ -1,911 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Any, Optional - -class Library: - r"""API Calls interacting with Plex Media Server Libraries""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_file_hash(self, url: str, type_: Optional[float] = None) -> operations.GetFileHashResponse: - r"""Get Hash Value - This resource returns hash values for local files - """ - hook_ctx = HookContext(operation_id='getFileHash', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetFileHashRequest( - url=url, - type=type_, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/library/hashes' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetFileHashResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetFileHashResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_recently_added(self) -> operations.GetRecentlyAddedResponse: - r"""Get Recently Added - This endpoint will return the recently added content. - """ - hook_ctx = HookContext(operation_id='getRecentlyAdded', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/library/recentlyAdded' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetRecentlyAddedResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetRecentlyAddedResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetRecentlyAddedResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_libraries(self) -> operations.GetLibrariesResponse: - r"""Get All Libraries - A library section (commonly referred to as just a library) is a collection of media. - Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - - Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - """ - hook_ctx = HookContext(operation_id='getLibraries', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/library/sections' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetLibrariesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetLibrariesResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetLibrariesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_library(self, section_id: float, include_details: Optional[operations.IncludeDetails] = None) -> operations.GetLibraryResponse: - r"""Get Library Details - ## Library Details Endpoint - - This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - - The details include: - - ### Directories - Organized into three categories: - - - **Primary Directories**: - - Used in some clients for quick access to media subsets (e.g., \"All\", \"On Deck\"). - - Most can be replicated via media queries. - - Customizable by users. - - - **Secondary Directories**: - - Marked with `secondary=\"1\"`. - - Used in older clients for structured navigation. - - - **Special Directories**: - - Includes a \"By Folder\" entry for filesystem-based browsing. - - Contains an obsolete `search=\"1\"` entry for on-the-fly search dialog creation. - - ### Types - Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - - - **Type Object Attributes**: - - `key`: Endpoint for the media list of this type. - - `type`: Metadata type (if standard Plex type). - - `title`: Title for this content type (e.g., \"Movies\"). - - - **Filter Objects**: - - Subset of the media query language. - - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - - - **Sort Objects**: - - Description of sort fields. - - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - - > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - """ - hook_ctx = HookContext(operation_id='getLibrary', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetLibraryRequest( - section_id=section_id, - include_details=include_details, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/sections/{sectionId}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetLibraryResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetLibraryResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetLibraryResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def delete_library(self, section_id: float) -> operations.DeleteLibraryResponse: - r"""Delete Library Section - Delate a library using a specific section - """ - hook_ctx = HookContext(operation_id='deleteLibrary', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.DeleteLibraryRequest( - section_id=section_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/sections/{sectionId}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.DeleteLibraryResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.DeleteLibraryResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_library_items(self, section_id: Any, tag: operations.Tag, include_guids: Optional[int] = None) -> operations.GetLibraryItemsResponse: - r"""Get Library Items - Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - - `all`: All items in the section. - - `unwatched`: Items that have not been played. - - `newest`: Items that are recently released. - - `recentlyAdded`: Items that are recently added to the library. - - `recentlyViewed`: Items that were recently viewed. - - `onDeck`: Items to continue watching. - - `collection`: Items categorized by collection. - - `edition`: Items categorized by edition. - - `genre`: Items categorized by genre. - - `year`: Items categorized by year of release. - - `decade`: Items categorized by decade. - - `director`: Items categorized by director. - - `actor`: Items categorized by starring actor. - - `country`: Items categorized by country of origin. - - `contentRating`: Items categorized by content rating. - - `rating`: Items categorized by rating. - - `resolution`: Items categorized by resolution. - - `firstCharacter`: Items categorized by the first letter. - - `folder`: Items categorized by folder. - """ - hook_ctx = HookContext(operation_id='getLibraryItems', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetLibraryItemsRequest( - section_id=section_id, - tag=tag, - include_guids=include_guids, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/sections/{sectionId}/{tag}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetLibraryItemsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetLibraryItemsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetLibraryItemsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def refresh_library(self, section_id: float) -> operations.RefreshLibraryResponse: - r"""Refresh Library - This endpoint Refreshes the library. - """ - hook_ctx = HookContext(operation_id='refreshLibrary', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.RefreshLibraryRequest( - section_id=section_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/sections/{sectionId}/refresh', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.RefreshLibraryResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.RefreshLibraryResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def search_library(self, section_id: int, type_: operations.Type) -> operations.SearchLibraryResponse: - r"""Search Library - Search for content within a specific section of the library. - - ### Types - Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - - - **Type Object Attributes**: - - `type`: Metadata type (if standard Plex type). - - `title`: Title for this content type (e.g., \"Movies\"). - - - **Filter Objects**: - - Subset of the media query language. - - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - - - **Sort Objects**: - - Description of sort fields. - - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - - > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - """ - hook_ctx = HookContext(operation_id='searchLibrary', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.SearchLibraryRequest( - section_id=section_id, - type=type_, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/sections/{sectionId}/search', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.SearchLibraryResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.SearchLibraryResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.SearchLibraryResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_metadata(self, rating_key: float) -> operations.GetMetadataResponse: - r"""Get Items Metadata - This endpoint will return the metadata of a library item specified with the ratingKey. - """ - hook_ctx = HookContext(operation_id='getMetadata', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetMetadataRequest( - rating_key=rating_key, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/metadata/{ratingKey}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetMetadataResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetMetadataResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetMetadataResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_metadata_children(self, rating_key: float, include_elements: Optional[str] = None) -> operations.GetMetadataChildrenResponse: - r"""Get Items Children - This endpoint will return the children of of a library item specified with the ratingKey. - """ - hook_ctx = HookContext(operation_id='getMetadataChildren', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetMetadataChildrenRequest( - rating_key=rating_key, - include_elements=include_elements, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/library/metadata/{ratingKey}/children', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetMetadataChildrenResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetMetadataChildrenResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetMetadataChildrenResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_top_watched_content(self, type_: int, include_guids: Optional[int] = None) -> operations.GetTopWatchedContentResponse: - r"""Get Top Watched Content - This endpoint will return the top watched content from libraries of a certain type - """ - hook_ctx = HookContext(operation_id='getTopWatchedContent', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetTopWatchedContentRequest( - type=type_, - include_guids=include_guids, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/library/all/top' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetTopWatchedContentResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTopWatchedContentResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_on_deck(self) -> operations.GetOnDeckResponse: - r"""Get On Deck - This endpoint will return the on deck content. - """ - hook_ctx = HookContext(operation_id='getOnDeck', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/library/onDeck' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetOnDeckResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetOnDeckResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetOnDeckResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/log.py b/src/plex_api/log.py deleted file mode 100644 index 6d88f7a..0000000 --- a/src/plex_api/log.py +++ /dev/null @@ -1,229 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations - -class Log: - r"""Submit logs to the Log Handler for Plex Media Server""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def log_line(self, level: operations.Level, message: str, source: str) -> operations.LogLineResponse: - r"""Logging a single line message. - This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - """ - hook_ctx = HookContext(operation_id='logLine', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.LogLineRequest( - level=level, - message=message, - source=source, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/log' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.LogLineResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.LogLineResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def log_multi_line(self, request: str) -> operations.LogMultiLineResponse: - r"""Logging a multi-line message - This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - It accepts a text/plain request body, where each line represents a distinct log entry. - Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - - Log entries are separated by a newline character (`\n`). - Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - - The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - - `0`: Error - Critical issues that require immediate attention. - - `1`: Warning - Important events that are not critical but may indicate potential issues. - - `2`: Info - General informational messages about system operation. - - `3`: Debug - Detailed information useful for debugging purposes. - - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - - The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - - Example of a single log entry format: - `level=4&message=Sample%20log%20entry&source=applicationName` - - Ensure each parameter is properly URL-encoded to avoid interpretation issues. - """ - hook_ctx = HookContext(operation_id='logMultiLine', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/log' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - req_content_type, data, form = utils.serialize_request_body(request, str, "request", False, False, 'string') - if req_content_type is not None and req_content_type not in ('multipart/form-data', 'multipart/mixed'): - headers['content-type'] = req_content_type - if data is None and form is None: - raise Exception('request body is required') - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, data=data, files=form, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.LogMultiLineResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.LogMultiLineResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def enable_paper_trail(self) -> operations.EnablePaperTrailResponse: - r"""Enabling Papertrail - This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. - """ - hook_ctx = HookContext(operation_id='enablePaperTrail', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/log/networked' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','403','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.EnablePaperTrailResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code == 403 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.EnablePaperTrailResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/media.py b/src/plex_api/media.py deleted file mode 100644 index 3a948bc..0000000 --- a/src/plex_api/media.py +++ /dev/null @@ -1,214 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations - -class Media: - r"""API Calls interacting with Plex Media Server Media""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def mark_played(self, key: float) -> operations.MarkPlayedResponse: - r"""Mark Media Played - This will mark the provided media key as Played. - """ - hook_ctx = HookContext(operation_id='markPlayed', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.MarkPlayedRequest( - key=key, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/:/scrobble' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.MarkPlayedResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.MarkPlayedResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def mark_unplayed(self, key: float) -> operations.MarkUnplayedResponse: - r"""Mark Media Unplayed - This will mark the provided media key as Unplayed. - """ - hook_ctx = HookContext(operation_id='markUnplayed', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.MarkUnplayedRequest( - key=key, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/:/unscrobble' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.MarkUnplayedResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.MarkUnplayedResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def update_play_progress(self, key: str, time: float, state: str) -> operations.UpdatePlayProgressResponse: - r"""Update Media Play Progress - This API command can be used to update the play progress of a media item. - """ - hook_ctx = HookContext(operation_id='updatePlayProgress', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.UpdatePlayProgressRequest( - key=key, - time=time, - state=state, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/:/progress' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.UpdatePlayProgressResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.UpdatePlayProgressResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/models/__init__.py b/src/plex_api/models/__init__.py deleted file mode 100644 index 722bb99..0000000 --- a/src/plex_api/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - - -# package diff --git a/src/plex_api/models/components/__init__.py b/src/plex_api/models/components/__init__.py deleted file mode 100644 index 4e48d07..0000000 --- a/src/plex_api/models/components/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .security import * - -__all__ = ["Security"] diff --git a/src/plex_api/models/components/security.py b/src/plex_api/models/components/security.py deleted file mode 100644 index da6694a..0000000 --- a/src/plex_api/models/components/security.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses - - -@dataclasses.dataclass -class Security: - access_token: str = dataclasses.field(metadata={'security': { 'scheme': True, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'X-Plex-Token' }}) - - diff --git a/src/plex_api/models/errors/__init__.py b/src/plex_api/models/errors/__init__.py deleted file mode 100644 index 2edd086..0000000 --- a/src/plex_api/models/errors/__init__.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .addplaylistcontents import * -from .applyupdates import * -from .cancelserveractivities import * -from .checkforupdates import * -from .clearplaylistcontents import * -from .createplaylist import * -from .deletelibrary import * -from .deleteplaylist import * -from .enablepapertrail import * -from .getavailableclients import * -from .getbandwidthstatistics import * -from .getbutlertasks import * -from .getdevices import * -from .getfilehash import * -from .getglobalhubs import * -from .gethomedata import * -from .getlibraries import * -from .getlibrary import * -from .getlibraryhubs import * -from .getlibraryitems import * -from .getmetadata import * -from .getmetadatachildren import * -from .getmyplexaccount import * -from .getondeck import * -from .getpin import * -from .getplaylist import * -from .getplaylistcontents import * -from .getplaylists import * -from .getrecentlyadded import * -from .getresizedphoto import * -from .getresourcesstatistics import * -from .getsearchresults import * -from .getserveractivities import * -from .getservercapabilities import * -from .getserveridentity import * -from .getserverlist import * -from .getserverpreferences import * -from .getsessionhistory import * -from .getsessions import * -from .getsourceconnectioninformation import * -from .getstatistics import * -from .gettimeline import * -from .gettoken import * -from .gettranscodesessions import * -from .gettransienttoken import * -from .getupdatestatus import * -from .getwatchlist import * -from .logline import * -from .logmultiline import * -from .markplayed import * -from .markunplayed import * -from .performsearch import * -from .performvoicesearch import * -from .refreshlibrary import * -from .sdkerror import * -from .searchlibrary import * -from .startalltasks import * -from .starttask import * -from .startuniversaltranscode import * -from .stopalltasks import * -from .stoptask import * -from .stoptranscodesession import * -from .updateplaylist import * -from .updateplayprogress import * -from .uploadplaylist import * - -__all__ = ["AddPlaylistContentsErrors","AddPlaylistContentsResponseBody","ApplyUpdatesErrors","ApplyUpdatesResponseBody","CancelServerActivitiesErrors","CancelServerActivitiesResponseBody","CheckForUpdatesErrors","CheckForUpdatesResponseBody","ClearPlaylistContentsErrors","ClearPlaylistContentsResponseBody","CreatePlaylistErrors","CreatePlaylistResponseBody","DeleteLibraryErrors","DeleteLibraryResponseBody","DeletePlaylistErrors","DeletePlaylistResponseBody","EnablePaperTrailErrors","EnablePaperTrailResponseBody","Errors","GetAvailableClientsErrors","GetAvailableClientsResponseBody","GetBandwidthStatisticsErrors","GetBandwidthStatisticsResponseBody","GetButlerTasksErrors","GetButlerTasksResponseBody","GetDevicesErrors","GetDevicesResponseBody","GetFileHashErrors","GetFileHashResponseBody","GetGlobalHubsErrors","GetGlobalHubsResponseBody","GetHomeDataErrors","GetHomeDataResponseBody","GetLibrariesErrors","GetLibrariesResponseBody","GetLibraryErrors","GetLibraryHubsErrors","GetLibraryHubsResponseBody","GetLibraryItemsErrors","GetLibraryItemsResponseBody","GetLibraryResponseBody","GetMetadataChildrenErrors","GetMetadataChildrenResponseBody","GetMetadataErrors","GetMetadataResponseBody","GetMyPlexAccountErrors","GetMyPlexAccountResponseBody","GetOnDeckErrors","GetOnDeckResponseBody","GetPinErrors","GetPinResponseBody","GetPlaylistContentsErrors","GetPlaylistContentsResponseBody","GetPlaylistErrors","GetPlaylistResponseBody","GetPlaylistsErrors","GetPlaylistsResponseBody","GetRecentlyAddedErrors","GetRecentlyAddedResponseBody","GetResizedPhotoErrors","GetResizedPhotoResponseBody","GetResourcesStatisticsErrors","GetResourcesStatisticsResponseBody","GetSearchResultsErrors","GetSearchResultsResponseBody","GetServerActivitiesErrors","GetServerActivitiesResponseBody","GetServerCapabilitiesResponseBody","GetServerIdentityErrors","GetServerIdentityResponseBody","GetServerListErrors","GetServerListResponseBody","GetServerPreferencesErrors","GetServerPreferencesResponseBody","GetSessionHistoryErrors","GetSessionHistoryResponseBody","GetSessionsErrors","GetSessionsResponseBody","GetSourceConnectionInformationErrors","GetSourceConnectionInformationResponseBody","GetStatisticsErrors","GetStatisticsResponseBody","GetTimelineErrors","GetTimelineResponseBody","GetTokenErrors","GetTokenResponseBody","GetTranscodeSessionsErrors","GetTranscodeSessionsResponseBody","GetTransientTokenErrors","GetTransientTokenResponseBody","GetUpdateStatusErrors","GetUpdateStatusResponseBody","GetWatchlistErrors","GetWatchlistResponseBody","LogLineErrors","LogLineResponseBody","LogMultiLineErrors","LogMultiLineResponseBody","MarkPlayedErrors","MarkPlayedResponseBody","MarkUnplayedErrors","MarkUnplayedResponseBody","PerformSearchErrors","PerformSearchResponseBody","PerformVoiceSearchErrors","PerformVoiceSearchResponseBody","RefreshLibraryErrors","RefreshLibraryResponseBody","SDKError","SearchLibraryErrors","SearchLibraryResponseBody","StartAllTasksErrors","StartAllTasksResponseBody","StartTaskErrors","StartTaskResponseBody","StartUniversalTranscodeErrors","StartUniversalTranscodeResponseBody","StopAllTasksErrors","StopAllTasksResponseBody","StopTaskErrors","StopTaskResponseBody","StopTranscodeSessionErrors","StopTranscodeSessionResponseBody","UpdatePlayProgressErrors","UpdatePlayProgressResponseBody","UpdatePlaylistErrors","UpdatePlaylistResponseBody","UploadPlaylistErrors","UploadPlaylistResponseBody"] diff --git a/src/plex_api/models/errors/addplaylistcontents.py b/src/plex_api/models/errors/addplaylistcontents.py deleted file mode 100644 index 1033ad7..0000000 --- a/src/plex_api/models/errors/addplaylistcontents.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class AddPlaylistContentsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class AddPlaylistContentsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[AddPlaylistContentsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/applyupdates.py b/src/plex_api/models/errors/applyupdates.py deleted file mode 100644 index bcba7df..0000000 --- a/src/plex_api/models/errors/applyupdates.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class ApplyUpdatesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ApplyUpdatesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[ApplyUpdatesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/cancelserveractivities.py b/src/plex_api/models/errors/cancelserveractivities.py deleted file mode 100644 index f6c70bd..0000000 --- a/src/plex_api/models/errors/cancelserveractivities.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CancelServerActivitiesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class CancelServerActivitiesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[CancelServerActivitiesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/checkforupdates.py b/src/plex_api/models/errors/checkforupdates.py deleted file mode 100644 index 0b7aebe..0000000 --- a/src/plex_api/models/errors/checkforupdates.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CheckForUpdatesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class CheckForUpdatesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[CheckForUpdatesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/clearplaylistcontents.py b/src/plex_api/models/errors/clearplaylistcontents.py deleted file mode 100644 index 96e2339..0000000 --- a/src/plex_api/models/errors/clearplaylistcontents.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class ClearPlaylistContentsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ClearPlaylistContentsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[ClearPlaylistContentsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/createplaylist.py b/src/plex_api/models/errors/createplaylist.py deleted file mode 100644 index b0f5402..0000000 --- a/src/plex_api/models/errors/createplaylist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CreatePlaylistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class CreatePlaylistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[CreatePlaylistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/deletelibrary.py b/src/plex_api/models/errors/deletelibrary.py deleted file mode 100644 index 1dcd69e..0000000 --- a/src/plex_api/models/errors/deletelibrary.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class DeleteLibraryErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class DeleteLibraryResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[DeleteLibraryErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/deleteplaylist.py b/src/plex_api/models/errors/deleteplaylist.py deleted file mode 100644 index 312bc63..0000000 --- a/src/plex_api/models/errors/deleteplaylist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class DeletePlaylistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class DeletePlaylistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[DeletePlaylistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/enablepapertrail.py b/src/plex_api/models/errors/enablepapertrail.py deleted file mode 100644 index a7d6318..0000000 --- a/src/plex_api/models/errors/enablepapertrail.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class EnablePaperTrailErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class EnablePaperTrailResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[EnablePaperTrailErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getavailableclients.py b/src/plex_api/models/errors/getavailableclients.py deleted file mode 100644 index c480687..0000000 --- a/src/plex_api/models/errors/getavailableclients.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetAvailableClientsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetAvailableClientsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetAvailableClientsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getbandwidthstatistics.py b/src/plex_api/models/errors/getbandwidthstatistics.py deleted file mode 100644 index fb872d9..0000000 --- a/src/plex_api/models/errors/getbandwidthstatistics.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetBandwidthStatisticsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBandwidthStatisticsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetBandwidthStatisticsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getbutlertasks.py b/src/plex_api/models/errors/getbutlertasks.py deleted file mode 100644 index 1041c0c..0000000 --- a/src/plex_api/models/errors/getbutlertasks.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetButlerTasksErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetButlerTasksResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetButlerTasksErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getdevices.py b/src/plex_api/models/errors/getdevices.py deleted file mode 100644 index d0cf474..0000000 --- a/src/plex_api/models/errors/getdevices.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetDevicesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetDevicesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetDevicesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getfilehash.py b/src/plex_api/models/errors/getfilehash.py deleted file mode 100644 index 2fa16d8..0000000 --- a/src/plex_api/models/errors/getfilehash.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetFileHashErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetFileHashResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetFileHashErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getglobalhubs.py b/src/plex_api/models/errors/getglobalhubs.py deleted file mode 100644 index 2f90c28..0000000 --- a/src/plex_api/models/errors/getglobalhubs.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetGlobalHubsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetGlobalHubsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetGlobalHubsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/gethomedata.py b/src/plex_api/models/errors/gethomedata.py deleted file mode 100644 index a730472..0000000 --- a/src/plex_api/models/errors/gethomedata.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetHomeDataErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetHomeDataResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetHomeDataErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getlibraries.py b/src/plex_api/models/errors/getlibraries.py deleted file mode 100644 index 88de3b6..0000000 --- a/src/plex_api/models/errors/getlibraries.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibrariesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetLibrariesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetLibrariesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getlibrary.py b/src/plex_api/models/errors/getlibrary.py deleted file mode 100644 index 0f9f501..0000000 --- a/src/plex_api/models/errors/getlibrary.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetLibraryResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetLibraryErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getlibraryhubs.py b/src/plex_api/models/errors/getlibraryhubs.py deleted file mode 100644 index 0b3321e..0000000 --- a/src/plex_api/models/errors/getlibraryhubs.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetLibraryHubsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetLibraryHubsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getlibraryitems.py b/src/plex_api/models/errors/getlibraryitems.py deleted file mode 100644 index 8a252c6..0000000 --- a/src/plex_api/models/errors/getlibraryitems.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetLibraryItemsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetLibraryItemsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getmetadata.py b/src/plex_api/models/errors/getmetadata.py deleted file mode 100644 index c4dee66..0000000 --- a/src/plex_api/models/errors/getmetadata.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetMetadataResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetMetadataErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getmetadatachildren.py b/src/plex_api/models/errors/getmetadatachildren.py deleted file mode 100644 index c3befc6..0000000 --- a/src/plex_api/models/errors/getmetadatachildren.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataChildrenErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetMetadataChildrenResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetMetadataChildrenErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getmyplexaccount.py b/src/plex_api/models/errors/getmyplexaccount.py deleted file mode 100644 index fb2cedb..0000000 --- a/src/plex_api/models/errors/getmyplexaccount.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMyPlexAccountErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetMyPlexAccountResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetMyPlexAccountErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getondeck.py b/src/plex_api/models/errors/getondeck.py deleted file mode 100644 index c99efd9..0000000 --- a/src/plex_api/models/errors/getondeck.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetOnDeckResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetOnDeckErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getpin.py b/src/plex_api/models/errors/getpin.py deleted file mode 100644 index 8aedc57..0000000 --- a/src/plex_api/models/errors/getpin.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPinErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPinResponseBody(Exception): - r"""X-Plex-Client-Identifier is missing""" - errors: Optional[List[GetPinErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getplaylist.py b/src/plex_api/models/errors/getplaylist.py deleted file mode 100644 index 3fd7a13..0000000 --- a/src/plex_api/models/errors/getplaylist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPlaylistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetPlaylistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getplaylistcontents.py b/src/plex_api/models/errors/getplaylistcontents.py deleted file mode 100644 index f8d24cf..0000000 --- a/src/plex_api/models/errors/getplaylistcontents.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPlaylistContentsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetPlaylistContentsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getplaylists.py b/src/plex_api/models/errors/getplaylists.py deleted file mode 100644 index 9f44277..0000000 --- a/src/plex_api/models/errors/getplaylists.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPlaylistsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetPlaylistsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getrecentlyadded.py b/src/plex_api/models/errors/getrecentlyadded.py deleted file mode 100644 index a71f7a1..0000000 --- a/src/plex_api/models/errors/getrecentlyadded.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetRecentlyAddedErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetRecentlyAddedResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetRecentlyAddedErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getresizedphoto.py b/src/plex_api/models/errors/getresizedphoto.py deleted file mode 100644 index 5c9be7f..0000000 --- a/src/plex_api/models/errors/getresizedphoto.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetResizedPhotoErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetResizedPhotoResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetResizedPhotoErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getresourcesstatistics.py b/src/plex_api/models/errors/getresourcesstatistics.py deleted file mode 100644 index abdb2ba..0000000 --- a/src/plex_api/models/errors/getresourcesstatistics.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetResourcesStatisticsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetResourcesStatisticsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetResourcesStatisticsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getsearchresults.py b/src/plex_api/models/errors/getsearchresults.py deleted file mode 100644 index 6030d8f..0000000 --- a/src/plex_api/models/errors/getsearchresults.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSearchResultsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetSearchResultsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getserveractivities.py b/src/plex_api/models/errors/getserveractivities.py deleted file mode 100644 index 067b9fc..0000000 --- a/src/plex_api/models/errors/getserveractivities.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerActivitiesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetServerActivitiesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetServerActivitiesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getservercapabilities.py b/src/plex_api/models/errors/getservercapabilities.py deleted file mode 100644 index 7712afc..0000000 --- a/src/plex_api/models/errors/getservercapabilities.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Errors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetServerCapabilitiesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[Errors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getserveridentity.py b/src/plex_api/models/errors/getserveridentity.py deleted file mode 100644 index 39d34d4..0000000 --- a/src/plex_api/models/errors/getserveridentity.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerIdentityErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetServerIdentityResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetServerIdentityErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getserverlist.py b/src/plex_api/models/errors/getserverlist.py deleted file mode 100644 index 00fe51e..0000000 --- a/src/plex_api/models/errors/getserverlist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerListErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetServerListResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetServerListErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getserverpreferences.py b/src/plex_api/models/errors/getserverpreferences.py deleted file mode 100644 index 7117505..0000000 --- a/src/plex_api/models/errors/getserverpreferences.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerPreferencesErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetServerPreferencesResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetServerPreferencesErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getsessionhistory.py b/src/plex_api/models/errors/getsessionhistory.py deleted file mode 100644 index 1625ed9..0000000 --- a/src/plex_api/models/errors/getsessionhistory.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionHistoryErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSessionHistoryResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetSessionHistoryErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getsessions.py b/src/plex_api/models/errors/getsessions.py deleted file mode 100644 index ff5f743..0000000 --- a/src/plex_api/models/errors/getsessions.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSessionsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetSessionsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getsourceconnectioninformation.py b/src/plex_api/models/errors/getsourceconnectioninformation.py deleted file mode 100644 index 9e2a07b..0000000 --- a/src/plex_api/models/errors/getsourceconnectioninformation.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSourceConnectionInformationErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSourceConnectionInformationResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetSourceConnectionInformationErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getstatistics.py b/src/plex_api/models/errors/getstatistics.py deleted file mode 100644 index 1a40e8c..0000000 --- a/src/plex_api/models/errors/getstatistics.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetStatisticsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetStatisticsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetStatisticsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/gettimeline.py b/src/plex_api/models/errors/gettimeline.py deleted file mode 100644 index b1fbe15..0000000 --- a/src/plex_api/models/errors/gettimeline.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTimelineErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTimelineResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetTimelineErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/gettoken.py b/src/plex_api/models/errors/gettoken.py deleted file mode 100644 index 826a92d..0000000 --- a/src/plex_api/models/errors/gettoken.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTokenErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTokenResponseBody(Exception): - r"""X-Plex-Client-Identifier is missing""" - errors: Optional[List[GetTokenErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/gettranscodesessions.py b/src/plex_api/models/errors/gettranscodesessions.py deleted file mode 100644 index 2f0f105..0000000 --- a/src/plex_api/models/errors/gettranscodesessions.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTranscodeSessionsErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTranscodeSessionsResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetTranscodeSessionsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/gettransienttoken.py b/src/plex_api/models/errors/gettransienttoken.py deleted file mode 100644 index 78dd069..0000000 --- a/src/plex_api/models/errors/gettransienttoken.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTransientTokenErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTransientTokenResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetTransientTokenErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getupdatestatus.py b/src/plex_api/models/errors/getupdatestatus.py deleted file mode 100644 index 4173dcb..0000000 --- a/src/plex_api/models/errors/getupdatestatus.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetUpdateStatusErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetUpdateStatusResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetUpdateStatusErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/getwatchlist.py b/src/plex_api/models/errors/getwatchlist.py deleted file mode 100644 index f093491..0000000 --- a/src/plex_api/models/errors/getwatchlist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetWatchlistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetWatchlistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[GetWatchlistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/logline.py b/src/plex_api/models/errors/logline.py deleted file mode 100644 index 4dc73c1..0000000 --- a/src/plex_api/models/errors/logline.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class LogLineErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class LogLineResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[LogLineErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/logmultiline.py b/src/plex_api/models/errors/logmultiline.py deleted file mode 100644 index 218022e..0000000 --- a/src/plex_api/models/errors/logmultiline.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class LogMultiLineErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class LogMultiLineResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[LogMultiLineErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/markplayed.py b/src/plex_api/models/errors/markplayed.py deleted file mode 100644 index 5106a52..0000000 --- a/src/plex_api/models/errors/markplayed.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class MarkPlayedErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class MarkPlayedResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[MarkPlayedErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/markunplayed.py b/src/plex_api/models/errors/markunplayed.py deleted file mode 100644 index 319b7bc..0000000 --- a/src/plex_api/models/errors/markunplayed.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class MarkUnplayedErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class MarkUnplayedResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[MarkUnplayedErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/performsearch.py b/src/plex_api/models/errors/performsearch.py deleted file mode 100644 index b93eb5e..0000000 --- a/src/plex_api/models/errors/performsearch.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class PerformSearchErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class PerformSearchResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[PerformSearchErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/performvoicesearch.py b/src/plex_api/models/errors/performvoicesearch.py deleted file mode 100644 index 8bba659..0000000 --- a/src/plex_api/models/errors/performvoicesearch.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class PerformVoiceSearchErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class PerformVoiceSearchResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[PerformVoiceSearchErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/refreshlibrary.py b/src/plex_api/models/errors/refreshlibrary.py deleted file mode 100644 index f4089b7..0000000 --- a/src/plex_api/models/errors/refreshlibrary.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class RefreshLibraryErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class RefreshLibraryResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[RefreshLibraryErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/sdkerror.py b/src/plex_api/models/errors/sdkerror.py deleted file mode 100644 index 6bb02bb..0000000 --- a/src/plex_api/models/errors/sdkerror.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http - - -class SDKError(Exception): - """Represents an error returned by the API.""" - message: str - status_code: int - body: str - raw_response: requests_http.Response - - def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response): - self.message = message - self.status_code = status_code - self.body = body - self.raw_response = raw_response - - def __str__(self): - body = '' - if len(self.body) > 0: - body = f'\n{self.body}' - - return f'{self.message}: Status {self.status_code}{body}' diff --git a/src/plex_api/models/errors/searchlibrary.py b/src/plex_api/models/errors/searchlibrary.py deleted file mode 100644 index def97c8..0000000 --- a/src/plex_api/models/errors/searchlibrary.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class SearchLibraryErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class SearchLibraryResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[SearchLibraryErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/startalltasks.py b/src/plex_api/models/errors/startalltasks.py deleted file mode 100644 index e27c660..0000000 --- a/src/plex_api/models/errors/startalltasks.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StartAllTasksErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StartAllTasksResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StartAllTasksErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/starttask.py b/src/plex_api/models/errors/starttask.py deleted file mode 100644 index 221ab73..0000000 --- a/src/plex_api/models/errors/starttask.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StartTaskErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StartTaskResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StartTaskErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/startuniversaltranscode.py b/src/plex_api/models/errors/startuniversaltranscode.py deleted file mode 100644 index f55cae5..0000000 --- a/src/plex_api/models/errors/startuniversaltranscode.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StartUniversalTranscodeErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StartUniversalTranscodeResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StartUniversalTranscodeErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/stopalltasks.py b/src/plex_api/models/errors/stopalltasks.py deleted file mode 100644 index b5e7f43..0000000 --- a/src/plex_api/models/errors/stopalltasks.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StopAllTasksErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StopAllTasksResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StopAllTasksErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/stoptask.py b/src/plex_api/models/errors/stoptask.py deleted file mode 100644 index 693e724..0000000 --- a/src/plex_api/models/errors/stoptask.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StopTaskErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StopTaskResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StopTaskErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/stoptranscodesession.py b/src/plex_api/models/errors/stoptranscodesession.py deleted file mode 100644 index ae41d7c..0000000 --- a/src/plex_api/models/errors/stoptranscodesession.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StopTranscodeSessionErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class StopTranscodeSessionResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[StopTranscodeSessionErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/updateplaylist.py b/src/plex_api/models/errors/updateplaylist.py deleted file mode 100644 index e1109a2..0000000 --- a/src/plex_api/models/errors/updateplaylist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class UpdatePlaylistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class UpdatePlaylistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[UpdatePlaylistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/updateplayprogress.py b/src/plex_api/models/errors/updateplayprogress.py deleted file mode 100644 index 8935e76..0000000 --- a/src/plex_api/models/errors/updateplayprogress.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class UpdatePlayProgressErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class UpdatePlayProgressResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[UpdatePlayProgressErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/errors/uploadplaylist.py b/src/plex_api/models/errors/uploadplaylist.py deleted file mode 100644 index a1aacbf..0000000 --- a/src/plex_api/models/errors/uploadplaylist.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class UploadPlaylistErrors: - code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class UploadPlaylistResponseBody(Exception): - r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - errors: Optional[List[UploadPlaylistErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }}) - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }}) - r"""Raw HTTP response; suitable for custom response parsing""" - - - def __str__(self) -> str: - return utils.marshal_json(self, type(self)) diff --git a/src/plex_api/models/internal/__init__.py b/src/plex_api/models/internal/__init__.py deleted file mode 100644 index 51f9e9d..0000000 --- a/src/plex_api/models/internal/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .globals import * - -__all__ = ["Globals"] diff --git a/src/plex_api/models/internal/globals.py b/src/plex_api/models/internal/globals.py deleted file mode 100644 index d72e7f6..0000000 --- a/src/plex_api/models/internal/globals.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -from typing import Optional - - -@dataclasses.dataclass -class Globals: - x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }}) - 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) - """ - - diff --git a/src/plex_api/models/operations/__init__.py b/src/plex_api/models/operations/__init__.py deleted file mode 100644 index bf09e1f..0000000 --- a/src/plex_api/models/operations/__init__.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .addplaylistcontents import * -from .applyupdates import * -from .cancelserveractivities import * -from .checkforupdates import * -from .clearplaylistcontents import * -from .createplaylist import * -from .deletelibrary import * -from .deleteplaylist import * -from .enablepapertrail import * -from .getavailableclients import * -from .getbandwidthstatistics import * -from .getbutlertasks import * -from .getdevices import * -from .getfilehash import * -from .getglobalhubs import * -from .gethomedata import * -from .getlibraries import * -from .getlibrary import * -from .getlibraryhubs import * -from .getlibraryitems import * -from .getmetadata import * -from .getmetadatachildren import * -from .getmyplexaccount import * -from .getondeck import * -from .getpin import * -from .getplaylist import * -from .getplaylistcontents import * -from .getplaylists import * -from .getrecentlyadded import * -from .getresizedphoto import * -from .getresourcesstatistics import * -from .getsearchresults import * -from .getserveractivities import * -from .getservercapabilities import * -from .getserveridentity import * -from .getserverlist import * -from .getserverpreferences import * -from .getsessionhistory import * -from .getsessions import * -from .getsourceconnectioninformation import * -from .getstatistics import * -from .gettimeline import * -from .gettoken import * -from .gettopwatchedcontent import * -from .gettranscodesessions import * -from .gettransienttoken import * -from .getupdatestatus import * -from .getwatchlist import * -from .logline import * -from .logmultiline import * -from .markplayed import * -from .markunplayed import * -from .performsearch import * -from .performvoicesearch import * -from .refreshlibrary import * -from .searchlibrary import * -from .startalltasks import * -from .starttask import * -from .startuniversaltranscode import * -from .stopalltasks import * -from .stoptask import * -from .stoptranscodesession import * -from .updateplaylist import * -from .updateplayprogress import * -from .uploadplaylist import * - -__all__ = ["Account","Activity","AddPlaylistContentsMediaContainer","AddPlaylistContentsMetadata","AddPlaylistContentsRequest","AddPlaylistContentsResponse","AddPlaylistContentsResponseBody","ApplyUpdatesRequest","ApplyUpdatesResponse","ButlerTask","ButlerTasks","CancelServerActivitiesRequest","CancelServerActivitiesResponse","CheckForUpdatesRequest","CheckForUpdatesResponse","ClearPlaylistContentsRequest","ClearPlaylistContentsResponse","Context","Country","CreatePlaylistMediaContainer","CreatePlaylistMetadata","CreatePlaylistRequest","CreatePlaylistResponse","CreatePlaylistResponseBody","DeleteLibraryRequest","DeleteLibraryResponse","DeletePlaylistRequest","DeletePlaylistResponse","Device","Director","Directory","Download","EnablePaperTrailResponse","Field","FieldType","Filter","Force","GET_PIN_SERVERS","GET_TOKEN_SERVERS","GET_WATCHLIST_SERVERS","Genre","GetAvailableClientsMediaContainer","GetAvailableClientsResponse","GetAvailableClientsResponseBody","GetBandwidthStatisticsAccount","GetBandwidthStatisticsDevice","GetBandwidthStatisticsMediaContainer","GetBandwidthStatisticsRequest","GetBandwidthStatisticsResponse","GetBandwidthStatisticsResponseBody","GetButlerTasksResponse","GetButlerTasksResponseBody","GetDevicesMediaContainer","GetDevicesResponse","GetDevicesResponseBody","GetFileHashRequest","GetFileHashResponse","GetGlobalHubsMediaContainer","GetGlobalHubsMetadata","GetGlobalHubsRequest","GetGlobalHubsResponse","GetGlobalHubsResponseBody","GetHomeDataResponse","GetHomeDataResponseBody","GetLibrariesDirectory","GetLibrariesLocation","GetLibrariesMediaContainer","GetLibrariesResponse","GetLibrariesResponseBody","GetLibraryDirectory","GetLibraryFilter","GetLibraryHubsCountry","GetLibraryHubsDirector","GetLibraryHubsGenre","GetLibraryHubsHub","GetLibraryHubsMedia","GetLibraryHubsMediaContainer","GetLibraryHubsMetadata","GetLibraryHubsPart","GetLibraryHubsRequest","GetLibraryHubsResponse","GetLibraryHubsResponseBody","GetLibraryHubsRole","GetLibraryHubsWriter","GetLibraryItemsCountry","GetLibraryItemsDirector","GetLibraryItemsGenre","GetLibraryItemsMedia","GetLibraryItemsMediaContainer","GetLibraryItemsMetadata","GetLibraryItemsPart","GetLibraryItemsRequest","GetLibraryItemsResponse","GetLibraryItemsResponseBody","GetLibraryItemsRole","GetLibraryItemsWriter","GetLibraryMediaContainer","GetLibraryRequest","GetLibraryResponse","GetLibraryResponseBody","GetLibraryType","GetMetadataChildrenDirectory","GetMetadataChildrenMediaContainer","GetMetadataChildrenMetadata","GetMetadataChildrenRequest","GetMetadataChildrenResponse","GetMetadataChildrenResponseBody","GetMetadataCountry","GetMetadataDirector","GetMetadataGenre","GetMetadataMedia","GetMetadataMediaContainer","GetMetadataMetadata","GetMetadataPart","GetMetadataRequest","GetMetadataResponse","GetMetadataResponseBody","GetMetadataRole","GetMetadataWriter","GetMyPlexAccountResponse","GetMyPlexAccountResponseBody","GetOnDeckGuids","GetOnDeckMedia","GetOnDeckMediaContainer","GetOnDeckMetadata","GetOnDeckPart","GetOnDeckResponse","GetOnDeckResponseBody","GetOnDeckStream","GetPinGlobals","GetPinRequest","GetPinResponse","GetPinResponseBody","GetPlaylistContentsCountry","GetPlaylistContentsDirector","GetPlaylistContentsGenre","GetPlaylistContentsMedia","GetPlaylistContentsMediaContainer","GetPlaylistContentsMetadata","GetPlaylistContentsPart","GetPlaylistContentsRequest","GetPlaylistContentsResponse","GetPlaylistContentsResponseBody","GetPlaylistContentsRole","GetPlaylistContentsWriter","GetPlaylistMediaContainer","GetPlaylistMetadata","GetPlaylistRequest","GetPlaylistResponse","GetPlaylistResponseBody","GetPlaylistsMediaContainer","GetPlaylistsMetadata","GetPlaylistsRequest","GetPlaylistsResponse","GetPlaylistsResponseBody","GetRecentlyAddedMediaContainer","GetRecentlyAddedMetadata","GetRecentlyAddedResponse","GetRecentlyAddedResponseBody","GetResizedPhotoRequest","GetResizedPhotoResponse","GetResourcesStatisticsMediaContainer","GetResourcesStatisticsRequest","GetResourcesStatisticsResponse","GetResourcesStatisticsResponseBody","GetSearchResultsCountry","GetSearchResultsDirector","GetSearchResultsGenre","GetSearchResultsMedia","GetSearchResultsMediaContainer","GetSearchResultsMetadata","GetSearchResultsPart","GetSearchResultsRequest","GetSearchResultsResponse","GetSearchResultsResponseBody","GetSearchResultsRole","GetSearchResultsWriter","GetServerActivitiesMediaContainer","GetServerActivitiesResponse","GetServerActivitiesResponseBody","GetServerCapabilitiesResponse","GetServerCapabilitiesResponseBody","GetServerIdentityMediaContainer","GetServerIdentityResponse","GetServerIdentityResponseBody","GetServerListMediaContainer","GetServerListResponse","GetServerListResponseBody","GetServerListServer","GetServerPreferencesMediaContainer","GetServerPreferencesResponse","GetServerPreferencesResponseBody","GetSessionHistoryMediaContainer","GetSessionHistoryMetadata","GetSessionHistoryRequest","GetSessionHistoryResponse","GetSessionHistoryResponseBody","GetSessionsMedia","GetSessionsMediaContainer","GetSessionsMetadata","GetSessionsPart","GetSessionsResponse","GetSessionsResponseBody","GetSessionsStream","GetSessionsUser","GetSourceConnectionInformationRequest","GetSourceConnectionInformationResponse","GetStatisticsDevice","GetStatisticsMediaContainer","GetStatisticsRequest","GetStatisticsResponse","GetStatisticsResponseBody","GetTimelineRequest","GetTimelineResponse","GetTokenGlobals","GetTokenLocation","GetTokenRequest","GetTokenResponse","GetTokenResponseBody","GetTopWatchedContentCountry","GetTopWatchedContentGenre","GetTopWatchedContentGuids","GetTopWatchedContentMediaContainer","GetTopWatchedContentMetadata","GetTopWatchedContentRequest","GetTopWatchedContentResponse","GetTopWatchedContentResponseBody","GetTopWatchedContentRole","GetTranscodeSessionsMediaContainer","GetTranscodeSessionsResponse","GetTranscodeSessionsResponseBody","GetTransientTokenQueryParamType","GetTransientTokenRequest","GetTransientTokenResponse","GetUpdateStatusMediaContainer","GetUpdateStatusResponse","GetUpdateStatusResponseBody","GetWatchlistRequest","GetWatchlistResponse","GetWatchlistResponseBody","Guids","Hub","Image","IncludeCollections","IncludeDetails","IncludeExternalMedia","Level","LibrarySectionID","Libtype","Location","LogLineRequest","LogLineResponse","LogMultiLineResponse","MarkPlayedRequest","MarkPlayedResponse","MarkUnplayedRequest","MarkUnplayedResponse","Media","MediaContainer","Metadata","MinSize","MyPlex","OnlyTransient","Operator","Part","PathParamFilter","PathParamTaskName","PerformSearchRequest","PerformSearchResponse","PerformVoiceSearchRequest","PerformVoiceSearchResponse","Player","PlaylistType","Producer","Provider","QueryParamOnlyTransient","QueryParamSmart","QueryParamType","Ratings","RefreshLibraryRequest","RefreshLibraryResponse","Release","Role","Scope","SearchLibraryMediaContainer","SearchLibraryMetadata","SearchLibraryRequest","SearchLibraryResponse","SearchLibraryResponseBody","Server","Session","Setting","Skip","Smart","Sort","StartAllTasksResponse","StartTaskRequest","StartTaskResponse","StartUniversalTranscodeRequest","StartUniversalTranscodeResponse","State","StatisticsBandwidth","StatisticsMedia","StatisticsResources","StopAllTasksResponse","StopTaskRequest","StopTaskResponse","StopTranscodeSessionRequest","StopTranscodeSessionResponse","Stream","Tag","TaskName","Tonight","TranscodeSession","Type","UpdatePlayProgressRequest","UpdatePlayProgressResponse","UpdatePlaylistRequest","UpdatePlaylistResponse","UploadPlaylistRequest","UploadPlaylistResponse","Upscale","User","Writer"] diff --git a/src/plex_api/models/operations/addplaylistcontents.py b/src/plex_api/models/operations/addplaylistcontents.py deleted file mode 100644 index 91b05e1..0000000 --- a/src/plex_api/models/operations/addplaylistcontents.py +++ /dev/null @@ -1,74 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class AddPlaylistContentsRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - uri: str = dataclasses.field(metadata={'query_param': { 'field_name': 'uri', 'style': 'form', 'explode': True }}) - r"""the content URI for the playlist""" - play_queue_id: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'playQueueID', 'style': 'form', 'explode': True }}) - r"""the play queue to add to a playlist""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class AddPlaylistContentsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class AddPlaylistContentsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - leaf_count_added: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCountAdded'), 'exclude': lambda f: f is None }}) - leaf_count_requested: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCountRequested'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[AddPlaylistContentsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class AddPlaylistContentsResponseBody: - r"""Playlist Updated""" - media_container: Optional[AddPlaylistContentsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class AddPlaylistContentsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[AddPlaylistContentsResponseBody] = dataclasses.field(default=None) - r"""Playlist Updated""" - - diff --git a/src/plex_api/models/operations/applyupdates.py b/src/plex_api/models/operations/applyupdates.py deleted file mode 100644 index d11d4d4..0000000 --- a/src/plex_api/models/operations/applyupdates.py +++ /dev/null @@ -1,41 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum -from typing import Optional - - -class Tonight(int, Enum): - r"""Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install""" - ZERO = 0 - ONE = 1 - - -class Skip(int, Enum): - r"""Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`.""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class ApplyUpdatesRequest: - tonight: Optional[Tonight] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'tonight', 'style': 'form', 'explode': True }}) - r"""Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install""" - skip: Optional[Skip] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'skip', 'style': 'form', 'explode': True }}) - r"""Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`.""" - - - - -@dataclasses.dataclass -class ApplyUpdatesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/cancelserveractivities.py b/src/plex_api/models/operations/cancelserveractivities.py deleted file mode 100644 index fe20c5d..0000000 --- a/src/plex_api/models/operations/cancelserveractivities.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class CancelServerActivitiesRequest: - activity_uuid: str = dataclasses.field(metadata={'path_param': { 'field_name': 'activityUUID', 'style': 'simple', 'explode': False }}) - r"""The UUID of the activity to cancel.""" - - - - -@dataclasses.dataclass -class CancelServerActivitiesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/checkforupdates.py b/src/plex_api/models/operations/checkforupdates.py deleted file mode 100644 index 46bb634..0000000 --- a/src/plex_api/models/operations/checkforupdates.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum -from typing import Optional - - -class Download(int, Enum): - r"""Indicate that you want to start download any updates found.""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class CheckForUpdatesRequest: - download: Optional[Download] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'download', 'style': 'form', 'explode': True }}) - r"""Indicate that you want to start download any updates found.""" - - - - -@dataclasses.dataclass -class CheckForUpdatesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/clearplaylistcontents.py b/src/plex_api/models/operations/clearplaylistcontents.py deleted file mode 100644 index b0e0554..0000000 --- a/src/plex_api/models/operations/clearplaylistcontents.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class ClearPlaylistContentsRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - - - - -@dataclasses.dataclass -class ClearPlaylistContentsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/createplaylist.py b/src/plex_api/models/operations/createplaylist.py deleted file mode 100644 index 621e9f7..0000000 --- a/src/plex_api/models/operations/createplaylist.py +++ /dev/null @@ -1,93 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class QueryParamType(str, Enum): - r"""type of playlist to create""" - AUDIO = 'audio' - VIDEO = 'video' - PHOTO = 'photo' - - -class Smart(int, Enum): - r"""whether the playlist is smart or not""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class CreatePlaylistRequest: - title: str = dataclasses.field(metadata={'query_param': { 'field_name': 'title', 'style': 'form', 'explode': True }}) - r"""name of the playlist""" - type: QueryParamType = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""type of playlist to create""" - smart: Smart = dataclasses.field(metadata={'query_param': { 'field_name': 'smart', 'style': 'form', 'explode': True }}) - r"""whether the playlist is smart or not""" - uri: str = dataclasses.field(metadata={'query_param': { 'field_name': 'uri', 'style': 'form', 'explode': True }}) - r"""the content URI for the playlist""" - play_queue_id: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'playQueueID', 'style': 'form', 'explode': True }}) - r"""the play queue to copy to a playlist""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CreatePlaylistMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('icon'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CreatePlaylistMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[CreatePlaylistMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CreatePlaylistResponseBody: - r"""returns all playlists""" - media_container: Optional[CreatePlaylistMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class CreatePlaylistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[CreatePlaylistResponseBody] = dataclasses.field(default=None) - r"""returns all playlists""" - - diff --git a/src/plex_api/models/operations/deletelibrary.py b/src/plex_api/models/operations/deletelibrary.py deleted file mode 100644 index 3d3d371..0000000 --- a/src/plex_api/models/operations/deletelibrary.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class DeleteLibraryRequest: - section_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to query""" - - - - -@dataclasses.dataclass -class DeleteLibraryResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/deleteplaylist.py b/src/plex_api/models/operations/deleteplaylist.py deleted file mode 100644 index 063837f..0000000 --- a/src/plex_api/models/operations/deleteplaylist.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class DeletePlaylistRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - - - - -@dataclasses.dataclass -class DeletePlaylistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/enablepapertrail.py b/src/plex_api/models/operations/enablepapertrail.py deleted file mode 100644 index ed31d39..0000000 --- a/src/plex_api/models/operations/enablepapertrail.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class EnablePaperTrailResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/getavailableclients.py b/src/plex_api/models/operations/getavailableclients.py deleted file mode 100644 index 83c61e5..0000000 --- a/src/plex_api/models/operations/getavailableclients.py +++ /dev/null @@ -1,58 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Server: - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - host: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('host'), 'exclude': lambda f: f is None }}) - address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('address'), 'exclude': lambda f: f is None }}) - port: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('port'), 'exclude': lambda f: f is None }}) - machine_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('machineIdentifier'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - protocol: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('protocol'), 'exclude': lambda f: f is None }}) - product: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('product'), 'exclude': lambda f: f is None }}) - device_class: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deviceClass'), 'exclude': lambda f: f is None }}) - protocol_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('protocolVersion'), 'exclude': lambda f: f is None }}) - protocol_capabilities: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('protocolCapabilities'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetAvailableClientsMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - server: Optional[List[Server]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Server'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetAvailableClientsResponseBody: - r"""Available Clients""" - media_container: Optional[GetAvailableClientsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetAvailableClientsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetAvailableClientsResponseBody] = dataclasses.field(default=None) - r"""Available Clients""" - - diff --git a/src/plex_api/models/operations/getbandwidthstatistics.py b/src/plex_api/models/operations/getbandwidthstatistics.py deleted file mode 100644 index ec3af9a..0000000 --- a/src/plex_api/models/operations/getbandwidthstatistics.py +++ /dev/null @@ -1,92 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetBandwidthStatisticsRequest: - timespan: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'Timespan', 'style': 'form', 'explode': True }}) - r"""The timespan to retrieve statistics for - the exact meaning of this parameter is not known - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetBandwidthStatisticsDevice: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }}) - client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }}) - created_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetBandwidthStatisticsAccount: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - default_audio_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultAudioLanguage'), 'exclude': lambda f: f is None }}) - auto_select_audio: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('autoSelectAudio'), 'exclude': lambda f: f is None }}) - default_subtitle_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultSubtitleLanguage'), 'exclude': lambda f: f is None }}) - subtitle_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtitleMode'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StatisticsBandwidth: - account_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountID'), 'exclude': lambda f: f is None }}) - device_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deviceID'), 'exclude': lambda f: f is None }}) - timespan: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timespan'), 'exclude': lambda f: f is None }}) - at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('at'), 'exclude': lambda f: f is None }}) - lan: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lan'), 'exclude': lambda f: f is None }}) - bytes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bytes'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetBandwidthStatisticsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - device: Optional[List[GetBandwidthStatisticsDevice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Device'), 'exclude': lambda f: f is None }}) - account: Optional[List[GetBandwidthStatisticsAccount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Account'), 'exclude': lambda f: f is None }}) - statistics_bandwidth: Optional[List[StatisticsBandwidth]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('StatisticsBandwidth'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetBandwidthStatisticsResponseBody: - r"""Bandwidth Statistics""" - media_container: Optional[GetBandwidthStatisticsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetBandwidthStatisticsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetBandwidthStatisticsResponseBody] = dataclasses.field(default=None) - r"""Bandwidth Statistics""" - - diff --git a/src/plex_api/models/operations/getbutlertasks.py b/src/plex_api/models/operations/getbutlertasks.py deleted file mode 100644 index 27bb09a..0000000 --- a/src/plex_api/models/operations/getbutlertasks.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class ButlerTask: - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - interval: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('interval'), 'exclude': lambda f: f is None }}) - schedule_randomized: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('scheduleRandomized'), 'exclude': lambda f: f is None }}) - enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class ButlerTasks: - butler_task: Optional[List[ButlerTask]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ButlerTask'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetButlerTasksResponseBody: - r"""All butler tasks""" - butler_tasks: Optional[ButlerTasks] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ButlerTasks'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetButlerTasksResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetButlerTasksResponseBody] = dataclasses.field(default=None) - r"""All butler tasks""" - - diff --git a/src/plex_api/models/operations/getdevices.py b/src/plex_api/models/operations/getdevices.py deleted file mode 100644 index f5cee2e..0000000 --- a/src/plex_api/models/operations/getdevices.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Device: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }}) - client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }}) - created_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetDevicesMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - device: Optional[List[Device]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Device'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetDevicesResponseBody: - r"""Devices""" - media_container: Optional[GetDevicesMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetDevicesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetDevicesResponseBody] = dataclasses.field(default=None) - r"""Devices""" - - diff --git a/src/plex_api/models/operations/getfilehash.py b/src/plex_api/models/operations/getfilehash.py deleted file mode 100644 index 5b95ae7..0000000 --- a/src/plex_api/models/operations/getfilehash.py +++ /dev/null @@ -1,28 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from typing import Optional - - -@dataclasses.dataclass -class GetFileHashRequest: - url: str = dataclasses.field(metadata={'query_param': { 'field_name': 'url', 'style': 'form', 'explode': True }}) - r"""This is the path to the local file, must be prefixed by `file://`""" - type: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""Item type""" - - - - -@dataclasses.dataclass -class GetFileHashResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/getglobalhubs.py b/src/plex_api/models/operations/getglobalhubs.py deleted file mode 100644 index 73f8fcc..0000000 --- a/src/plex_api/models/operations/getglobalhubs.py +++ /dev/null @@ -1,101 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class OnlyTransient(int, Enum): - r"""Only return hubs which are \\"transient\\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class GetGlobalHubsRequest: - count: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'count', 'style': 'form', 'explode': True }}) - r"""The number of items to return with each hub.""" - only_transient: Optional[OnlyTransient] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'onlyTransient', 'style': 'form', 'explode': True }}) - r"""Only return hubs which are \\"transient\\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetGlobalHubsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - title_sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('titleSort'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('icon'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Hub: - hub_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hubKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - hub_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hubIdentifier'), 'exclude': lambda f: f is None }}) - context: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('context'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - more: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('more'), 'exclude': lambda f: f is None }}) - style: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('style'), 'exclude': lambda f: f is None }}) - promoted: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('promoted'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetGlobalHubsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetGlobalHubsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - hub: Optional[List[Hub]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Hub'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetGlobalHubsResponseBody: - r"""returns global hubs""" - media_container: Optional[GetGlobalHubsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetGlobalHubsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetGlobalHubsResponseBody] = dataclasses.field(default=None) - r"""returns global hubs""" - - diff --git a/src/plex_api/models/operations/gethomedata.py b/src/plex_api/models/operations/gethomedata.py deleted file mode 100644 index 13c0987..0000000 --- a/src/plex_api/models/operations/gethomedata.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetHomeDataResponseBody: - r"""Home Data""" - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - guest_user_id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guestUserID'), 'exclude': lambda f: f is None }}) - guest_user_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guestUserUUID'), 'exclude': lambda f: f is None }}) - guest_enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guestEnabled'), 'exclude': lambda f: f is None }}) - subscription: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subscription'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetHomeDataResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetHomeDataResponseBody] = dataclasses.field(default=None) - r"""Home Data""" - - diff --git a/src/plex_api/models/operations/getlibraries.py b/src/plex_api/models/operations/getlibraries.py deleted file mode 100644 index 318d932..0000000 --- a/src/plex_api/models/operations/getlibraries.py +++ /dev/null @@ -1,79 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibrariesLocation: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - path: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('path'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibrariesDirectory: - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - filters: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filters'), 'exclude': lambda f: f is None }}) - refreshing: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('refreshing'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - agent: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agent'), 'exclude': lambda f: f is None }}) - scanner: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('scanner'), 'exclude': lambda f: f is None }}) - language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('language'), 'exclude': lambda f: f is None }}) - uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('uuid'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - created_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'exclude': lambda f: f is None }}) - scanned_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('scannedAt'), 'exclude': lambda f: f is None }}) - content: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) - directory: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('directory'), 'exclude': lambda f: f is None }}) - content_changed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentChangedAt'), 'exclude': lambda f: f is None }}) - hidden: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hidden'), 'exclude': lambda f: f is None }}) - location: Optional[List[GetLibrariesLocation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Location'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibrariesMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - title1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title1'), 'exclude': lambda f: f is None }}) - directory: Optional[List[GetLibrariesDirectory]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Directory'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibrariesResponseBody: - r"""The libraries available on the Server""" - media_container: Optional[GetLibrariesMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetLibrariesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetLibrariesResponseBody] = dataclasses.field(default=None) - r"""The libraries available on the Server""" - - diff --git a/src/plex_api/models/operations/getlibrary.py b/src/plex_api/models/operations/getlibrary.py deleted file mode 100644 index 89ea504..0000000 --- a/src/plex_api/models/operations/getlibrary.py +++ /dev/null @@ -1,154 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class IncludeDetails(int, Enum): - r"""Whether or not to include details for a section (types, filters, and sorts). - Only exists for backwards compatibility, media providers other than the server libraries have it on always. - """ - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class GetLibraryRequest: - section_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to query""" - include_details: Optional[IncludeDetails] = dataclasses.field(default=IncludeDetails.ZERO, metadata={'query_param': { 'field_name': 'includeDetails', 'style': 'form', 'explode': True }}) - r"""Whether or not to include details for a section (types, filters, and sorts). - Only exists for backwards compatibility, media providers other than the server libraries have it on always. - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryDirectory: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - secondary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('secondary'), 'exclude': lambda f: f is None }}) - prompt: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('prompt'), 'exclude': lambda f: f is None }}) - search: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('search'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryFilter: - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - filter_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filterType'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Sort: - default: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('default'), 'exclude': lambda f: f is None }}) - default_direction: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultDirection'), 'exclude': lambda f: f is None }}) - desc_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('descKey'), 'exclude': lambda f: f is None }}) - first_character_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('firstCharacterKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Field: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - sub_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subType'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryType: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - active: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('active'), 'exclude': lambda f: f is None }}) - filter_: Optional[List[GetLibraryFilter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Filter'), 'exclude': lambda f: f is None }}) - sort: Optional[List[Sort]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Sort'), 'exclude': lambda f: f is None }}) - field: Optional[List[Field]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Field'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Operator: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class FieldType: - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - operator: Optional[List[Operator]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Operator'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - content: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title1'), 'exclude': lambda f: f is None }}) - view_group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewGroup'), 'exclude': lambda f: f is None }}) - view_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewMode'), 'exclude': lambda f: f is None }}) - directory: Optional[List[GetLibraryDirectory]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Directory'), 'exclude': lambda f: f is None }}) - type: Optional[List[GetLibraryType]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Type'), 'exclude': lambda f: f is None }}) - field_type: Optional[List[FieldType]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('FieldType'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryResponseBody: - r"""The details of the library""" - media_container: Optional[GetLibraryMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetLibraryResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetLibraryResponseBody] = dataclasses.field(default=None) - r"""The details of the library""" - - diff --git a/src/plex_api/models/operations/getlibraryhubs.py b/src/plex_api/models/operations/getlibraryhubs.py deleted file mode 100644 index e1b5a3a..0000000 --- a/src/plex_api/models/operations/getlibraryhubs.py +++ /dev/null @@ -1,206 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class QueryParamOnlyTransient(int, Enum): - r"""Only return hubs which are \\"transient\\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class GetLibraryHubsRequest: - section_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to query""" - count: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'count', 'style': 'form', 'explode': True }}) - r"""The number of items to return with each hub.""" - only_transient: Optional[QueryParamOnlyTransient] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'onlyTransient', 'style': 'form', 'explode': True }}) - r"""Only return hubs which are \\"transient\\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsPart: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsMedia: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetLibraryHubsPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsGenre: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsCountry: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsDirector: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsRole: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsWriter: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - primary_extra_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('primaryExtraKey'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetLibraryHubsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetLibraryHubsGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetLibraryHubsCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - director: Optional[List[GetLibraryHubsDirector]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetLibraryHubsRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - writer: Optional[List[GetLibraryHubsWriter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - skip_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('skipCount'), 'exclude': lambda f: f is None }}) - chapter_source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chapterSource'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsHub: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - hub_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hubIdentifier'), 'exclude': lambda f: f is None }}) - context: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('context'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - more: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('more'), 'exclude': lambda f: f is None }}) - style: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('style'), 'exclude': lambda f: f is None }}) - hub_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hubKey'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetLibraryHubsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - promoted: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('promoted'), 'exclude': lambda f: f is None }}) - random: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('random'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - hub: Optional[List[GetLibraryHubsHub]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Hub'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryHubsResponseBody: - r"""The hubs specific to the library""" - media_container: Optional[GetLibraryHubsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetLibraryHubsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetLibraryHubsResponseBody] = dataclasses.field(default=None) - r"""The hubs specific to the library""" - - diff --git a/src/plex_api/models/operations/getlibraryitems.py b/src/plex_api/models/operations/getlibraryitems.py deleted file mode 100644 index 0af3ed7..0000000 --- a/src/plex_api/models/operations/getlibraryitems.py +++ /dev/null @@ -1,232 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from enum import Enum -from plex_api import utils -from typing import Any, List, Optional, Union - - -class Tag(str, Enum): - r"""A key representing a specific tag within the section.""" - ALL = 'all' - UNWATCHED = 'unwatched' - NEWEST = 'newest' - RECENTLY_ADDED = 'recentlyAdded' - RECENTLY_VIEWED = 'recentlyViewed' - ON_DECK = 'onDeck' - COLLECTION = 'collection' - EDITION = 'edition' - GENRE = 'genre' - YEAR = 'year' - DECADE = 'decade' - DIRECTOR = 'director' - ACTOR = 'actor' - COUNTRY = 'country' - CONTENT_RATING = 'contentRating' - RATING = 'rating' - RESOLUTION = 'resolution' - FIRST_CHARACTER = 'firstCharacter' - FOLDER = 'folder' - - -@dataclasses.dataclass -class GetLibraryItemsRequest: - section_id: Any = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to query""" - tag: Tag = dataclasses.field(metadata={'path_param': { 'field_name': 'tag', 'style': 'simple', 'explode': False }}) - r"""A key representing a specific tag within the section.""" - include_guids: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeGuids', 'style': 'form', 'explode': True }}) - r"""Adds the Guids object to the response""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsPart: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsMedia: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetLibraryItemsPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsGenre: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsCountry: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsDirector: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsWriter: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsRole: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - chapter_source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chapterSource'), 'exclude': lambda f: f is None }}) - primary_extra_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('primaryExtraKey'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - grandparent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentRatingKey'), 'exclude': lambda f: f is None }}) - grandparent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentGuid'), 'exclude': lambda f: f is None }}) - grandparent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentKey'), 'exclude': lambda f: f is None }}) - grandparent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTitle'), 'exclude': lambda f: f is None }}) - grandparent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentThumb'), 'exclude': lambda f: f is None }}) - grandparent_art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentArt'), 'exclude': lambda f: f is None }}) - grandparent_theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTheme'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetLibraryItemsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetLibraryItemsGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetLibraryItemsCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - director: Optional[List[GetLibraryItemsDirector]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - writer: Optional[List[GetLibraryItemsWriter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetLibraryItemsRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - title_sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('titleSort'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - original_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originalTitle'), 'exclude': lambda f: f is None }}) - view_offset: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewOffset'), 'exclude': lambda f: f is None }}) - skip_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('skipCount'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('theme'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - viewed_leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedLeafCount'), 'exclude': lambda f: f is None }}) - child_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('childCount'), 'exclude': lambda f: f is None }}) - has_premium_extras: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasPremiumExtras'), 'exclude': lambda f: f is None }}) - has_premium_primary_extra: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasPremiumPrimaryExtra'), 'exclude': lambda f: f is None }}) - parent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentRatingKey'), 'exclude': lambda f: f is None }}) - parent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentGuid'), 'exclude': lambda f: f is None }}) - parent_studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentStudio'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - parent_year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentYear'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - parent_theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTheme'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[LibrarySectionID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title1'), 'exclude': lambda f: f is None }}) - title2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title2'), 'exclude': lambda f: f is None }}) - view_group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewGroup'), 'exclude': lambda f: f is None }}) - view_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewMode'), 'exclude': lambda f: f is None }}) - mixed_parents: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mixedParents'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetLibraryItemsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetLibraryItemsResponseBody: - r"""The contents of the library by section and tag""" - media_container: Optional[GetLibraryItemsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetLibraryItemsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetLibraryItemsResponseBody] = dataclasses.field(default=None) - r"""The contents of the library by section and tag""" - - - -LibrarySectionID = Union[int, str] diff --git a/src/plex_api/models/operations/getmetadata.py b/src/plex_api/models/operations/getmetadata.py deleted file mode 100644 index a91fff5..0000000 --- a/src/plex_api/models/operations/getmetadata.py +++ /dev/null @@ -1,264 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetMetadataRequest: - rating_key: float = dataclasses.field(metadata={'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': False }}) - r"""the id of the library item to return the children of.""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Stream: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - stream_type: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamType'), 'exclude': lambda f: f is None }}) - default: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('default'), 'exclude': lambda f: f is None }}) - codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codec'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - bit_depth: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitDepth'), 'exclude': lambda f: f is None }}) - chroma_location: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chromaLocation'), 'exclude': lambda f: f is None }}) - chroma_subsampling: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chromaSubsampling'), 'exclude': lambda f: f is None }}) - coded_height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codedHeight'), 'exclude': lambda f: f is None }}) - coded_width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codedWidth'), 'exclude': lambda f: f is None }}) - color_primaries: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('colorPrimaries'), 'exclude': lambda f: f is None }}) - color_range: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('colorRange'), 'exclude': lambda f: f is None }}) - color_space: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('colorSpace'), 'exclude': lambda f: f is None }}) - color_trc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('colorTrc'), 'exclude': lambda f: f is None }}) - frame_rate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('frameRate'), 'exclude': lambda f: f is None }}) - has_scaling_matrix: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasScalingMatrix'), 'exclude': lambda f: f is None }}) - height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - level: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('level'), 'exclude': lambda f: f is None }}) - profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('profile'), 'exclude': lambda f: f is None }}) - ref_frames: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('refFrames'), 'exclude': lambda f: f is None }}) - scan_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('scanType'), 'exclude': lambda f: f is None }}) - stream_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamIdentifier'), 'exclude': lambda f: f is None }}) - width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayTitle'), 'exclude': lambda f: f is None }}) - extended_display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('extendedDisplayTitle'), 'exclude': lambda f: f is None }}) - selected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selected'), 'exclude': lambda f: f is None }}) - channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('channels'), 'exclude': lambda f: f is None }}) - language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('language'), 'exclude': lambda f: f is None }}) - language_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('languageTag'), 'exclude': lambda f: f is None }}) - language_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('languageCode'), 'exclude': lambda f: f is None }}) - sampling_rate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('samplingRate'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataPart: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - stream: Optional[List[Stream]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Stream'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataMedia: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetMetadataPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataGenre: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataCountry: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Guids: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Ratings: - image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('image'), 'exclude': lambda f: f is None }}) - value: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataDirector: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataWriter: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataRole: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }}) - role: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('role'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Producer: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - has_premium_primary_extra: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasPremiumPrimaryExtra'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetMetadataMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetMetadataGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetMetadataCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - guids: Optional[List[Guids]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Guid'), 'exclude': lambda f: f is None }}) - ratings: Optional[List[Ratings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Rating'), 'exclude': lambda f: f is None }}) - director: Optional[List[GetMetadataDirector]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - writer: Optional[List[GetMetadataWriter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetMetadataRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - producer: Optional[List[Producer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Producer'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetMetadataMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataResponseBody: - r"""The metadata of the library item.""" - media_container: Optional[GetMetadataMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetMetadataResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetMetadataResponseBody] = dataclasses.field(default=None) - r"""The metadata of the library item.""" - - diff --git a/src/plex_api/models/operations/getmetadatachildren.py b/src/plex_api/models/operations/getmetadatachildren.py deleted file mode 100644 index 956173a..0000000 --- a/src/plex_api/models/operations/getmetadatachildren.py +++ /dev/null @@ -1,117 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetMetadataChildrenRequest: - rating_key: float = dataclasses.field(metadata={'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': False }}) - r"""the id of the library item to return the children of.""" - include_elements: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeElements', 'style': 'form', 'explode': True }}) - r"""Adds additional elements to the response. Supported types are (Stream)""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataChildrenDirectory: - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - viewed_leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedLeafCount'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataChildrenMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - parent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentRatingKey'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - parent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentGuid'), 'exclude': lambda f: f is None }}) - parent_studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentStudio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - parent_year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentYear'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - parent_theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTheme'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - viewed_leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedLeafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - user_rating: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userRating'), 'exclude': lambda f: f is None }}) - skip_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('skipCount'), 'exclude': lambda f: f is None }}) - last_rated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastRatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataChildrenMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - nocache: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nocache'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - parent_year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentYear'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('theme'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title1'), 'exclude': lambda f: f is None }}) - title2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title2'), 'exclude': lambda f: f is None }}) - view_group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewGroup'), 'exclude': lambda f: f is None }}) - view_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewMode'), 'exclude': lambda f: f is None }}) - directory: Optional[List[GetMetadataChildrenDirectory]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Directory'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetMetadataChildrenMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMetadataChildrenResponseBody: - r"""The children of the library item.""" - media_container: Optional[GetMetadataChildrenMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetMetadataChildrenResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetMetadataChildrenResponseBody] = dataclasses.field(default=None) - r"""The children of the library item.""" - - diff --git a/src/plex_api/models/operations/getmyplexaccount.py b/src/plex_api/models/operations/getmyplexaccount.py deleted file mode 100644 index 2d0ac6c..0000000 --- a/src/plex_api/models/operations/getmyplexaccount.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class MyPlex: - auth_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('authToken'), 'exclude': lambda f: f is None }}) - username: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('username'), 'exclude': lambda f: f is None }}) - mapping_state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mappingState'), 'exclude': lambda f: f is None }}) - mapping_error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mappingError'), 'exclude': lambda f: f is None }}) - sign_in_state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('signInState'), 'exclude': lambda f: f is None }}) - public_address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('publicAddress'), 'exclude': lambda f: f is None }}) - public_port: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('publicPort'), 'exclude': lambda f: f is None }}) - private_address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('privateAddress'), 'exclude': lambda f: f is None }}) - private_port: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('privatePort'), 'exclude': lambda f: f is None }}) - subscription_features: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subscriptionFeatures'), 'exclude': lambda f: f is None }}) - subscription_active: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subscriptionActive'), 'exclude': lambda f: f is None }}) - subscription_state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subscriptionState'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetMyPlexAccountResponseBody: - r"""MyPlex Account""" - my_plex: Optional[MyPlex] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MyPlex'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetMyPlexAccountResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetMyPlexAccountResponseBody] = dataclasses.field(default=None) - r"""MyPlex Account""" - - diff --git a/src/plex_api/models/operations/getondeck.py b/src/plex_api/models/operations/getondeck.py deleted file mode 100644 index ada9905..0000000 --- a/src/plex_api/models/operations/getondeck.py +++ /dev/null @@ -1,166 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import dateutil.parser -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import datetime -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckStream: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - stream_type: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamType'), 'exclude': lambda f: f is None }}) - default: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('default'), 'exclude': lambda f: f is None }}) - codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codec'), 'exclude': lambda f: f is None }}) - index: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - bitrate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('language'), 'exclude': lambda f: f is None }}) - language_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('languageTag'), 'exclude': lambda f: f is None }}) - language_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('languageCode'), 'exclude': lambda f: f is None }}) - bit_depth: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitDepth'), 'exclude': lambda f: f is None }}) - chroma_location: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chromaLocation'), 'exclude': lambda f: f is None }}) - chroma_subsampling: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chromaSubsampling'), 'exclude': lambda f: f is None }}) - coded_height: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codedHeight'), 'exclude': lambda f: f is None }}) - coded_width: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codedWidth'), 'exclude': lambda f: f is None }}) - color_range: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('colorRange'), 'exclude': lambda f: f is None }}) - frame_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('frameRate'), 'exclude': lambda f: f is None }}) - height: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - level: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('level'), 'exclude': lambda f: f is None }}) - profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('profile'), 'exclude': lambda f: f is None }}) - ref_frames: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('refFrames'), 'exclude': lambda f: f is None }}) - width: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayTitle'), 'exclude': lambda f: f is None }}) - extended_display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('extendedDisplayTitle'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckPart: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - stream: Optional[List[GetOnDeckStream]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Stream'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckMedia: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetOnDeckPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckGuids: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckMetadata: - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - rating_key: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - parent_rating_key: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentRatingKey'), 'exclude': lambda f: f is None }}) - grandparent_rating_key: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentRatingKey'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - parent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentGuid'), 'exclude': lambda f: f is None }}) - grandparent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentGuid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - grandparent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentKey'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - grandparent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTitle'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - index: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - parent_index: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - year: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - grandparent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentThumb'), 'exclude': lambda f: f is None }}) - grandparent_art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentArt'), 'exclude': lambda f: f is None }}) - grandparent_theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTheme'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - added_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetOnDeckMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - guids: Optional[List[GetOnDeckGuids]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Guid'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - mixed_parents: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mixedParents'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetOnDeckMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetOnDeckResponseBody: - r"""The on Deck content""" - media_container: Optional[GetOnDeckMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetOnDeckResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetOnDeckResponseBody] = dataclasses.field(default=None) - r"""The on Deck content""" - - diff --git a/src/plex_api/models/operations/getpin.py b/src/plex_api/models/operations/getpin.py deleted file mode 100644 index 5719edd..0000000 --- a/src/plex_api/models/operations/getpin.py +++ /dev/null @@ -1,100 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import dateutil.parser -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import datetime -from plex_api import utils -from typing import Optional - -GET_PIN_SERVERS = [ - "https://plex.tv/api/v2", -] - - -@dataclasses.dataclass -class GetPinGlobals: - x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }}) - 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) - """ - - - - -@dataclasses.dataclass -class GetPinRequest: - x_plex_product: str = dataclasses.field(metadata={'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': False }}) - r"""Product name of the application shown in the list of devices""" - strong: Optional[bool] = dataclasses.field(default=False, metadata={'query_param': { 'field_name': 'strong', 'style': 'form', 'explode': True }}) - r"""Determines the kind of code returned by the API call - Strong codes are used for Pin authentication flows - Non-Strong codes are used for `Plex.tv/link` - """ - x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }}) - 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) - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Location: - code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - european_union_member: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('european_union_member'), 'exclude': lambda f: f is None }}) - continent_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('continent_code'), 'exclude': lambda f: f is None }}) - country: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('country'), 'exclude': lambda f: f is None }}) - city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }}) - time_zone: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('time_zone'), 'exclude': lambda f: f is None }}) - postal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postal_code'), 'exclude': lambda f: f is None }}) - in_privacy_restricted_country: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('in_privacy_restricted_country'), 'exclude': lambda f: f is None }}) - subdivisions: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subdivisions'), 'exclude': lambda f: f is None }}) - coordinates: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('coordinates'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPinResponseBody: - r"""The Pin""" - UNSET='__SPEAKEASY_UNSET__' - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - r"""PinID for use with authentication""" - code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - product: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('product'), 'exclude': lambda f: f is None }}) - trusted: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trusted'), 'exclude': lambda f: f is None }}) - qr: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('qr'), 'exclude': lambda f: f is None }}) - r"""a link to a QR code hosted on plex.tv - The QR code redirects to the relevant `plex.tv/link` authentication page - Which then prompts the user for the 4 Digit Link Pin - """ - client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }}) - location: Optional[Location] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('location'), 'exclude': lambda f: f is None }}) - expires_in: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresIn'), 'exclude': lambda f: f is None }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - expires_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - auth_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('authToken'), 'exclude': lambda f: f is None }}) - new_registration: Optional[bool] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('newRegistration'), 'exclude': lambda f: f is GetPinResponseBody.UNSET }}) - - - - -@dataclasses.dataclass -class GetPinResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetPinResponseBody] = dataclasses.field(default=None) - r"""The Pin""" - - diff --git a/src/plex_api/models/operations/getplaylist.py b/src/plex_api/models/operations/getplaylist.py deleted file mode 100644 index 5647fc1..0000000 --- a/src/plex_api/models/operations/getplaylist.py +++ /dev/null @@ -1,70 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetPlaylistRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistMetadata: - content: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('icon'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetPlaylistMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistResponseBody: - r"""The playlist""" - media_container: Optional[GetPlaylistMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetPlaylistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetPlaylistResponseBody] = dataclasses.field(default=None) - r"""The playlist""" - - diff --git a/src/plex_api/models/operations/getplaylistcontents.py b/src/plex_api/models/operations/getplaylistcontents.py deleted file mode 100644 index 662e844..0000000 --- a/src/plex_api/models/operations/getplaylistcontents.py +++ /dev/null @@ -1,178 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetPlaylistContentsRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - type: float = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""the metadata type of the item to return""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsPart: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsMedia: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetPlaylistContentsPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsGenre: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsCountry: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsDirector: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsWriter: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsRole: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - title_sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('titleSort'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - has_premium_extras: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasPremiumExtras'), 'exclude': lambda f: f is None }}) - has_premium_primary_extra: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasPremiumPrimaryExtra'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetPlaylistContentsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetPlaylistContentsGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetPlaylistContentsCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - director: Optional[List[GetPlaylistContentsDirector]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - writer: Optional[List[GetPlaylistContentsWriter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetPlaylistContentsRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetPlaylistContentsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistContentsResponseBody: - r"""The playlist contents""" - media_container: Optional[GetPlaylistContentsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetPlaylistContentsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetPlaylistContentsResponseBody] = dataclasses.field(default=None) - r"""The playlist contents""" - - diff --git a/src/plex_api/models/operations/getplaylists.py b/src/plex_api/models/operations/getplaylists.py deleted file mode 100644 index 95b70fc..0000000 --- a/src/plex_api/models/operations/getplaylists.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class PlaylistType(str, Enum): - r"""limit to a type of playlist.""" - AUDIO = 'audio' - VIDEO = 'video' - PHOTO = 'photo' - - -class QueryParamSmart(int, Enum): - r"""type of playlists to return (default is all).""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class GetPlaylistsRequest: - playlist_type: Optional[PlaylistType] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'playlistType', 'style': 'form', 'explode': True }}) - r"""limit to a type of playlist.""" - smart: Optional[QueryParamSmart] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'smart', 'style': 'form', 'explode': True }}) - r"""type of playlists to return (default is all).""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistsMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - smart: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('smart'), 'exclude': lambda f: f is None }}) - playlist_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playlistType'), 'exclude': lambda f: f is None }}) - composite: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('composite'), 'exclude': lambda f: f is None }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('icon'), 'exclude': lambda f: f is None }}) - view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewCount'), 'exclude': lambda f: f is None }}) - last_viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastViewedAt'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetPlaylistsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetPlaylistsResponseBody: - r"""returns all playlists""" - media_container: Optional[GetPlaylistsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetPlaylistsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetPlaylistsResponseBody] = dataclasses.field(default=None) - r"""returns all playlists""" - - diff --git a/src/plex_api/models/operations/getrecentlyadded.py b/src/plex_api/models/operations/getrecentlyadded.py deleted file mode 100644 index 3f08e83..0000000 --- a/src/plex_api/models/operations/getrecentlyadded.py +++ /dev/null @@ -1,166 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import dateutil.parser -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import datetime -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Part: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - has_thumbnail: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasThumbnail'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Media: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - optimized_for_streaming: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('optimizedForStreaming'), 'exclude': lambda f: f is None }}) - has64bit_offsets: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('has64bitOffsets'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[Part]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Genre: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Director: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Writer: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Country: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Role: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetRecentlyAddedMetadata: - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - rating_key: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - added_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - chapter_source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chapterSource'), 'exclude': lambda f: f is None }}) - primary_extra_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('primaryExtraKey'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - media: Optional[List[Media]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[Genre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - director: Optional[List[Director]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - writer: Optional[List[Writer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - country: Optional[List[Country]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - role: Optional[List[Role]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetRecentlyAddedMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - mixed_parents: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mixedParents'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetRecentlyAddedMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetRecentlyAddedResponseBody: - r"""The recently added content""" - media_container: Optional[GetRecentlyAddedMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetRecentlyAddedResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetRecentlyAddedResponseBody] = dataclasses.field(default=None) - r"""The recently added content""" - - diff --git a/src/plex_api/models/operations/getresizedphoto.py b/src/plex_api/models/operations/getresizedphoto.py deleted file mode 100644 index ae97be8..0000000 --- a/src/plex_api/models/operations/getresizedphoto.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class MinSize(int, Enum): - r"""images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.""" - ZERO = 0 - ONE = 1 - - -class Upscale(int, Enum): - r"""allow images to be resized beyond native dimensions.""" - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class GetResizedPhotoRequest: - width: float = dataclasses.field(metadata={'query_param': { 'field_name': 'width', 'style': 'form', 'explode': True }}) - r"""The width for the resized photo""" - height: float = dataclasses.field(metadata={'query_param': { 'field_name': 'height', 'style': 'form', 'explode': True }}) - r"""The height for the resized photo""" - blur: float = dataclasses.field(metadata={'query_param': { 'field_name': 'blur', 'style': 'form', 'explode': True }}) - r"""The width for the resized photo""" - min_size: MinSize = dataclasses.field(metadata={'query_param': { 'field_name': 'minSize', 'style': 'form', 'explode': True }}) - r"""images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.""" - upscale: Upscale = dataclasses.field(metadata={'query_param': { 'field_name': 'upscale', 'style': 'form', 'explode': True }}) - r"""allow images to be resized beyond native dimensions.""" - url: str = dataclasses.field(metadata={'query_param': { 'field_name': 'url', 'style': 'form', 'explode': True }}) - r"""path to image within Plex""" - opacity: int = dataclasses.field(default=100, metadata={'query_param': { 'field_name': 'opacity', 'style': 'form', 'explode': True }}) - r"""The opacity for the resized photo""" - - - - -@dataclasses.dataclass -class GetResizedPhotoResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/getresourcesstatistics.py b/src/plex_api/models/operations/getresourcesstatistics.py deleted file mode 100644 index 9bd8e72..0000000 --- a/src/plex_api/models/operations/getresourcesstatistics.py +++ /dev/null @@ -1,63 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetResourcesStatisticsRequest: - timespan: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'Timespan', 'style': 'form', 'explode': True }}) - r"""The timespan to retrieve statistics for - the exact meaning of this parameter is not known - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StatisticsResources: - timespan: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timespan'), 'exclude': lambda f: f is None }}) - at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('at'), 'exclude': lambda f: f is None }}) - host_cpu_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostCpuUtilization'), 'exclude': lambda f: f is None }}) - process_cpu_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('processCpuUtilization'), 'exclude': lambda f: f is None }}) - host_memory_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostMemoryUtilization'), 'exclude': lambda f: f is None }}) - process_memory_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('processMemoryUtilization'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetResourcesStatisticsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - statistics_resources: Optional[List[StatisticsResources]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('StatisticsResources'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetResourcesStatisticsResponseBody: - r"""Resource Statistics""" - media_container: Optional[GetResourcesStatisticsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetResourcesStatisticsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetResourcesStatisticsResponseBody] = dataclasses.field(default=None) - r"""Resource Statistics""" - - diff --git a/src/plex_api/models/operations/getsearchresults.py b/src/plex_api/models/operations/getsearchresults.py deleted file mode 100644 index b822854..0000000 --- a/src/plex_api/models/operations/getsearchresults.py +++ /dev/null @@ -1,182 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import dateutil.parser -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import datetime -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetSearchResultsRequest: - query: str = dataclasses.field(metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) - r"""The search query string to use""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsPart: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsMedia: - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - bitrate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - width: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('width'), 'exclude': lambda f: f is None }}) - height: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) - aspect_ratio: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('aspectRatio'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - video_resolution: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoResolution'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_frame_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoFrameRate'), 'exclude': lambda f: f is None }}) - audio_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioProfile'), 'exclude': lambda f: f is None }}) - video_profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoProfile'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetSearchResultsPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsGenre: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsDirector: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsWriter: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsCountry: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsRole: - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsMetadata: - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }}) - personal: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('personal'), 'exclude': lambda f: f is None }}) - source_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceTitle'), 'exclude': lambda f: f is None }}) - rating_key: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - added_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - chapter_source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('chapterSource'), 'exclude': lambda f: f is None }}) - primary_extra_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('primaryExtraKey'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetSearchResultsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetSearchResultsGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - director: Optional[List[GetSearchResultsDirector]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Director'), 'exclude': lambda f: f is None }}) - writer: Optional[List[GetSearchResultsWriter]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Writer'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetSearchResultsCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetSearchResultsRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Provider: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetSearchResultsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - provider: Optional[List[Provider]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Provider'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSearchResultsResponseBody: - r"""Search Results""" - media_container: Optional[GetSearchResultsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetSearchResultsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetSearchResultsResponseBody] = dataclasses.field(default=None) - r"""Search Results""" - - diff --git a/src/plex_api/models/operations/getserveractivities.py b/src/plex_api/models/operations/getserveractivities.py deleted file mode 100644 index fee6b85..0000000 --- a/src/plex_api/models/operations/getserveractivities.py +++ /dev/null @@ -1,63 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Context: - library_section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Activity: - uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('uuid'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - cancellable: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cancellable'), 'exclude': lambda f: f is None }}) - user_id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userID'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - subtitle: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtitle'), 'exclude': lambda f: f is None }}) - progress: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('progress'), 'exclude': lambda f: f is None }}) - context: Optional[Context] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Context'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerActivitiesMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - activity: Optional[List[Activity]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Activity'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerActivitiesResponseBody: - r"""The Server Activities""" - media_container: Optional[GetServerActivitiesMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetServerActivitiesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetServerActivitiesResponseBody] = dataclasses.field(default=None) - r"""The Server Activities""" - - diff --git a/src/plex_api/models/operations/getservercapabilities.py b/src/plex_api/models/operations/getservercapabilities.py deleted file mode 100644 index a4f93b1..0000000 --- a/src/plex_api/models/operations/getservercapabilities.py +++ /dev/null @@ -1,99 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Directory: - count: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('count'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class MediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_camera_upload: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowCameraUpload'), 'exclude': lambda f: f is None }}) - allow_channel_access: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowChannelAccess'), 'exclude': lambda f: f is None }}) - allow_media_deletion: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowMediaDeletion'), 'exclude': lambda f: f is None }}) - allow_sharing: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSharing'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - allow_tuners: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowTuners'), 'exclude': lambda f: f is None }}) - background_processing: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('backgroundProcessing'), 'exclude': lambda f: f is None }}) - certificate: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('certificate'), 'exclude': lambda f: f is None }}) - companion_proxy: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companionProxy'), 'exclude': lambda f: f is None }}) - country_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('countryCode'), 'exclude': lambda f: f is None }}) - diagnostics: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('diagnostics'), 'exclude': lambda f: f is None }}) - event_stream: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('eventStream'), 'exclude': lambda f: f is None }}) - friendly_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('friendlyName'), 'exclude': lambda f: f is None }}) - hub_search: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hubSearch'), 'exclude': lambda f: f is None }}) - item_clusters: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemClusters'), 'exclude': lambda f: f is None }}) - livetv: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('livetv'), 'exclude': lambda f: f is None }}) - machine_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('machineIdentifier'), 'exclude': lambda f: f is None }}) - media_providers: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaProviders'), 'exclude': lambda f: f is None }}) - multiuser: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('multiuser'), 'exclude': lambda f: f is None }}) - music_analysis: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('musicAnalysis'), 'exclude': lambda f: f is None }}) - my_plex: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('myPlex'), 'exclude': lambda f: f is None }}) - my_plex_mapping_state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('myPlexMappingState'), 'exclude': lambda f: f is None }}) - my_plex_signin_state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('myPlexSigninState'), 'exclude': lambda f: f is None }}) - my_plex_subscription: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('myPlexSubscription'), 'exclude': lambda f: f is None }}) - my_plex_username: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('myPlexUsername'), 'exclude': lambda f: f is None }}) - offline_transcode: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('offlineTranscode'), 'exclude': lambda f: f is None }}) - owner_features: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ownerFeatures'), 'exclude': lambda f: f is None }}) - photo_auto_tag: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('photoAutoTag'), 'exclude': lambda f: f is None }}) - platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }}) - platform_version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformVersion'), 'exclude': lambda f: f is None }}) - plugin_host: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pluginHost'), 'exclude': lambda f: f is None }}) - push_notifications: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushNotifications'), 'exclude': lambda f: f is None }}) - read_only_libraries: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('readOnlyLibraries'), 'exclude': lambda f: f is None }}) - streaming_brain_abr_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamingBrainABRVersion'), 'exclude': lambda f: f is None }}) - streaming_brain_version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamingBrainVersion'), 'exclude': lambda f: f is None }}) - sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sync'), 'exclude': lambda f: f is None }}) - transcoder_active_video_sessions: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderActiveVideoSessions'), 'exclude': lambda f: f is None }}) - transcoder_audio: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderAudio'), 'exclude': lambda f: f is None }}) - transcoder_lyrics: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderLyrics'), 'exclude': lambda f: f is None }}) - transcoder_photo: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderPhoto'), 'exclude': lambda f: f is None }}) - transcoder_subtitles: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderSubtitles'), 'exclude': lambda f: f is None }}) - transcoder_video: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderVideo'), 'exclude': lambda f: f is None }}) - transcoder_video_bitrates: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderVideoBitrates'), 'exclude': lambda f: f is None }}) - transcoder_video_qualities: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderVideoQualities'), 'exclude': lambda f: f is None }}) - transcoder_video_resolutions: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcoderVideoResolutions'), 'exclude': lambda f: f is None }}) - updated_at: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - updater: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updater'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - voice_search: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('voiceSearch'), 'exclude': lambda f: f is None }}) - directory: Optional[List[Directory]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Directory'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerCapabilitiesResponseBody: - r"""The Server Capabilities""" - media_container: Optional[MediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetServerCapabilitiesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetServerCapabilitiesResponseBody] = dataclasses.field(default=None) - r"""The Server Capabilities""" - - diff --git a/src/plex_api/models/operations/getserveridentity.py b/src/plex_api/models/operations/getserveridentity.py deleted file mode 100644 index 651acdc..0000000 --- a/src/plex_api/models/operations/getserveridentity.py +++ /dev/null @@ -1,42 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerIdentityMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - claimed: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('claimed'), 'exclude': lambda f: f is None }}) - machine_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('machineIdentifier'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerIdentityResponseBody: - r"""The Server Identity information""" - media_container: Optional[GetServerIdentityMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetServerIdentityResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetServerIdentityResponseBody] = dataclasses.field(default=None) - r"""The Server Identity information""" - - diff --git a/src/plex_api/models/operations/getserverlist.py b/src/plex_api/models/operations/getserverlist.py deleted file mode 100644 index c361f44..0000000 --- a/src/plex_api/models/operations/getserverlist.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerListServer: - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - host: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('host'), 'exclude': lambda f: f is None }}) - address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('address'), 'exclude': lambda f: f is None }}) - port: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('port'), 'exclude': lambda f: f is None }}) - machine_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('machineIdentifier'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerListMediaContainer: - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - server: Optional[List[GetServerListServer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Server'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerListResponseBody: - r"""List of Servers""" - media_container: Optional[GetServerListMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetServerListResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetServerListResponseBody] = dataclasses.field(default=None) - r"""List of Servers""" - - diff --git a/src/plex_api/models/operations/getserverpreferences.py b/src/plex_api/models/operations/getserverpreferences.py deleted file mode 100644 index c038a38..0000000 --- a/src/plex_api/models/operations/getserverpreferences.py +++ /dev/null @@ -1,57 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Setting: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('label'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - default: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('default'), 'exclude': lambda f: f is None }}) - value: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'exclude': lambda f: f is None }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hidden'), 'exclude': lambda f: f is None }}) - advanced: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('advanced'), 'exclude': lambda f: f is None }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('group'), 'exclude': lambda f: f is None }}) - enum_values: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enumValues'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerPreferencesMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - setting: Optional[List[Setting]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Setting'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetServerPreferencesResponseBody: - r"""Server Preferences""" - media_container: Optional[GetServerPreferencesMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetServerPreferencesResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetServerPreferencesResponseBody] = dataclasses.field(default=None) - r"""Server Preferences""" - - diff --git a/src/plex_api/models/operations/getsessionhistory.py b/src/plex_api/models/operations/getsessionhistory.py deleted file mode 100644 index 55bad4e..0000000 --- a/src/plex_api/models/operations/getsessionhistory.py +++ /dev/null @@ -1,92 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class Filter: - r"""Filters content by field and direction/equality - (Unknown if viewedAt is the only supported column) - """ - - - - -@dataclasses.dataclass -class GetSessionHistoryRequest: - sort: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'sort', 'style': 'form', 'explode': True }}) - r"""Sorts the results by the specified field followed by the direction (asc, desc)""" - account_id: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'accountId', 'style': 'form', 'explode': True }}) - r"""Filter results by those that are related to a specific users id""" - filter_: Optional[Filter] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'filter', 'style': 'form', 'explode': True }}) - r"""Filters content by field and direction/equality - (Unknown if viewedAt is the only supported column) - """ - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'librarySectionID', 'style': 'form', 'explode': True }}) - r"""Filters the results based on the id of a valid library section""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionHistoryMetadata: - history_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('historyKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - grandparent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentKey'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - grandparent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTitle'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - grandparent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentThumb'), 'exclude': lambda f: f is None }}) - grandparent_art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentArt'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - viewed_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedAt'), 'exclude': lambda f: f is None }}) - account_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountID'), 'exclude': lambda f: f is None }}) - device_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deviceID'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionHistoryMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetSessionHistoryMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionHistoryResponseBody: - r"""List of Plex Sessions""" - media_container: Optional[GetSessionHistoryMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetSessionHistoryResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetSessionHistoryResponseBody] = dataclasses.field(default=None) - r"""List of Plex Sessions""" - - diff --git a/src/plex_api/models/operations/getsessions.py b/src/plex_api/models/operations/getsessions.py deleted file mode 100644 index b34e76f..0000000 --- a/src/plex_api/models/operations/getsessions.py +++ /dev/null @@ -1,185 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsStream: - album_gain: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('albumGain'), 'exclude': lambda f: f is None }}) - album_peak: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('albumPeak'), 'exclude': lambda f: f is None }}) - album_range: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('albumRange'), 'exclude': lambda f: f is None }}) - audio_channel_layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannelLayout'), 'exclude': lambda f: f is None }}) - bit_depth: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitDepth'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('channels'), 'exclude': lambda f: f is None }}) - codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('codec'), 'exclude': lambda f: f is None }}) - display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayTitle'), 'exclude': lambda f: f is None }}) - extended_display_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('extendedDisplayTitle'), 'exclude': lambda f: f is None }}) - gain: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('gain'), 'exclude': lambda f: f is None }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - loudness: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('loudness'), 'exclude': lambda f: f is None }}) - lra: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lra'), 'exclude': lambda f: f is None }}) - peak: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('peak'), 'exclude': lambda f: f is None }}) - sampling_rate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('samplingRate'), 'exclude': lambda f: f is None }}) - selected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selected'), 'exclude': lambda f: f is None }}) - stream_type: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamType'), 'exclude': lambda f: f is None }}) - location: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('location'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsPart: - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - file: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('file'), 'exclude': lambda f: f is None }}) - has_thumbnail: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasThumbnail'), 'exclude': lambda f: f is None }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - decision: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('decision'), 'exclude': lambda f: f is None }}) - selected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selected'), 'exclude': lambda f: f is None }}) - stream: Optional[List[GetSessionsStream]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Stream'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsMedia: - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - bitrate: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bitrate'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - selected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selected'), 'exclude': lambda f: f is None }}) - part: Optional[List[GetSessionsPart]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Part'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsUser: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Player: - address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('address'), 'exclude': lambda f: f is None }}) - machine_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('machineIdentifier'), 'exclude': lambda f: f is None }}) - model: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('model'), 'exclude': lambda f: f is None }}) - platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }}) - platform_version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformVersion'), 'exclude': lambda f: f is None }}) - product: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('product'), 'exclude': lambda f: f is None }}) - profile: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('profile'), 'exclude': lambda f: f is None }}) - remote_public_address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remotePublicAddress'), 'exclude': lambda f: f is None }}) - state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('state'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - local: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('local'), 'exclude': lambda f: f is None }}) - relayed: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('relayed'), 'exclude': lambda f: f is None }}) - secure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('secure'), 'exclude': lambda f: f is None }}) - user_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userID'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Session: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - bandwidth: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bandwidth'), 'exclude': lambda f: f is None }}) - location: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('location'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsMetadata: - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - grandparent_art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentArt'), 'exclude': lambda f: f is None }}) - grandparent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentGuid'), 'exclude': lambda f: f is None }}) - grandparent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentKey'), 'exclude': lambda f: f is None }}) - grandparent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentRatingKey'), 'exclude': lambda f: f is None }}) - grandparent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentThumb'), 'exclude': lambda f: f is None }}) - grandparent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grandparentTitle'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - music_analysis_version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('musicAnalysisVersion'), 'exclude': lambda f: f is None }}) - parent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentGuid'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - parent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentRatingKey'), 'exclude': lambda f: f is None }}) - parent_studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentStudio'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - parent_year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentYear'), 'exclude': lambda f: f is None }}) - rating_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingCount'), 'exclude': lambda f: f is None }}) - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - session_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sessionKey'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - title_sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('titleSort'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - view_offset: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewOffset'), 'exclude': lambda f: f is None }}) - media: Optional[List[GetSessionsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }}) - user: Optional[GetSessionsUser] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('User'), 'exclude': lambda f: f is None }}) - player: Optional[Player] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Player'), 'exclude': lambda f: f is None }}) - session: Optional[Session] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Session'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetSessionsMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetSessionsResponseBody: - r"""List of Active Plex Sessions""" - media_container: Optional[GetSessionsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetSessionsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetSessionsResponseBody] = dataclasses.field(default=None) - r"""List of Active Plex Sessions""" - - diff --git a/src/plex_api/models/operations/getsourceconnectioninformation.py b/src/plex_api/models/operations/getsourceconnectioninformation.py deleted file mode 100644 index 5d21f06..0000000 --- a/src/plex_api/models/operations/getsourceconnectioninformation.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class GetSourceConnectionInformationRequest: - source: str = dataclasses.field(metadata={'query_param': { 'field_name': 'source', 'style': 'form', 'explode': True }}) - r"""The source identifier with an included prefix.""" - - - - -@dataclasses.dataclass -class GetSourceConnectionInformationResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/getstatistics.py b/src/plex_api/models/operations/getstatistics.py deleted file mode 100644 index 36694ce..0000000 --- a/src/plex_api/models/operations/getstatistics.py +++ /dev/null @@ -1,93 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetStatisticsRequest: - timespan: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'Timespan', 'style': 'form', 'explode': True }}) - r"""The timespan to retrieve statistics for - the exact meaning of this parameter is not known - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetStatisticsDevice: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }}) - client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }}) - created_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Account: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - default_audio_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultAudioLanguage'), 'exclude': lambda f: f is None }}) - auto_select_audio: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('autoSelectAudio'), 'exclude': lambda f: f is None }}) - default_subtitle_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultSubtitleLanguage'), 'exclude': lambda f: f is None }}) - subtitle_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtitleMode'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class StatisticsMedia: - account_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountID'), 'exclude': lambda f: f is None }}) - device_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deviceID'), 'exclude': lambda f: f is None }}) - timespan: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timespan'), 'exclude': lambda f: f is None }}) - at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('at'), 'exclude': lambda f: f is None }}) - metadata_type: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadataType'), 'exclude': lambda f: f is None }}) - count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('count'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetStatisticsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - device: Optional[List[GetStatisticsDevice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Device'), 'exclude': lambda f: f is None }}) - account: Optional[List[Account]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Account'), 'exclude': lambda f: f is None }}) - statistics_media: Optional[List[StatisticsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('StatisticsMedia'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetStatisticsResponseBody: - r"""Media Statistics""" - media_container: Optional[GetStatisticsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetStatisticsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetStatisticsResponseBody] = dataclasses.field(default=None) - r"""Media Statistics""" - - diff --git a/src/plex_api/models/operations/gettimeline.py b/src/plex_api/models/operations/gettimeline.py deleted file mode 100644 index eddf09b..0000000 --- a/src/plex_api/models/operations/gettimeline.py +++ /dev/null @@ -1,51 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class State(str, Enum): - r"""The state of the media item""" - PLAYING = 'playing' - PAUSED = 'paused' - STOPPED = 'stopped' - - -@dataclasses.dataclass -class GetTimelineRequest: - rating_key: float = dataclasses.field(metadata={'query_param': { 'field_name': 'ratingKey', 'style': 'form', 'explode': True }}) - r"""The rating key of the media item""" - key: str = dataclasses.field(metadata={'query_param': { 'field_name': 'key', 'style': 'form', 'explode': True }}) - r"""The key of the media item to get the timeline for""" - state: State = dataclasses.field(metadata={'query_param': { 'field_name': 'state', 'style': 'form', 'explode': True }}) - r"""The state of the media item""" - has_mde: float = dataclasses.field(metadata={'query_param': { 'field_name': 'hasMDE', 'style': 'form', 'explode': True }}) - r"""Whether the media item has MDE""" - time: float = dataclasses.field(metadata={'query_param': { 'field_name': 'time', 'style': 'form', 'explode': True }}) - r"""The time of the media item""" - duration: float = dataclasses.field(metadata={'query_param': { 'field_name': 'duration', 'style': 'form', 'explode': True }}) - r"""The duration of the media item""" - context: str = dataclasses.field(metadata={'query_param': { 'field_name': 'context', 'style': 'form', 'explode': True }}) - r"""The context of the media item""" - play_queue_item_id: float = dataclasses.field(metadata={'query_param': { 'field_name': 'playQueueItemID', 'style': 'form', 'explode': True }}) - r"""The play queue item ID of the media item""" - play_back_time: float = dataclasses.field(metadata={'query_param': { 'field_name': 'playBackTime', 'style': 'form', 'explode': True }}) - r"""The playback time of the media item""" - row: float = dataclasses.field(metadata={'query_param': { 'field_name': 'row', 'style': 'form', 'explode': True }}) - r"""The row of the media item""" - - - - -@dataclasses.dataclass -class GetTimelineResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/gettoken.py b/src/plex_api/models/operations/gettoken.py deleted file mode 100644 index 4634798..0000000 --- a/src/plex_api/models/operations/gettoken.py +++ /dev/null @@ -1,94 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import dateutil.parser -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import datetime -from plex_api import utils -from typing import Optional - -GET_TOKEN_SERVERS = [ - "https://plex.tv/api/v2", -] - - -@dataclasses.dataclass -class GetTokenGlobals: - x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }}) - 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) - """ - - - - -@dataclasses.dataclass -class GetTokenRequest: - pin_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'pinID', 'style': 'simple', 'explode': False }}) - r"""The PinID to retrieve an access token for""" - x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }}) - 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) - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTokenLocation: - code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - european_union_member: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('european_union_member'), 'exclude': lambda f: f is None }}) - continent_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('continent_code'), 'exclude': lambda f: f is None }}) - country: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('country'), 'exclude': lambda f: f is None }}) - city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }}) - time_zone: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('time_zone'), 'exclude': lambda f: f is None }}) - postal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postal_code'), 'exclude': lambda f: f is None }}) - in_privacy_restricted_country: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('in_privacy_restricted_country'), 'exclude': lambda f: f is None }}) - subdivisions: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subdivisions'), 'exclude': lambda f: f is None }}) - coordinates: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('coordinates'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTokenResponseBody: - r"""Access Token""" - id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - r"""PinID for use with authentication""" - code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) - product: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('product'), 'exclude': lambda f: f is None }}) - trusted: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trusted'), 'exclude': lambda f: f is None }}) - qr: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('qr'), 'exclude': lambda f: f is None }}) - r"""a link to a QR code hosted on plex.tv - The QR code redirects to the relevant `plex.tv/link` authentication page - Which then prompts the user for the 4 Digit Link Pin - """ - client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }}) - location: Optional[GetTokenLocation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('location'), 'exclude': lambda f: f is None }}) - expires_in: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresIn'), 'exclude': lambda f: f is None }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - expires_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }}) - auth_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('authToken'), 'exclude': lambda f: f is None }}) - new_registration: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('newRegistration'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetTokenResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetTokenResponseBody] = dataclasses.field(default=None) - r"""Access Token""" - - diff --git a/src/plex_api/models/operations/gettopwatchedcontent.py b/src/plex_api/models/operations/gettopwatchedcontent.py deleted file mode 100644 index ef45fbb..0000000 --- a/src/plex_api/models/operations/gettopwatchedcontent.py +++ /dev/null @@ -1,143 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from plex_api import utils -from typing import List, Optional - - -@dataclasses.dataclass -class GetTopWatchedContentRequest: - type: int = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""the library type (1 - movies, 2 - shows, 3 - music)""" - include_guids: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeGuids', 'style': 'form', 'explode': True }}) - r"""Adds the Guids object to the response""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentGenre: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentCountry: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentGuids: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentRole: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }}) - tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }}) - role: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('role'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class User: - id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - slug: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('slug'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - viewed_leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedLeafCount'), 'exclude': lambda f: f is None }}) - child_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('childCount'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - global_view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('globalViewCount'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - genre: Optional[List[GetTopWatchedContentGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }}) - country: Optional[List[GetTopWatchedContentCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }}) - guids: Optional[List[GetTopWatchedContentGuids]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Guid'), 'exclude': lambda f: f is None }}) - role: Optional[List[GetTopWatchedContentRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }}) - user: Optional[List[User]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('User'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[GetTopWatchedContentMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTopWatchedContentResponseBody: - r"""The metadata of the library item.""" - media_container: Optional[GetTopWatchedContentMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetTopWatchedContentResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetTopWatchedContentResponseBody] = dataclasses.field(default=None) - r"""The metadata of the library item.""" - - diff --git a/src/plex_api/models/operations/gettranscodesessions.py b/src/plex_api/models/operations/gettranscodesessions.py deleted file mode 100644 index 916e9ff..0000000 --- a/src/plex_api/models/operations/gettranscodesessions.py +++ /dev/null @@ -1,71 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class TranscodeSession: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - throttled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('throttled'), 'exclude': lambda f: f is None }}) - complete: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('complete'), 'exclude': lambda f: f is None }}) - progress: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('progress'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - speed: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('speed'), 'exclude': lambda f: f is None }}) - error: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - remaining: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remaining'), 'exclude': lambda f: f is None }}) - context: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('context'), 'exclude': lambda f: f is None }}) - source_video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceVideoCodec'), 'exclude': lambda f: f is None }}) - source_audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAudioCodec'), 'exclude': lambda f: f is None }}) - video_decision: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoDecision'), 'exclude': lambda f: f is None }}) - audio_decision: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioDecision'), 'exclude': lambda f: f is None }}) - subtitle_decision: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtitleDecision'), 'exclude': lambda f: f is None }}) - protocol: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('protocol'), 'exclude': lambda f: f is None }}) - container: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('container'), 'exclude': lambda f: f is None }}) - video_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('videoCodec'), 'exclude': lambda f: f is None }}) - audio_codec: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioCodec'), 'exclude': lambda f: f is None }}) - audio_channels: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audioChannels'), 'exclude': lambda f: f is None }}) - transcode_hw_requested: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transcodeHwRequested'), 'exclude': lambda f: f is None }}) - time_stamp: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeStamp'), 'exclude': lambda f: f is None }}) - max_offset_available: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maxOffsetAvailable'), 'exclude': lambda f: f is None }}) - min_offset_available: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('minOffsetAvailable'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTranscodeSessionsMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - transcode_session: Optional[List[TranscodeSession]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('TranscodeSession'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetTranscodeSessionsResponseBody: - r"""The Transcode Sessions""" - media_container: Optional[GetTranscodeSessionsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetTranscodeSessionsResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetTranscodeSessionsResponseBody] = dataclasses.field(default=None) - r"""The Transcode Sessions""" - - diff --git a/src/plex_api/models/operations/gettransienttoken.py b/src/plex_api/models/operations/gettransienttoken.py deleted file mode 100644 index 91705c9..0000000 --- a/src/plex_api/models/operations/gettransienttoken.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class GetTransientTokenQueryParamType(str, Enum): - r"""`delegation` - This is the only supported `type` parameter.""" - DELEGATION = 'delegation' - - -class Scope(str, Enum): - r"""`all` - This is the only supported `scope` parameter.""" - ALL = 'all' - - -@dataclasses.dataclass -class GetTransientTokenRequest: - type: GetTransientTokenQueryParamType = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""`delegation` - This is the only supported `type` parameter.""" - scope: Scope = dataclasses.field(metadata={'query_param': { 'field_name': 'scope', 'style': 'form', 'explode': True }}) - r"""`all` - This is the only supported `scope` parameter.""" - - - - -@dataclasses.dataclass -class GetTransientTokenResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/getupdatestatus.py b/src/plex_api/models/operations/getupdatestatus.py deleted file mode 100644 index 47ff650..0000000 --- a/src/plex_api/models/operations/getupdatestatus.py +++ /dev/null @@ -1,57 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from plex_api import utils -from typing import List, Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Release: - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - added: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('added'), 'exclude': lambda f: f is None }}) - fixed: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fixed'), 'exclude': lambda f: f is None }}) - download_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('downloadURL'), 'exclude': lambda f: f is None }}) - state: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('state'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetUpdateStatusMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - can_install: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canInstall'), 'exclude': lambda f: f is None }}) - checked_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('checkedAt'), 'exclude': lambda f: f is None }}) - download_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('downloadURL'), 'exclude': lambda f: f is None }}) - status: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - release: Optional[List[Release]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Release'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetUpdateStatusResponseBody: - r"""The Server Updates""" - media_container: Optional[GetUpdateStatusMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetUpdateStatusResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetUpdateStatusResponseBody] = dataclasses.field(default=None) - r"""The Server Updates""" - - diff --git a/src/plex_api/models/operations/getwatchlist.py b/src/plex_api/models/operations/getwatchlist.py deleted file mode 100644 index 1520880..0000000 --- a/src/plex_api/models/operations/getwatchlist.py +++ /dev/null @@ -1,154 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from datetime import date -from enum import Enum -from plex_api import utils -from typing import List, Optional - -GET_WATCHLIST_SERVERS = [ - "https://metadata.provider.plex.tv", - r"""The plex metadata provider server""" -] - - -class PathParamFilter(str, Enum): - r"""Filter""" - ALL = 'all' - AVAILABLE = 'available' - RELEASED = 'released' - - -class Libtype(str, Enum): - r"""The type of library to filter. Can be \\"movie\\" or \\"show\\", or all if not present.""" - MOVIE = 'movie' - SHOW = 'show' - - -class IncludeCollections(int, Enum): - r"""include collections in the results""" - ONE = 1 - ZERO = 0 - - -class IncludeExternalMedia(int, Enum): - r"""include external media in the results""" - ONE = 1 - ZERO = 0 - - -@dataclasses.dataclass -class GetWatchlistRequest: - filter_: PathParamFilter = dataclasses.field(metadata={'path_param': { 'field_name': 'filter', 'style': 'simple', 'explode': False }}) - r"""Filter""" - x_plex_token: str = dataclasses.field(metadata={'query_param': { 'field_name': 'X-Plex-Token', 'style': 'form', 'explode': True }}) - r"""User Token""" - sort: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'sort', 'style': 'form', 'explode': True }}) - r"""In the format \\"field:dir\\". Available fields are \\"watchlistedAt\\" (Added At), - \"titleSort\" (Title), \"originallyAvailableAt\" (Release Date), or \"rating\" (Critic Rating). - \"dir\" can be \"asc\" or \"desc\" - """ - libtype: Optional[Libtype] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'libtype', 'style': 'form', 'explode': True }}) - r"""The type of library to filter. Can be \\"movie\\" or \\"show\\", or all if not present.""" - maxresults: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'maxresults', 'style': 'form', 'explode': True }}) - r"""The number of items to return. If not specified, all items will be returned. - If the number of items exceeds the limit, the response will be paginated. - """ - include_collections: Optional[IncludeCollections] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeCollections', 'style': 'form', 'explode': True }}) - r"""include collections in the results""" - include_external_media: Optional[IncludeExternalMedia] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeExternalMedia', 'style': 'form', 'explode': True }}) - r"""include external media in the results""" - x_plex_container_start: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'X-Plex-Container-Start', 'style': 'form', 'explode': True }}) - r"""The index of the first item to return. If not specified, the first item will be returned. - If the number of items exceeds the limit, the response will be paginated. - """ - x_plex_container_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'X-Plex-Container-Size', 'style': 'form', 'explode': True }}) - r"""The number of items to return. If not specified, all items will be returned. - If the number of items exceeds the limit, the response will be paginated. - """ - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Image: - alt: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('alt'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('url'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Metadata: - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }}) - tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }}) - public_pages_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('publicPagesURL'), 'exclude': lambda f: f is None }}) - slug: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('slug'), 'exclude': lambda f: f is None }}) - user_state: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userState'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }}) - originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }}) - year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }}) - image: Optional[List[Image]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Image'), 'exclude': lambda f: f is None }}) - banner: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('banner'), 'exclude': lambda f: f is None }}) - rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rating'), 'exclude': lambda f: f is None }}) - expires_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresAt'), 'exclude': lambda f: f is None }}) - original_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originalTitle'), 'exclude': lambda f: f is None }}) - audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }}) - audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }}) - rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingImage'), 'exclude': lambda f: f is None }}) - imdb_rating_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('imdbRatingCount'), 'exclude': lambda f: f is None }}) - subtype: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtype'), 'exclude': lambda f: f is None }}) - theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('theme'), 'exclude': lambda f: f is None }}) - leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }}) - child_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('childCount'), 'exclude': lambda f: f is None }}) - is_continuing_series: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isContinuingSeries'), 'exclude': lambda f: f is None }}) - skip_children: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('skipChildren'), 'exclude': lambda f: f is None }}) - availability_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availabilityId'), 'exclude': lambda f: f is None }}) - streaming_media_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('streamingMediaId'), 'exclude': lambda f: f is None }}) - playable_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('playableKey'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class GetWatchlistResponseBody: - r"""Watchlist Data""" - library_section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }}) - library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }}) - offset: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('offset'), 'exclude': lambda f: f is None }}) - total_size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalSize'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[Metadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class GetWatchlistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[GetWatchlistResponseBody] = dataclasses.field(default=None) - r"""Watchlist Data""" - - diff --git a/src/plex_api/models/operations/logline.py b/src/plex_api/models/operations/logline.py deleted file mode 100644 index ea6590b..0000000 --- a/src/plex_api/models/operations/logline.py +++ /dev/null @@ -1,51 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class Level(int, Enum): - r"""An integer log level to write to the PMS log with. - 0: Error - 1: Warning - 2: Info - 3: Debug - 4: Verbose - """ - ZERO = 0 - ONE = 1 - TWO = 2 - THREE = 3 - FOUR = 4 - - -@dataclasses.dataclass -class LogLineRequest: - level: Level = dataclasses.field(metadata={'query_param': { 'field_name': 'level', 'style': 'form', 'explode': True }}) - r"""An integer log level to write to the PMS log with. - 0: Error - 1: Warning - 2: Info - 3: Debug - 4: Verbose - """ - message: str = dataclasses.field(metadata={'query_param': { 'field_name': 'message', 'style': 'form', 'explode': True }}) - r"""The text of the message to write to the log.""" - source: str = dataclasses.field(metadata={'query_param': { 'field_name': 'source', 'style': 'form', 'explode': True }}) - r"""a string indicating the source of the message.""" - - - - -@dataclasses.dataclass -class LogLineResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/logmultiline.py b/src/plex_api/models/operations/logmultiline.py deleted file mode 100644 index 2720298..0000000 --- a/src/plex_api/models/operations/logmultiline.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class LogMultiLineResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/markplayed.py b/src/plex_api/models/operations/markplayed.py deleted file mode 100644 index fd7bae1..0000000 --- a/src/plex_api/models/operations/markplayed.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class MarkPlayedRequest: - key: float = dataclasses.field(metadata={'query_param': { 'field_name': 'key', 'style': 'form', 'explode': True }}) - r"""The media key to mark as played""" - - - - -@dataclasses.dataclass -class MarkPlayedResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/markunplayed.py b/src/plex_api/models/operations/markunplayed.py deleted file mode 100644 index 3b6e969..0000000 --- a/src/plex_api/models/operations/markunplayed.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class MarkUnplayedRequest: - key: float = dataclasses.field(metadata={'query_param': { 'field_name': 'key', 'style': 'form', 'explode': True }}) - r"""The media key to mark as Unplayed""" - - - - -@dataclasses.dataclass -class MarkUnplayedResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/performsearch.py b/src/plex_api/models/operations/performsearch.py deleted file mode 100644 index d1fa56b..0000000 --- a/src/plex_api/models/operations/performsearch.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from typing import Optional - - -@dataclasses.dataclass -class PerformSearchRequest: - query: str = dataclasses.field(metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) - r"""The query term""" - section_id: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'sectionId', 'style': 'form', 'explode': True }}) - r"""This gives context to the search, and can result in re-ordering of search result hubs""" - limit: Optional[float] = dataclasses.field(default=3, metadata={'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': True }}) - r"""The number of items to return per hub""" - - - - -@dataclasses.dataclass -class PerformSearchResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/performvoicesearch.py b/src/plex_api/models/operations/performvoicesearch.py deleted file mode 100644 index 0f6b181..0000000 --- a/src/plex_api/models/operations/performvoicesearch.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from typing import Optional - - -@dataclasses.dataclass -class PerformVoiceSearchRequest: - query: str = dataclasses.field(metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) - r"""The query term""" - section_id: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'sectionId', 'style': 'form', 'explode': True }}) - r"""This gives context to the search, and can result in re-ordering of search result hubs""" - limit: Optional[float] = dataclasses.field(default=3, metadata={'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': True }}) - r"""The number of items to return per hub""" - - - - -@dataclasses.dataclass -class PerformVoiceSearchResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/refreshlibrary.py b/src/plex_api/models/operations/refreshlibrary.py deleted file mode 100644 index a4cc727..0000000 --- a/src/plex_api/models/operations/refreshlibrary.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class RefreshLibraryRequest: - section_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to refresh""" - - - - -@dataclasses.dataclass -class RefreshLibraryResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/searchlibrary.py b/src/plex_api/models/operations/searchlibrary.py deleted file mode 100644 index aa6002b..0000000 --- a/src/plex_api/models/operations/searchlibrary.py +++ /dev/null @@ -1,97 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from dataclasses_json import Undefined, dataclass_json -from enum import Enum -from plex_api import utils -from typing import List, Optional - - -class Type(int, Enum): - r"""Plex content type to search for""" - ONE = 1 - TWO = 2 - THREE = 3 - FOUR = 4 - - -@dataclasses.dataclass -class SearchLibraryRequest: - section_id: int = dataclasses.field(metadata={'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': False }}) - r"""the Id of the library to query""" - type: Type = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }}) - r"""Plex content type to search for""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class SearchLibraryMetadata: - rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }}) - parent_rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentRatingKey'), 'exclude': lambda f: f is None }}) - guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }}) - parent_guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentGuid'), 'exclude': lambda f: f is None }}) - parent_studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentStudio'), 'exclude': lambda f: f is None }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }}) - parent_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentKey'), 'exclude': lambda f: f is None }}) - parent_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTitle'), 'exclude': lambda f: f is None }}) - summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }}) - index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) - parent_index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentIndex'), 'exclude': lambda f: f is None }}) - parent_year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentYear'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - parent_thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentThumb'), 'exclude': lambda f: f is None }}) - parent_theme: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentTheme'), 'exclude': lambda f: f is None }}) - added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }}) - updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class SearchLibraryMediaContainer: - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }}) - art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }}) - identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }}) - media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }}) - media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }}) - nocache: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nocache'), 'exclude': lambda f: f is None }}) - thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }}) - title1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title1'), 'exclude': lambda f: f is None }}) - title2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title2'), 'exclude': lambda f: f is None }}) - view_group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewGroup'), 'exclude': lambda f: f is None }}) - view_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewMode'), 'exclude': lambda f: f is None }}) - metadata: Optional[List[SearchLibraryMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }}) - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class SearchLibraryResponseBody: - r"""The contents of the library by section and type""" - media_container: Optional[SearchLibraryMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }}) - - - - -@dataclasses.dataclass -class SearchLibraryResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - object: Optional[SearchLibraryResponseBody] = dataclasses.field(default=None) - r"""The contents of the library by section and type""" - - diff --git a/src/plex_api/models/operations/startalltasks.py b/src/plex_api/models/operations/startalltasks.py deleted file mode 100644 index cca932b..0000000 --- a/src/plex_api/models/operations/startalltasks.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class StartAllTasksResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/starttask.py b/src/plex_api/models/operations/starttask.py deleted file mode 100644 index dda86a4..0000000 --- a/src/plex_api/models/operations/starttask.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class TaskName(str, Enum): - r"""the name of the task to be started.""" - BACKUP_DATABASE = 'BackupDatabase' - BUILD_GRACENOTE_COLLECTIONS = 'BuildGracenoteCollections' - CHECK_FOR_UPDATES = 'CheckForUpdates' - CLEAN_OLD_BUNDLES = 'CleanOldBundles' - CLEAN_OLD_CACHE_FILES = 'CleanOldCacheFiles' - DEEP_MEDIA_ANALYSIS = 'DeepMediaAnalysis' - GENERATE_AUTO_TAGS = 'GenerateAutoTags' - GENERATE_CHAPTER_THUMBS = 'GenerateChapterThumbs' - GENERATE_MEDIA_INDEX_FILES = 'GenerateMediaIndexFiles' - OPTIMIZE_DATABASE = 'OptimizeDatabase' - REFRESH_LIBRARIES = 'RefreshLibraries' - REFRESH_LOCAL_MEDIA = 'RefreshLocalMedia' - REFRESH_PERIODIC_METADATA = 'RefreshPeriodicMetadata' - UPGRADE_MEDIA_ANALYSIS = 'UpgradeMediaAnalysis' - - -@dataclasses.dataclass -class StartTaskRequest: - task_name: TaskName = dataclasses.field(metadata={'path_param': { 'field_name': 'taskName', 'style': 'simple', 'explode': False }}) - r"""the name of the task to be started.""" - - - - -@dataclasses.dataclass -class StartTaskResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/startuniversaltranscode.py b/src/plex_api/models/operations/startuniversaltranscode.py deleted file mode 100644 index c097fd3..0000000 --- a/src/plex_api/models/operations/startuniversaltranscode.py +++ /dev/null @@ -1,56 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from typing import Optional - - -@dataclasses.dataclass -class StartUniversalTranscodeRequest: - has_mde: float = dataclasses.field(metadata={'query_param': { 'field_name': 'hasMDE', 'style': 'form', 'explode': True }}) - r"""Whether the media item has MDE""" - path: str = dataclasses.field(metadata={'query_param': { 'field_name': 'path', 'style': 'form', 'explode': True }}) - r"""The path to the media item to transcode""" - media_index: float = dataclasses.field(metadata={'query_param': { 'field_name': 'mediaIndex', 'style': 'form', 'explode': True }}) - r"""The index of the media item to transcode""" - part_index: float = dataclasses.field(metadata={'query_param': { 'field_name': 'partIndex', 'style': 'form', 'explode': True }}) - r"""The index of the part to transcode""" - protocol: str = dataclasses.field(metadata={'query_param': { 'field_name': 'protocol', 'style': 'form', 'explode': True }}) - r"""The protocol to use for the transcode session""" - fast_seek: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'fastSeek', 'style': 'form', 'explode': True }}) - r"""Whether to use fast seek or not""" - direct_play: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'directPlay', 'style': 'form', 'explode': True }}) - r"""Whether to use direct play or not""" - direct_stream: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'directStream', 'style': 'form', 'explode': True }}) - r"""Whether to use direct stream or not""" - subtitle_size: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'subtitleSize', 'style': 'form', 'explode': True }}) - r"""The size of the subtitles""" - subtites: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'subtites', 'style': 'form', 'explode': True }}) - r"""The subtitles""" - audio_boost: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'audioBoost', 'style': 'form', 'explode': True }}) - r"""The audio boost""" - location: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'location', 'style': 'form', 'explode': True }}) - r"""The location of the transcode session""" - media_buffer_size: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'mediaBufferSize', 'style': 'form', 'explode': True }}) - r"""The size of the media buffer""" - session: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'session', 'style': 'form', 'explode': True }}) - r"""The session ID""" - add_debug_overlay: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'addDebugOverlay', 'style': 'form', 'explode': True }}) - r"""Whether to add a debug overlay or not""" - auto_adjust_quality: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'autoAdjustQuality', 'style': 'form', 'explode': True }}) - r"""Whether to auto adjust quality or not""" - - - - -@dataclasses.dataclass -class StartUniversalTranscodeResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/stopalltasks.py b/src/plex_api/models/operations/stopalltasks.py deleted file mode 100644 index 85d9f38..0000000 --- a/src/plex_api/models/operations/stopalltasks.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class StopAllTasksResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/stoptask.py b/src/plex_api/models/operations/stoptask.py deleted file mode 100644 index a90a1fa..0000000 --- a/src/plex_api/models/operations/stoptask.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class PathParamTaskName(str, Enum): - r"""The name of the task to be started.""" - BACKUP_DATABASE = 'BackupDatabase' - BUILD_GRACENOTE_COLLECTIONS = 'BuildGracenoteCollections' - CHECK_FOR_UPDATES = 'CheckForUpdates' - CLEAN_OLD_BUNDLES = 'CleanOldBundles' - CLEAN_OLD_CACHE_FILES = 'CleanOldCacheFiles' - DEEP_MEDIA_ANALYSIS = 'DeepMediaAnalysis' - GENERATE_AUTO_TAGS = 'GenerateAutoTags' - GENERATE_CHAPTER_THUMBS = 'GenerateChapterThumbs' - GENERATE_MEDIA_INDEX_FILES = 'GenerateMediaIndexFiles' - OPTIMIZE_DATABASE = 'OptimizeDatabase' - REFRESH_LIBRARIES = 'RefreshLibraries' - REFRESH_LOCAL_MEDIA = 'RefreshLocalMedia' - REFRESH_PERIODIC_METADATA = 'RefreshPeriodicMetadata' - UPGRADE_MEDIA_ANALYSIS = 'UpgradeMediaAnalysis' - - -@dataclasses.dataclass -class StopTaskRequest: - task_name: PathParamTaskName = dataclasses.field(metadata={'path_param': { 'field_name': 'taskName', 'style': 'simple', 'explode': False }}) - r"""The name of the task to be started.""" - - - - -@dataclasses.dataclass -class StopTaskResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/stoptranscodesession.py b/src/plex_api/models/operations/stoptranscodesession.py deleted file mode 100644 index 8bf46f4..0000000 --- a/src/plex_api/models/operations/stoptranscodesession.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class StopTranscodeSessionRequest: - session_key: str = dataclasses.field(metadata={'path_param': { 'field_name': 'sessionKey', 'style': 'simple', 'explode': False }}) - r"""the Key of the transcode session to stop""" - - - - -@dataclasses.dataclass -class StopTranscodeSessionResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/updateplaylist.py b/src/plex_api/models/operations/updateplaylist.py deleted file mode 100644 index 1064cec..0000000 --- a/src/plex_api/models/operations/updateplaylist.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from typing import Optional - - -@dataclasses.dataclass -class UpdatePlaylistRequest: - playlist_id: float = dataclasses.field(metadata={'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': False }}) - r"""the ID of the playlist""" - title: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'title', 'style': 'form', 'explode': True }}) - r"""name of the playlist""" - summary: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'summary', 'style': 'form', 'explode': True }}) - r"""summary description of the playlist""" - - - - -@dataclasses.dataclass -class UpdatePlaylistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/updateplayprogress.py b/src/plex_api/models/operations/updateplayprogress.py deleted file mode 100644 index 7b74ec2..0000000 --- a/src/plex_api/models/operations/updateplayprogress.py +++ /dev/null @@ -1,29 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http - - -@dataclasses.dataclass -class UpdatePlayProgressRequest: - key: str = dataclasses.field(metadata={'query_param': { 'field_name': 'key', 'style': 'form', 'explode': True }}) - r"""the media key""" - time: float = dataclasses.field(metadata={'query_param': { 'field_name': 'time', 'style': 'form', 'explode': True }}) - r"""The time, in milliseconds, used to set the media playback progress.""" - state: str = dataclasses.field(metadata={'query_param': { 'field_name': 'state', 'style': 'form', 'explode': True }}) - r"""The playback state of the media item.""" - - - - -@dataclasses.dataclass -class UpdatePlayProgressResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/models/operations/uploadplaylist.py b/src/plex_api/models/operations/uploadplaylist.py deleted file mode 100644 index f0640f9..0000000 --- a/src/plex_api/models/operations/uploadplaylist.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from enum import Enum - - -class Force(int, Enum): - r"""Force overwriting of duplicate playlists. - By default, a playlist file uploaded with the same path will overwrite the existing playlist. - The `force` argument is used to disable overwriting. - If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - """ - ZERO = 0 - ONE = 1 - - -@dataclasses.dataclass -class UploadPlaylistRequest: - path: str = dataclasses.field(metadata={'query_param': { 'field_name': 'path', 'style': 'form', 'explode': True }}) - r"""absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - The GUID of each playlist is based on the filename. - If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - The GUID of each playlist is based on the filename. - """ - force: Force = dataclasses.field(metadata={'query_param': { 'field_name': 'force', 'style': 'form', 'explode': True }}) - r"""Force overwriting of duplicate playlists. - By default, a playlist file uploaded with the same path will overwrite the existing playlist. - The `force` argument is used to disable overwriting. - If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - """ - - - - -@dataclasses.dataclass -class UploadPlaylistResponse: - content_type: str = dataclasses.field() - r"""HTTP response content type for this operation""" - status_code: int = dataclasses.field() - r"""HTTP response status code for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" - - diff --git a/src/plex_api/playlists.py b/src/plex_api/playlists.py deleted file mode 100644 index b1ebc70..0000000 --- a/src/plex_api/playlists.py +++ /dev/null @@ -1,644 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Playlists: - r"""Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as \\"all albums from 2017\\"). - They can be organized in (optionally nesting) folders. - Retrieving a playlist, or its items, will trigger a refresh of its metadata. - This may cause the duration and number of items to change. - """ - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def create_playlist(self, request: operations.CreatePlaylistRequest) -> operations.CreatePlaylistResponse: - r"""Create a Playlist - Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - - `playQueueID` - To create a playlist from an existing play queue. - """ - hook_ctx = HookContext(operation_id='createPlaylist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/playlists' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.CreatePlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.CreatePlaylistResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.CreatePlaylistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_playlists(self, playlist_type: Optional[operations.PlaylistType] = None, smart: Optional[operations.QueryParamSmart] = None) -> operations.GetPlaylistsResponse: - r"""Get All Playlists - Get All Playlists given the specified filters. - """ - hook_ctx = HookContext(operation_id='getPlaylists', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetPlaylistsRequest( - playlist_type=playlist_type, - smart=smart, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/playlists' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetPlaylistsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPlaylistsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetPlaylistsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_playlist(self, playlist_id: float) -> operations.GetPlaylistResponse: - r"""Retrieve Playlist - Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - """ - hook_ctx = HookContext(operation_id='getPlaylist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetPlaylistRequest( - playlist_id=playlist_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetPlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPlaylistResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetPlaylistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def delete_playlist(self, playlist_id: float) -> operations.DeletePlaylistResponse: - r"""Deletes a Playlist - This endpoint will delete a playlist - """ - hook_ctx = HookContext(operation_id='deletePlaylist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.DeletePlaylistRequest( - playlist_id=playlist_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.DeletePlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 204: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.DeletePlaylistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def update_playlist(self, playlist_id: float, title: Optional[str] = None, summary: Optional[str] = None) -> operations.UpdatePlaylistResponse: - r"""Update a Playlist - From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - """ - hook_ctx = HookContext(operation_id='updatePlaylist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.UpdatePlaylistRequest( - playlist_id=playlist_id, - title=title, - summary=summary, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('PUT', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.UpdatePlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.UpdatePlaylistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_playlist_contents(self, playlist_id: float, type_: float) -> operations.GetPlaylistContentsResponse: - r"""Retrieve Playlist Contents - Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - For example, you could use this to display a list of recently added albums vis a smart playlist. - Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - """ - hook_ctx = HookContext(operation_id='getPlaylistContents', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetPlaylistContentsRequest( - playlist_id=playlist_id, - type=type_, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}/items', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetPlaylistContentsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPlaylistContentsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetPlaylistContentsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def clear_playlist_contents(self, playlist_id: float) -> operations.ClearPlaylistContentsResponse: - r"""Delete Playlist Contents - Clears a playlist, only works with dumb playlists. Returns the playlist. - """ - hook_ctx = HookContext(operation_id='clearPlaylistContents', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.ClearPlaylistContentsRequest( - playlist_id=playlist_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}/items', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.ClearPlaylistContentsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.ClearPlaylistContentsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def add_playlist_contents(self, playlist_id: float, uri: str, play_queue_id: Optional[float] = None) -> operations.AddPlaylistContentsResponse: - r"""Adding to a Playlist - Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - """ - hook_ctx = HookContext(operation_id='addPlaylistContents', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.AddPlaylistContentsRequest( - playlist_id=playlist_id, - uri=uri, - play_queue_id=play_queue_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/playlists/{playlistID}/items', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('PUT', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.AddPlaylistContentsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.AddPlaylistContentsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.AddPlaylistContentsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def upload_playlist(self, path: str, force: operations.Force) -> operations.UploadPlaylistResponse: - r"""Upload Playlist - Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - """ - hook_ctx = HookContext(operation_id='uploadPlaylist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.UploadPlaylistRequest( - path=path, - force=force, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/playlists/upload' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.UploadPlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.UploadPlaylistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/plex.py b/src/plex_api/plex.py deleted file mode 100644 index 9f03c6e..0000000 --- a/src/plex_api/plex.py +++ /dev/null @@ -1,241 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Plex: - r"""API Calls that perform operations directly against https://Plex.tv""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_home_data(self) -> operations.GetHomeDataResponse: - r"""Get Plex Home Data - Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - """ - hook_ctx = HookContext(operation_id='getHomeData', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/home' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetHomeDataResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetHomeDataResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetHomeDataResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_pin(self, x_plex_product: str, strong: Optional[bool] = None, x_plex_client_identifier: Optional[str] = None, server_url: Optional[str] = None) -> operations.GetPinResponse: - r"""Get a Pin - Retrieve a Pin from Plex.tv for authentication flows - """ - hook_ctx = HookContext(operation_id='getPin', oauth2_scopes=[], security_source=None) - request = operations.GetPinRequest( - strong=strong, - x_plex_client_identifier=x_plex_client_identifier, - x_plex_product=x_plex_product, - ) - - _globals = operations.GetPinGlobals( - x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, - ) - - base_url = utils.template_url(operations.GET_PIN_SERVERS[0], { - }) - if server_url is not None: - base_url = server_url - - url = utils.generate_url(base_url, '/pins', request, _globals) - - headers = {} - query_params = {} - - headers = { **utils.get_headers(request, _globals), **headers } - query_params = { **utils.get_query_params(request, _globals), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('POST', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetPinResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 201: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPinResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetPinResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_token(self, pin_id: str, x_plex_client_identifier: Optional[str] = None, server_url: Optional[str] = None) -> operations.GetTokenResponse: - r"""Get Access Token - Retrieve an Access Token from Plex.tv after the Pin has already been authenticated - """ - hook_ctx = HookContext(operation_id='getToken', oauth2_scopes=[], security_source=None) - request = operations.GetTokenRequest( - pin_id=pin_id, - x_plex_client_identifier=x_plex_client_identifier, - ) - - _globals = operations.GetTokenGlobals( - x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, - ) - - base_url = utils.template_url(operations.GET_TOKEN_SERVERS[0], { - }) - if server_url is not None: - base_url = server_url - - url = utils.generate_url(base_url, '/pins/{pinID}', request, _globals) - - headers = {} - query_params = {} - - headers = { **utils.get_headers(request, _globals), **headers } - query_params = { **utils.get_query_params(request, _globals), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetTokenResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTokenResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetTokenResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/sdk.py b/src/plex_api/sdk.py deleted file mode 100644 index 614e9d5..0000000 --- a/src/plex_api/sdk.py +++ /dev/null @@ -1,177 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .activities import Activities -from .authentication import Authentication -from .butler import Butler -from .hubs import Hubs -from .library import Library -from .log import Log -from .media import Media -from .playlists import Playlists -from .plex import Plex -from .sdkconfiguration import SDKConfiguration, ServerProtocol -from .search import Search -from .server import Server -from .sessions import Sessions -from .statistics import Statistics -from .updater import Updater -from .utils.retries import RetryConfig -from .video import Video -from .watchlist import Watchlist -from plex_api import utils -from plex_api._hooks import SDKHooks -from plex_api.models import components, internal -from typing import Callable, Dict, Optional, Union - -class PlexAPI: - r"""Plex-API: A Plex Media Server API Map - An Open API Spec for interacting with Plex.tv and Plex Servers - """ - server: Server - r"""Operations against the Plex Media Server System.""" - media: Media - r"""API Calls interacting with Plex Media Server Media""" - video: Video - r"""API Calls that perform operations with Plex Media Server Videos""" - activities: Activities - r"""Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - - They must contain an `type` which is used by clients to distinguish the specific activity. - - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. - """ - butler: Butler - r"""Butler is the task manager of the Plex Media Server Ecosystem.""" - plex: Plex - r"""API Calls that perform operations directly against https://Plex.tv""" - hubs: Hubs - r"""Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.""" - search: Search - r"""API Calls that perform search operations with Plex Media Server""" - library: Library - r"""API Calls interacting with Plex Media Server Libraries""" - log: Log - r"""Submit logs to the Log Handler for Plex Media Server""" - playlists: Playlists - r"""Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as \\"all albums from 2017\\"). - They can be organized in (optionally nesting) folders. - Retrieving a playlist, or its items, will trigger a refresh of its metadata. - This may cause the duration and number of items to change. - """ - authentication: Authentication - r"""API Calls regarding authentication for Plex Media Server""" - statistics: Statistics - r"""API Calls that perform operations with Plex Media Server Statistics""" - sessions: Sessions - r"""API Calls that perform search operations with Plex Media Server Sessions""" - updater: Updater - r"""This describes the API for searching and applying updates to the Plex Media Server. - Updates to the status can be observed via the Event API. - """ - watchlist: Watchlist - r"""API Calls that perform operations with Plex Media Server Watchlists""" - - sdk_configuration: SDKConfiguration - - def __init__(self, - access_token: Union[str, Callable[[], str]], - x_plex_client_identifier: str = None, - protocol: ServerProtocol = None, - ip: str = None, - port: str = 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[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 x_plex_client_identifier: Configures the x_plex_client_identifier parameter for all supported operations - :type x_plex_client_identifier: str - :param protocol: Allows setting the protocol variable for url substitution - :type protocol: ServerProtocol - :param ip: Allows setting the ip variable for url substitution - :type ip: str - :param port: Allows setting the port variable for url substitution - :type port: str - :param server_idx: The index of the server to use for all operations - :type server_idx: int - :param server_url: The server URL to use for all operations - :type server_url: str - :param url_params: Parameters to optionally template the server URL with - :type url_params: Dict[str, str] - :param client: The requests.Session HTTP client to use for all operations - :type client: requests_http.Session - :param retry_config: The utils.RetryConfig to use globally - :type retry_config: RetryConfig - """ - 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) - server_defaults = [ - { - 'protocol': protocol or 'http', - 'ip': ip or '10.10.10.47', - 'port': port or '32400', - }, - ] - - _globals = internal.Globals( - x_plex_client_identifier=x_plex_client_identifier, - ) - - self.sdk_configuration = SDKConfiguration( - client, - _globals, - security, - server_url, - server_idx, - server_defaults, - retry_config=retry_config - ) - - hooks = SDKHooks() - - current_server_url, *_ = self.sdk_configuration.get_server_details() - server_url, self.sdk_configuration.client = hooks.sdk_init(current_server_url, self.sdk_configuration.client) - if current_server_url != server_url: - self.sdk_configuration.server_url = server_url - - # pylint: disable=protected-access - self.sdk_configuration.__dict__['_hooks'] = hooks - - self._init_sdks() - - - def _init_sdks(self): - self.server = Server(self.sdk_configuration) - self.media = Media(self.sdk_configuration) - self.video = Video(self.sdk_configuration) - self.activities = Activities(self.sdk_configuration) - self.butler = Butler(self.sdk_configuration) - self.plex = Plex(self.sdk_configuration) - self.hubs = Hubs(self.sdk_configuration) - self.search = Search(self.sdk_configuration) - self.library = Library(self.sdk_configuration) - self.log = Log(self.sdk_configuration) - self.playlists = Playlists(self.sdk_configuration) - self.authentication = Authentication(self.sdk_configuration) - self.statistics = Statistics(self.sdk_configuration) - self.sessions = Sessions(self.sdk_configuration) - self.updater = Updater(self.sdk_configuration) - self.watchlist = Watchlist(self.sdk_configuration) diff --git a/src/plex_api/sdkconfiguration.py b/src/plex_api/sdkconfiguration.py deleted file mode 100644 index e97df8e..0000000 --- a/src/plex_api/sdkconfiguration.py +++ /dev/null @@ -1,54 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - - -import requests as requests_http -from ._hooks import SDKHooks -from .utils import utils -from .utils.retries import RetryConfig -from dataclasses import dataclass, field -from enum import Enum -from plex_api.models import components, internal -from typing import Callable, Dict, List, Optional, Tuple, Union - - -SERVERS = [ - '{protocol}://{ip}:{port}', - # The full address of your Plex Server -] -"""Contains the list of servers available to the SDK""" - - -class ServerProtocol(str, Enum): - HTTP = 'http' - HTTPS = 'https' - - -@dataclass -class SDKConfiguration: - client: requests_http.Session - globals: internal.Globals - security: Union[components.Security,Callable[[], components.Security]] = None - server_url: Optional[str] = '' - server_idx: Optional[int] = 0 - server_defaults: List[Dict[str, str]] = field(default_factory=List) - language: str = 'python' - openapi_doc_version: str = '0.0.3' - sdk_version: str = '0.10.0' - gen_version: str = '2.349.6' - user_agent: str = 'speakeasy-sdk/python 0.10.0 2.349.6 0.0.3 plex-api-client' - retry_config: Optional[RetryConfig] = None - - def __post_init__(self): - self._hooks = SDKHooks() - - def get_server_details(self) -> Tuple[str, Dict[str, str]]: - if self.server_url is not None and self.server_url != '': - return utils.remove_suffix(self.server_url, '/'), {} - if self.server_idx is None: - self.server_idx = 0 - - return SERVERS[self.server_idx], self.server_defaults[self.server_idx] - - - def get_hooks(self) -> SDKHooks: - return self._hooks diff --git a/src/plex_api/search.py b/src/plex_api/search.py deleted file mode 100644 index b5fb00d..0000000 --- a/src/plex_api/search.py +++ /dev/null @@ -1,237 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Search: - r"""API Calls that perform search operations with Plex Media Server""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def perform_search(self, query: str, section_id: Optional[float] = None, limit: Optional[float] = None) -> operations.PerformSearchResponse: - r"""Perform a search - This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - - In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - - - `reason`: The reason for the result, if not because of a direct search term match; can be either: - - `section`: There are multiple identical results from different sections. - - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` - - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). - - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - - This request is intended to be very fast, and called as the user types. - """ - hook_ctx = HookContext(operation_id='performSearch', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.PerformSearchRequest( - query=query, - section_id=section_id, - limit=limit, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/hubs/search' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.PerformSearchResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.PerformSearchResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def perform_voice_search(self, query: str, section_id: Optional[float] = None, limit: Optional[float] = None) -> operations.PerformVoiceSearchResponse: - r"""Perform a voice search - This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - Whenever possible, clients should limit the search to the appropriate type. - Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - """ - hook_ctx = HookContext(operation_id='performVoiceSearch', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.PerformVoiceSearchRequest( - query=query, - section_id=section_id, - limit=limit, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/hubs/search/voice' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.PerformVoiceSearchResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.PerformVoiceSearchResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_search_results(self, query: str) -> operations.GetSearchResultsResponse: - r"""Get Search Results - This will search the database for the string provided. - """ - hook_ctx = HookContext(operation_id='getSearchResults', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetSearchResultsRequest( - query=query, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/search' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetSearchResultsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetSearchResultsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetSearchResultsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/server.py b/src/plex_api/server.py deleted file mode 100644 index d73aaba..0000000 --- a/src/plex_api/server.py +++ /dev/null @@ -1,541 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Server: - r"""Operations against the Plex Media Server System.""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_server_capabilities(self) -> operations.GetServerCapabilitiesResponse: - r"""Get Server Capabilities - Get Server Capabilities - """ - hook_ctx = HookContext(operation_id='getServerCapabilities', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetServerCapabilitiesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetServerCapabilitiesResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetServerCapabilitiesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_server_preferences(self) -> operations.GetServerPreferencesResponse: - r"""Get Server Preferences - Get Server Preferences - """ - hook_ctx = HookContext(operation_id='getServerPreferences', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/:/prefs' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetServerPreferencesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetServerPreferencesResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetServerPreferencesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_available_clients(self) -> operations.GetAvailableClientsResponse: - r"""Get Available Clients - Get Available Clients - """ - hook_ctx = HookContext(operation_id='getAvailableClients', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/clients' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetAvailableClientsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetAvailableClientsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetAvailableClientsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_devices(self) -> operations.GetDevicesResponse: - r"""Get Devices - Get Devices - """ - hook_ctx = HookContext(operation_id='getDevices', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/devices' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetDevicesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetDevicesResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetDevicesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_server_identity(self) -> operations.GetServerIdentityResponse: - r"""Get Server Identity - Get Server Identity - """ - hook_ctx = HookContext(operation_id='getServerIdentity', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/identity' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetServerIdentityResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetServerIdentityResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetServerIdentityResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_my_plex_account(self) -> operations.GetMyPlexAccountResponse: - r"""Get MyPlex Account - Returns MyPlex Account Information - """ - hook_ctx = HookContext(operation_id='getMyPlexAccount', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/myplex/account' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetMyPlexAccountResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetMyPlexAccountResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetMyPlexAccountResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_resized_photo(self, request: operations.GetResizedPhotoRequest) -> operations.GetResizedPhotoResponse: - r"""Get a Resized Photo - Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - """ - hook_ctx = HookContext(operation_id='getResizedPhoto', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/photo/:/transcode' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetResizedPhotoResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetResizedPhotoResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_server_list(self) -> operations.GetServerListResponse: - r"""Get Server List - Get Server List - """ - hook_ctx = HookContext(operation_id='getServerList', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/servers' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetServerListResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetServerListResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetServerListResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/sessions.py b/src/plex_api/sessions.py deleted file mode 100644 index 18378a3..0000000 --- a/src/plex_api/sessions.py +++ /dev/null @@ -1,288 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Sessions: - r"""API Calls that perform search operations with Plex Media Server Sessions""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_sessions(self) -> operations.GetSessionsResponse: - r"""Get Active Sessions - This will retrieve the \"Now Playing\" Information of the PMS. - """ - hook_ctx = HookContext(operation_id='getSessions', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/status/sessions' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetSessionsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetSessionsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetSessionsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_session_history(self, sort: Optional[str] = None, account_id: Optional[int] = None, filter_: Optional[operations.Filter] = None, library_section_id: Optional[int] = None) -> operations.GetSessionHistoryResponse: - r"""Get Session History - This will Retrieve a listing of all history views. - """ - hook_ctx = HookContext(operation_id='getSessionHistory', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetSessionHistoryRequest( - sort=sort, - account_id=account_id, - filter_=filter_, - library_section_id=library_section_id, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/status/sessions/history/all' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetSessionHistoryResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetSessionHistoryResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetSessionHistoryResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_transcode_sessions(self) -> operations.GetTranscodeSessionsResponse: - r"""Get Transcode Sessions - Get Transcode Sessions - """ - hook_ctx = HookContext(operation_id='getTranscodeSessions', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/transcode/sessions' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetTranscodeSessionsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTranscodeSessionsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetTranscodeSessionsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def stop_transcode_session(self, session_key: str) -> operations.StopTranscodeSessionResponse: - r"""Stop a Transcode Session - Stop a Transcode Session - """ - hook_ctx = HookContext(operation_id='stopTranscodeSession', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.StopTranscodeSessionRequest( - session_key=session_key, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = utils.generate_url(base_url, '/transcode/sessions/{sessionKey}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('DELETE', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StopTranscodeSessionResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 204: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StopTranscodeSessionResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/statistics.py b/src/plex_api/statistics.py deleted file mode 100644 index ab4b6e5..0000000 --- a/src/plex_api/statistics.py +++ /dev/null @@ -1,231 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Statistics: - r"""API Calls that perform operations with Plex Media Server Statistics""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_statistics(self, timespan: Optional[int] = None) -> operations.GetStatisticsResponse: - r"""Get Media Statistics - This will return the media statistics for the server - """ - hook_ctx = HookContext(operation_id='getStatistics', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetStatisticsRequest( - timespan=timespan, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/statistics/media' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetStatisticsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetStatisticsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetStatisticsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_resources_statistics(self, timespan: Optional[int] = None) -> operations.GetResourcesStatisticsResponse: - r"""Get Resources Statistics - This will return the resources for the server - """ - hook_ctx = HookContext(operation_id='getResourcesStatistics', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetResourcesStatisticsRequest( - timespan=timespan, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/statistics/resources' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetResourcesStatisticsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetResourcesStatisticsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetResourcesStatisticsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def get_bandwidth_statistics(self, timespan: Optional[int] = None) -> operations.GetBandwidthStatisticsResponse: - r"""Get Bandwidth Statistics - This will return the bandwidth statistics for the server - """ - hook_ctx = HookContext(operation_id='getBandwidthStatistics', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.GetBandwidthStatisticsRequest( - timespan=timespan, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/statistics/bandwidth' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetBandwidthStatisticsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBandwidthStatisticsResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetBandwidthStatisticsResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/updater.py b/src/plex_api/updater.py deleted file mode 100644 index da5834e..0000000 --- a/src/plex_api/updater.py +++ /dev/null @@ -1,217 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Updater: - r"""This describes the API for searching and applying updates to the Plex Media Server. - Updates to the status can be observed via the Event API. - """ - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_update_status(self) -> operations.GetUpdateStatusResponse: - r"""Querying status of updates - Querying status of updates - """ - hook_ctx = HookContext(operation_id='getUpdateStatus', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/updater/status' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetUpdateStatusResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetUpdateStatusResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetUpdateStatusResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def check_for_updates(self, download: Optional[operations.Download] = None) -> operations.CheckForUpdatesResponse: - r"""Checking for updates - Checking for updates - """ - hook_ctx = HookContext(operation_id='checkForUpdates', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.CheckForUpdatesRequest( - download=download, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/updater/check' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('PUT', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.CheckForUpdatesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.CheckForUpdatesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def apply_updates(self, tonight: Optional[operations.Tonight] = None, skip: Optional[operations.Skip] = None) -> operations.ApplyUpdatesResponse: - r"""Apply Updates - Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - """ - hook_ctx = HookContext(operation_id='applyUpdates', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.ApplyUpdatesRequest( - tonight=tonight, - skip=skip, - ) - - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/updater/apply' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('PUT', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','500','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.ApplyUpdatesResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code == 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.ApplyUpdatesResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/utils/__init__.py b/src/plex_api/utils/__init__.py deleted file mode 100644 index 94b7398..0000000 --- a/src/plex_api/utils/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from .retries import * -from .utils import * diff --git a/src/plex_api/utils/retries.py b/src/plex_api/utils/retries.py deleted file mode 100644 index c40fc41..0000000 --- a/src/plex_api/utils/retries.py +++ /dev/null @@ -1,119 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import random -import time -from typing import List - -import requests - - -class BackoffStrategy: - initial_interval: int - max_interval: int - exponent: float - max_elapsed_time: int - - def __init__(self, initial_interval: int, max_interval: int, exponent: float, max_elapsed_time: int): - self.initial_interval = initial_interval - self.max_interval = max_interval - self.exponent = exponent - self.max_elapsed_time = max_elapsed_time - - -class RetryConfig: - strategy: str - backoff: BackoffStrategy - retry_connection_errors: bool - - def __init__(self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool): - self.strategy = strategy - self.backoff = backoff - self.retry_connection_errors = retry_connection_errors - - -class Retries: - config: RetryConfig - status_codes: List[str] - - def __init__(self, config: RetryConfig, status_codes: List[str]): - self.config = config - self.status_codes = status_codes - - -class TemporaryError(Exception): - response: requests.Response - - def __init__(self, response: requests.Response): - self.response = response - - -class PermanentError(Exception): - inner: Exception - - def __init__(self, inner: Exception): - self.inner = inner - - -def retry(func, retries: Retries): - if retries.config.strategy == 'backoff': - def do_request(): - res: requests.Response - try: - res = func() - - for code in retries.status_codes: - if "X" in code.upper(): - code_range = int(code[0]) - - status_major = res.status_code / 100 - - if status_major >= code_range and status_major < code_range + 1: - raise TemporaryError(res) - else: - parsed_code = int(code) - - if res.status_code == parsed_code: - raise TemporaryError(res) - except requests.exceptions.ConnectionError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except requests.exceptions.Timeout as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except TemporaryError: - raise - except Exception as exception: - raise PermanentError(exception) from exception - - return res - - return retry_with_backoff(do_request, retries.config.backoff.initial_interval, retries.config.backoff.max_interval, retries.config.backoff.exponent, retries.config.backoff.max_elapsed_time) - - return func() - - -def retry_with_backoff(func, initial_interval=500, max_interval=60000, exponent=1.5, max_elapsed_time=3600000): - start = round(time.time()*1000) - retries = 0 - - while True: - try: - return func() - except PermanentError as exception: - raise exception.inner - except Exception as exception: # pylint: disable=broad-exception-caught - now = round(time.time()*1000) - if now - start > max_elapsed_time: - if isinstance(exception, TemporaryError): - return exception.response - - raise - sleep = ((initial_interval/1000) * - exponent**retries + random.uniform(0, 1)) - sleep = min(sleep, max_interval / 1000) - time.sleep(sleep) - retries += 1 diff --git a/src/plex_api/utils/utils.py b/src/plex_api/utils/utils.py deleted file mode 100644 index c263197..0000000 --- a/src/plex_api/utils/utils.py +++ /dev/null @@ -1,1087 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import base64 -import json -import re -import sys -from dataclasses import Field, fields, is_dataclass, make_dataclass -from datetime import date, datetime -from decimal import Decimal -from email.message import Message -from enum import Enum -from typing import ( - Any, - Callable, - Dict, - List, - Optional, - Tuple, - Union, - get_args, - get_origin, -) -from xmlrpc.client import boolean -from typing_inspect import is_optional_type -import dateutil.parser -from dataclasses_json import DataClassJsonMixin - - -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, str]]: - headers: Dict[str, str] = {} - query_params: Dict[str, str] = {} - - if security is None: - return headers, query_params - - sec_fields: Tuple[Field, ...] = fields(security) - for sec_field in sec_fields: - value = getattr(security, sec_field.name) - if value is None: - continue - - metadata = sec_field.metadata.get("security") - if metadata is None: - continue - if metadata.get("option"): - _parse_security_option(headers, query_params, value) - return headers, query_params - if metadata.get("scheme"): - # Special case for basic auth which could be a flattened struct - if metadata.get("sub_type") == "basic" and not is_dataclass(value): - _parse_security_scheme(headers, query_params, metadata, security) - else: - _parse_security_scheme(headers, query_params, metadata, value) - - return headers, query_params - - -def _parse_security_option( - headers: Dict[str, str], query_params: Dict[str, str], option: Any -): - opt_fields: Tuple[Field, ...] = fields(option) - for opt_field in opt_fields: - metadata = opt_field.metadata.get("security") - if metadata is None or metadata.get("scheme") is None: - continue - _parse_security_scheme( - headers, query_params, metadata, getattr(option, opt_field.name) - ) - - -def _parse_security_scheme( - headers: Dict[str, str], - query_params: Dict[str, str], - scheme_metadata: Dict, - scheme: Any, -): - scheme_type = scheme_metadata.get("type") - sub_type = scheme_metadata.get("sub_type") - - if is_dataclass(scheme): - if scheme_type == "http" and sub_type == "basic": - _parse_basic_auth_scheme(headers, scheme) - return - - scheme_fields: Tuple[Field, ...] = fields(scheme) - for scheme_field in scheme_fields: - metadata = scheme_field.metadata.get("security") - if metadata is None or metadata.get("field_name") is None: - continue - - value = getattr(scheme, scheme_field.name) - - _parse_security_scheme_value( - headers, query_params, scheme_metadata, metadata, value - ) - else: - _parse_security_scheme_value( - headers, query_params, scheme_metadata, scheme_metadata, scheme - ) - - -def _parse_security_scheme_value( - headers: Dict[str, str], - query_params: Dict[str, str], - scheme_metadata: Dict, - security_metadata: Dict, - value: Any, -): - scheme_type = scheme_metadata.get("type") - sub_type = scheme_metadata.get("sub_type") - - header_name = str(security_metadata.get("field_name")) - - if scheme_type == "apiKey": - if sub_type == "header": - headers[header_name] = value - elif sub_type == "query": - query_params[header_name] = value - else: - raise Exception("not supported") - elif scheme_type == "openIdConnect": - headers[header_name] = _apply_bearer(value) - elif scheme_type == "oauth2": - if sub_type != "client_credentials": - headers[header_name] = _apply_bearer(value) - elif scheme_type == "http": - if sub_type == "bearer": - headers[header_name] = _apply_bearer(value) - else: - raise Exception("not supported") - else: - raise Exception("not supported") - - -def _apply_bearer(token: str) -> str: - return token.lower().startswith("bearer ") and token or f"Bearer {token}" - - -def _parse_basic_auth_scheme(headers: Dict[str, str], scheme: Any): - username = "" - password = "" - - scheme_fields: Tuple[Field, ...] = fields(scheme) - for scheme_field in scheme_fields: - metadata = scheme_field.metadata.get("security") - if metadata is None or metadata.get("field_name") is None: - continue - - field_name = metadata.get("field_name") - value = getattr(scheme, scheme_field.name) - - if field_name == "username": - username = value - if field_name == "password": - password = value - - data = f"{username}:{password}".encode() - headers["Authorization"] = f"Basic {base64.b64encode(data).decode()}" - - -def generate_url( - server_url: str, - path: str, - path_params: Any, - gbls: Optional[Any] = None, -) -> str: - path_param_values: Dict[str, str] = {} - - globals_already_populated = _populate_path_params( - path_params, gbls, path_param_values, [] - ) - if gbls is not None: - _populate_path_params(gbls, None, path_param_values, globals_already_populated) - - for key, value in path_param_values.items(): - path = path.replace("{" + key + "}", value, 1) - - return remove_suffix(server_url, "/") + path - - -def _populate_path_params( - path_params: Any, - gbls: Any, - path_param_values: Dict[str, str], - skip_fields: List[str], -) -> List[str]: - globals_already_populated: List[str] = [] - - path_param_fields: Tuple[Field, ...] = fields(path_params) - for field in path_param_fields: - if field.name in skip_fields: - continue - - param_metadata = field.metadata.get("path_param") - if param_metadata is None: - continue - - param = getattr(path_params, field.name) if path_params is not None else None - param, global_found = _populate_from_globals( - field.name, param, "path_param", gbls - ) - if global_found: - globals_already_populated.append(field.name) - - if param is None: - continue - - f_name = param_metadata.get("field_name", field.name) - serialization = param_metadata.get("serialization", "") - if serialization != "": - serialized_params = _get_serialized_params( - param_metadata, field.type, f_name, param - ) - for key, value in serialized_params.items(): - path_param_values[key] = value - else: - if param_metadata.get("style", "simple") == "simple": - if isinstance(param, List): - pp_vals: List[str] = [] - for pp_val in param: - if pp_val is None: - continue - pp_vals.append(_val_to_string(pp_val)) - path_param_values[param_metadata.get("field_name", field.name)] = ( - ",".join(pp_vals) - ) - elif isinstance(param, Dict): - pp_vals: List[str] = [] - for pp_key in param: - if param[pp_key] is None: - continue - if param_metadata.get("explode"): - pp_vals.append(f"{pp_key}={_val_to_string(param[pp_key])}") - else: - pp_vals.append(f"{pp_key},{_val_to_string(param[pp_key])}") - path_param_values[param_metadata.get("field_name", field.name)] = ( - ",".join(pp_vals) - ) - elif not isinstance(param, (str, int, float, complex, bool, Decimal)): - pp_vals: List[str] = [] - param_fields: Tuple[Field, ...] = fields(param) - for param_field in param_fields: - param_value_metadata = param_field.metadata.get("path_param") - if not param_value_metadata: - continue - - param_name = param_value_metadata.get("field_name", field.name) - - param_field_val = getattr(param, param_field.name) - if param_field_val is None: - continue - if param_metadata.get("explode"): - pp_vals.append( - f"{param_name}={_val_to_string(param_field_val)}" - ) - else: - pp_vals.append( - f"{param_name},{_val_to_string(param_field_val)}" - ) - path_param_values[param_metadata.get("field_name", field.name)] = ( - ",".join(pp_vals) - ) - else: - path_param_values[param_metadata.get("field_name", field.name)] = ( - _val_to_string(param) - ) - - return globals_already_populated - - -def is_optional(field): - return get_origin(field) is Union and type(None) in get_args(field) - - -def template_url(url_with_params: str, params: Dict[str, str]) -> str: - for key, value in params.items(): - url_with_params = url_with_params.replace("{" + key + "}", value) - - return url_with_params - - -def get_query_params( - query_params: Any, - gbls: Optional[Any] = None, -) -> Dict[str, List[str]]: - params: Dict[str, List[str]] = {} - - globals_already_populated = _populate_query_params(query_params, gbls, params, []) - if gbls is not None: - _populate_query_params(gbls, None, params, globals_already_populated) - - return params - - -def _populate_query_params( - query_params: Any, - gbls: Any, - query_param_values: Dict[str, List[str]], - skip_fields: List[str], -) -> List[str]: - globals_already_populated: List[str] = [] - - param_fields: Tuple[Field, ...] = fields(query_params) - for field in param_fields: - if field.name in skip_fields: - continue - - metadata = field.metadata.get("query_param") - if not metadata: - continue - - param_name = field.name - value = getattr(query_params, param_name) if query_params is not None else None - - value, global_found = _populate_from_globals( - param_name, value, "query_param", gbls - ) - if global_found: - globals_already_populated.append(param_name) - - f_name = metadata.get("field_name") - serialization = metadata.get("serialization", "") - if serialization != "": - serialized_parms = _get_serialized_params( - metadata, field.type, f_name, value - ) - for key, value in serialized_parms.items(): - if key in query_param_values: - query_param_values[key].extend(value) - else: - query_param_values[key] = [value] - else: - style = metadata.get("style", "form") - if style == "deepObject": - _populate_deep_object_query_params( - metadata, f_name, value, query_param_values - ) - elif style == "form": - _populate_delimited_query_params( - metadata, f_name, value, ",", query_param_values - ) - elif style == "pipeDelimited": - _populate_delimited_query_params( - metadata, f_name, value, "|", query_param_values - ) - else: - raise Exception("not yet implemented") - - return globals_already_populated - - -def get_headers(headers_params: Any, gbls: Optional[Any] = None) -> Dict[str, str]: - headers: Dict[str, str] = {} - - globals_already_populated = [] - if headers_params is not None: - globals_already_populated = _populate_headers(headers_params, gbls, headers, []) - if gbls is not None: - _populate_headers(gbls, None, headers, globals_already_populated) - - return headers - - -def _populate_headers( - headers_params: Any, - gbls: Any, - header_values: Dict[str, str], - skip_fields: List[str], -) -> List[str]: - globals_already_populated: List[str] = [] - - param_fields: Tuple[Field, ...] = fields(headers_params) - for field in param_fields: - if field.name in skip_fields: - continue - - metadata = field.metadata.get("header") - if not metadata: - continue - - value, global_found = _populate_from_globals( - field.name, getattr(headers_params, field.name), "header", gbls - ) - if global_found: - globals_already_populated.append(field.name) - value = _serialize_header(metadata.get("explode", False), value) - - if value != "": - header_values[metadata.get("field_name", field.name)] = value - - return globals_already_populated - - -def _get_serialized_params( - metadata: Dict, field_type: type, field_name: str, obj: Any -) -> Dict[str, str]: - params: Dict[str, str] = {} - - serialization = metadata.get("serialization", "") - if serialization == "json": - params[metadata.get("field_name", field_name)] = marshal_json(obj, field_type) - - return params - - -def _populate_deep_object_query_params( - metadata: Dict, field_name: str, obj: Any, params: Dict[str, List[str]] -): - if obj is None: - return - - if is_dataclass(obj): - obj_fields: Tuple[Field, ...] = fields(obj) - for obj_field in obj_fields: - obj_param_metadata = obj_field.metadata.get("query_param") - if not obj_param_metadata: - continue - - obj_val = getattr(obj, obj_field.name) - if obj_val is None: - continue - - if isinstance(obj_val, List): - for val in obj_val: - if val is None: - continue - - if ( - params.get( - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]' - ) - is None - ): - params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]' - ] = [] - - params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]' - ].append(_val_to_string(val)) - else: - params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]' - ] = [_val_to_string(obj_val)] - elif isinstance(obj, Dict): - for key, value in obj.items(): - if value is None: - continue - - if isinstance(value, List): - for val in value: - if val is None: - continue - - if ( - params.get(f'{metadata.get("field_name", field_name)}[{key}]') - is None - ): - params[f'{metadata.get("field_name", field_name)}[{key}]'] = [] - - params[f'{metadata.get("field_name", field_name)}[{key}]'].append( - _val_to_string(val) - ) - else: - params[f'{metadata.get("field_name", field_name)}[{key}]'] = [ - _val_to_string(value) - ] - - -def _get_query_param_field_name(obj_field: Field) -> str: - obj_param_metadata = obj_field.metadata.get("query_param") - - if not obj_param_metadata: - return "" - - return obj_param_metadata.get("field_name", obj_field.name) - - -def _populate_delimited_query_params( - metadata: Dict, - field_name: str, - obj: Any, - delimiter: str, - query_param_values: Dict[str, List[str]], -): - _populate_form( - field_name, - metadata.get("explode", True), - obj, - _get_query_param_field_name, - delimiter, - query_param_values, - ) - - -SERIALIZATION_METHOD_TO_CONTENT_TYPE = { - "json": "application/json", - "form": "application/x-www-form-urlencoded", - "multipart": "multipart/form-data", - "raw": "application/octet-stream", - "string": "text/plain", -} - - -def serialize_request_body( - request: Any, - request_type: type, - request_field_name: str, - nullable: bool, - optional: bool, - serialization_method: str, - encoder=None, -) -> Tuple[Optional[str], Optional[Any], Optional[Any]]: - if request is None: - if not nullable and optional: - return None, None, None - - if not is_dataclass(request) or not hasattr(request, request_field_name): - return serialize_content_type( - request_field_name, - request_type, - SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], - request, - encoder, - ) - - request_val = getattr(request, request_field_name) - - if request_val is None: - if not nullable and optional: - return None, None, None - - request_fields: Tuple[Field, ...] = fields(request) - request_metadata = None - - for field in request_fields: - if field.name == request_field_name: - request_metadata = field.metadata.get("request") - break - - if request_metadata is None: - raise Exception("invalid request type") - - return serialize_content_type( - request_field_name, - request_type, - request_metadata.get("media_type", "application/octet-stream"), - request_val, - ) - - -def serialize_content_type( - field_name: str, request_type: Any, media_type: str, request: Any, encoder=None -) -> Tuple[Optional[str], Optional[Any], Optional[List[List[Any]]]]: - if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None: - return media_type, marshal_json(request, request_type, encoder), None - if re.match(r"multipart\/.*", media_type) is not None: - return serialize_multipart_form(media_type, request) - if re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None: - return media_type, serialize_form_data(field_name, request), None - if isinstance(request, (bytes, bytearray)): - return media_type, request, None - if isinstance(request, str): - return media_type, request, None - - raise Exception( - f"invalid request body type {type(request)} for mediaType {media_type}" - ) - - -def serialize_multipart_form( - media_type: str, request: Any -) -> Tuple[str, Any, List[List[Any]]]: - form: List[List[Any]] = [] - request_fields = fields(request) - - for field in request_fields: - val = getattr(request, field.name) - if val is None: - continue - - field_metadata = field.metadata.get("multipart_form") - if not field_metadata: - continue - - if field_metadata.get("file") is True: - file_fields = fields(val) - - file_name = "" - field_name = "" - content = bytes() - - for file_field in file_fields: - file_metadata = file_field.metadata.get("multipart_form") - if file_metadata is None: - continue - - if file_metadata.get("content") is True: - content = getattr(val, file_field.name) - else: - field_name = file_metadata.get("field_name", file_field.name) - file_name = getattr(val, file_field.name) - if field_name == "" or file_name == "" or content == bytes(): - raise Exception("invalid multipart/form-data file") - - form.append([field_name, [file_name, content]]) - elif field_metadata.get("json") is True: - to_append = [ - field_metadata.get("field_name", field.name), - [None, marshal_json(val, field.type), "application/json"], - ] - form.append(to_append) - else: - field_name = field_metadata.get("field_name", field.name) - if isinstance(val, List): - for value in val: - if value is None: - continue - form.append([field_name + "[]", [None, _val_to_string(value)]]) - else: - form.append([field_name, [None, _val_to_string(val)]]) - return media_type, None, form - - -def serialize_dict( - original: Dict, explode: bool, field_name, existing: Optional[Dict[str, List[str]]] -) -> Dict[str, List[str]]: - if existing is None: - existing = {} - - if explode is True: - for key, val in original.items(): - if key not in existing: - existing[key] = [] - existing[key].append(val) - else: - temp = [] - for key, val in original.items(): - temp.append(str(key)) - temp.append(str(val)) - if field_name not in existing: - existing[field_name] = [] - existing[field_name].append(",".join(temp)) - return existing - - -def serialize_form_data(field_name: str, data: Any) -> Dict[str, Any]: - form: Dict[str, List[str]] = {} - - if is_dataclass(data): - for field in fields(data): - val = getattr(data, field.name) - if val is None: - continue - - metadata = field.metadata.get("form") - if metadata is None: - continue - - field_name = metadata.get("field_name", field.name) - - if metadata.get("json"): - form[field_name] = [marshal_json(val, field.type)] - else: - if metadata.get("style", "form") == "form": - _populate_form( - field_name, - metadata.get("explode", True), - val, - _get_form_field_name, - ",", - form, - ) - else: - raise Exception(f"Invalid form style for field {field.name}") - elif isinstance(data, Dict): - for key, value in data.items(): - form[key] = [_val_to_string(value)] - else: - raise Exception(f"Invalid request body type for field {field_name}") - - return form - - -def _get_form_field_name(obj_field: Field) -> str: - obj_param_metadata = obj_field.metadata.get("form") - - if not obj_param_metadata: - return "" - - return obj_param_metadata.get("field_name", obj_field.name) - - -def _populate_form( - field_name: str, - explode: boolean, - obj: Any, - get_field_name_func: Callable, - delimiter: str, - form: Dict[str, List[str]], -): - if obj is None: - return form - - if is_dataclass(obj): - items = [] - - obj_fields: Tuple[Field, ...] = fields(obj) - for obj_field in obj_fields: - obj_field_name = get_field_name_func(obj_field) - if obj_field_name == "": - continue - - val = getattr(obj, obj_field.name) - if val is None: - continue - - if explode: - form[obj_field_name] = [_val_to_string(val)] - else: - items.append(f"{obj_field_name}{delimiter}{_val_to_string(val)}") - - if len(items) > 0: - form[field_name] = [delimiter.join(items)] - elif isinstance(obj, Dict): - items = [] - for key, value in obj.items(): - if value is None: - continue - - if explode: - form[key] = [_val_to_string(value)] - else: - items.append(f"{key}{delimiter}{_val_to_string(value)}") - - if len(items) > 0: - form[field_name] = [delimiter.join(items)] - elif isinstance(obj, List): - items = [] - - for value in obj: - if value is None: - continue - - if explode: - if not field_name in form: - form[field_name] = [] - form[field_name].append(_val_to_string(value)) - else: - items.append(_val_to_string(value)) - - if len(items) > 0: - form[field_name] = [delimiter.join([str(item) for item in items])] - else: - form[field_name] = [_val_to_string(obj)] - - return form - - -def _serialize_header(explode: bool, obj: Any) -> str: - if obj is None: - return "" - - if is_dataclass(obj): - items = [] - obj_fields: Tuple[Field, ...] = fields(obj) - for obj_field in obj_fields: - obj_param_metadata = obj_field.metadata.get("header") - - if not obj_param_metadata: - continue - - obj_field_name = obj_param_metadata.get("field_name", obj_field.name) - if obj_field_name == "": - continue - - val = getattr(obj, obj_field.name) - if val is None: - continue - - if explode: - items.append(f"{obj_field_name}={_val_to_string(val)}") - else: - items.append(obj_field_name) - items.append(_val_to_string(val)) - - if len(items) > 0: - return ",".join(items) - elif isinstance(obj, Dict): - items = [] - - for key, value in obj.items(): - if value is None: - continue - - if explode: - items.append(f"{key}={_val_to_string(value)}") - else: - items.append(key) - items.append(_val_to_string(value)) - - if len(items) > 0: - return ",".join([str(item) for item in items]) - elif isinstance(obj, List): - items = [] - - for value in obj: - if value is None: - continue - - items.append(_val_to_string(value)) - - if len(items) > 0: - return ",".join(items) - else: - return f"{_val_to_string(obj)}" - - return "" - - -def unmarshal_json(data, typ, decoder=None, infer_missing=False): - unmarshal = make_dataclass("Unmarshal", [("res", typ)], bases=(DataClassJsonMixin,)) - json_dict = json.loads(data) - try: - out = unmarshal.from_dict({"res": json_dict}, infer_missing=infer_missing) - except AttributeError as attr_err: - raise AttributeError( - f"unable to unmarshal {data} as {typ} - {attr_err}" - ) from attr_err - - return out.res if decoder is None else decoder(out.res) - - -def marshal_json(val, typ, encoder=None): - if not is_optional_type(typ) and val is None: - raise ValueError(f"Could not marshal None into non-optional type: {typ}") - - marshal = make_dataclass("Marshal", [("res", typ)], bases=(DataClassJsonMixin,)) - marshaller = marshal(res=val) - json_dict = marshaller.to_dict() - val = json_dict["res"] if encoder is None else encoder(json_dict["res"]) - - return json.dumps(val, separators=(",", ":"), sort_keys=True) - - -def match_content_type(content_type: str, pattern: str) -> boolean: - if pattern in (content_type, "*", "*/*"): - return True - - msg = Message() - msg["content-type"] = content_type - media_type = msg.get_content_type() - - if media_type == pattern: - return True - - parts = media_type.split("/") - if len(parts) == 2: - if pattern in (f"{parts[0]}/*", f"*/{parts[1]}"): - return True - - return False - - -def match_status_codes(status_codes: List[str], status_code: int) -> bool: - for code in status_codes: - if code == str(status_code): - return True - - if code.endswith("XX") and code.startswith(str(status_code)[:1]): - return True - return False - - -def datetimeisoformat(optional: bool): - def isoformatoptional(val): - if optional and val is None: - return None - return _val_to_string(val) - - return isoformatoptional - - -def dateisoformat(optional: bool): - def isoformatoptional(val): - if optional and val is None: - return None - return date.isoformat(val) - - return isoformatoptional - - -def datefromisoformat(date_str: str): - return dateutil.parser.parse(date_str).date() - - -def bigintencoder(optional: bool): - def bigintencode(val: int): - if optional and val is None: - return None - return str(val) - - return bigintencode - - -def bigintdecoder(val): - if isinstance(val, float): - raise ValueError(f"{val} is a float") - return int(val) - -def integerstrencoder(optional: bool): - def integerstrencode(val: int): - if optional and val is None: - return None - return str(val) - - return integerstrencode - - -def integerstrdecoder(val): - if isinstance(val, float): - raise ValueError(f"{val} is a float") - return int(val) - - -def numberstrencoder(optional: bool): - def numberstrencode(val: float): - if optional and val is None: - return None - return str(val) - - return numberstrencode - - -def numberstrdecoder(val): - return float(val) - - -def decimalencoder(optional: bool, as_str: bool): - def decimalencode(val: Decimal): - if optional and val is None: - return None - - if as_str: - return str(val) - - return float(val) - - return decimalencode - - -def decimaldecoder(val): - return Decimal(str(val)) - - -def map_encoder(optional: bool, value_encoder: Callable): - def map_encode(val: Dict): - if optional and val is None: - return None - - encoded = {} - for key, value in val.items(): - encoded[key] = value_encoder(value) - - return encoded - - return map_encode - - -def map_decoder(value_decoder: Callable): - def map_decode(val: Dict): - decoded = {} - for key, value in val.items(): - decoded[key] = value_decoder(value) - - return decoded - - return map_decode - - -def list_encoder(optional: bool, value_encoder: Callable): - def list_encode(val: List): - if optional and val is None: - return None - - encoded = [] - for value in val: - encoded.append(value_encoder(value)) - - return encoded - - return list_encode - - -def list_decoder(value_decoder: Callable): - def list_decode(val: List): - decoded = [] - for value in val: - decoded.append(value_decoder(value)) - - return decoded - - return list_decode - - -def union_encoder(all_encoders: Dict[str, Callable]): - def selective_encoder(val: Any): - if type(val) in all_encoders: - return all_encoders[type(val)](val) - return val - - return selective_encoder - - -def union_decoder(all_decoders: List[Callable]): - def selective_decoder(val: Any): - decoded = val - for decoder in all_decoders: - try: - decoded = decoder(val) - break - except (TypeError, ValueError): - continue - return decoded - - return selective_decoder - - -def get_field_name(name): - def override(_, _field_name=name): - return _field_name - - return override - - -def _val_to_string(val) -> str: - if isinstance(val, bool): - return str(val).lower() - if isinstance(val, datetime): - return str(val.isoformat().replace("+00:00", "Z")) - if isinstance(val, Enum): - return str(val.value) - - return str(val) - - -def _populate_from_globals( - param_name: str, value: Any, param_type: str, gbls: Any -) -> Tuple[Any, bool]: - if gbls is None: - return value, False - - global_fields = fields(gbls) - - found = False - for field in global_fields: - if field.name is not param_name: - continue - - found = True - - if value is not None: - return value, True - - global_value = getattr(gbls, field.name) - - param_metadata = field.metadata.get(param_type) - if param_metadata is None: - return value, True - - return global_value, True - - return value, found - - -def decoder_with_discriminator(field_name): - def decode_fx(obj): - kls = getattr(sys.modules["sdk.models.components"], obj[field_name]) - return unmarshal_json(json.dumps(obj), kls) - - return decode_fx - - -def remove_suffix(input_string, suffix): - if suffix and input_string.endswith(suffix): - return input_string[: -len(suffix)] - return input_string diff --git a/src/plex_api/video.py b/src/plex_api/video.py deleted file mode 100644 index e9ec069..0000000 --- a/src/plex_api/video.py +++ /dev/null @@ -1,139 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations - -class Video: - r"""API Calls that perform operations with Plex Media Server Videos""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_timeline(self, request: operations.GetTimelineRequest) -> operations.GetTimelineResponse: - r"""Get the timeline for a media item - Get the timeline for a media item - """ - hook_ctx = HookContext(operation_id='getTimeline', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/:/timeline' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetTimelineResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetTimelineResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - - def start_universal_transcode(self, request: operations.StartUniversalTranscodeRequest) -> operations.StartUniversalTranscodeResponse: - r"""Start Universal Transcode - Begin a Universal Transcode Session - """ - hook_ctx = HookContext(operation_id='startUniversalTranscode', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(*self.sdk_configuration.get_server_details()) - - url = base_url + '/video/:/transcode/universal/start.mpd' - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.StartUniversalTranscodeResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - pass - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.StartUniversalTranscodeResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api/watchlist.py b/src/plex_api/watchlist.py deleted file mode 100644 index 06a6e8a..0000000 --- a/src/plex_api/watchlist.py +++ /dev/null @@ -1,88 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from .sdkconfiguration import SDKConfiguration -from plex_api import utils -from plex_api._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from plex_api.models import errors, operations -from typing import Optional - -class Watchlist: - r"""API Calls that perform operations with Plex Media Server Watchlists""" - sdk_configuration: SDKConfiguration - - def __init__(self, sdk_config: SDKConfiguration) -> None: - self.sdk_configuration = sdk_config - - - - def get_watchlist(self, request: operations.GetWatchlistRequest, server_url: Optional[str] = None) -> operations.GetWatchlistResponse: - r"""Get User Watchlist - Get User Watchlist - """ - hook_ctx = HookContext(operation_id='getWatchlist', oauth2_scopes=[], security_source=self.sdk_configuration.security) - base_url = utils.template_url(operations.GET_WATCHLIST_SERVERS[0], { - }) - if server_url is not None: - base_url = server_url - - url = utils.generate_url(base_url, '/library/sections/watchlist/{filter}', request) - - if callable(self.sdk_configuration.security): - headers, query_params = utils.get_security(self.sdk_configuration.security()) - else: - headers, query_params = utils.get_security(self.sdk_configuration.security) - - query_params = { **utils.get_query_params(request), **query_params } - headers['Accept'] = 'application/json' - headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.client - - try: - req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers)) - req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req) - http_res = client.send(req) - except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e) - if e is not None: - raise e - - if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code): - result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None) - if e is not None: - raise e - if result is not None: - http_res = result - else: - http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res) - - - - res = operations.GetWatchlistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res) - - if http_res.status_code == 200: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetWatchlistResponseBody]) - res.object = out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: - raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) - elif http_res.status_code == 401: - # pylint: disable=no-else-return - if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, errors.GetWatchlistResponseBody) - out.raw_response = http_res - raise out - else: - content_type = http_res.headers.get('Content-Type') - raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - else: - raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res) - - return res - - - diff --git a/src/plex_api_client/__init__.py b/src/plex_api_client/__init__.py new file mode 100644 index 0000000..d8d60c4 --- /dev/null +++ b/src/plex_api_client/__init__.py @@ -0,0 +1,4 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .sdk import * +from .sdkconfiguration import * diff --git a/src/plex_api_client/_hooks/__init__.py b/src/plex_api_client/_hooks/__init__.py new file mode 100644 index 0000000..2ee66cd --- /dev/null +++ b/src/plex_api_client/_hooks/__init__.py @@ -0,0 +1,5 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .sdkhooks import * +from .types import * +from .registration import * diff --git a/src/plex_api_client/_hooks/registration.py b/src/plex_api_client/_hooks/registration.py new file mode 100644 index 0000000..cab4778 --- /dev/null +++ b/src/plex_api_client/_hooks/registration.py @@ -0,0 +1,13 @@ +from .types import Hooks + + +# This file is only ever generated once on the first generation and then is free to be modified. +# Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them +# in this file or in separate files in the hooks folder. + + +def init_hooks(hooks: Hooks): + # pylint: disable=unused-argument + """Add hooks by calling hooks.register{sdk_init/before_request/after_success/after_error}Hook + with an instance of a hook that implements that specific Hook interface + Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance""" diff --git a/src/plex_api/_hooks/sdkhooks.py b/src/plex_api_client/_hooks/sdkhooks.py similarity index 65% rename from src/plex_api/_hooks/sdkhooks.py rename to src/plex_api_client/_hooks/sdkhooks.py index 17750b6..163dfea 100644 --- a/src/plex_api/_hooks/sdkhooks.py +++ b/src/plex_api_client/_hooks/sdkhooks.py @@ -1,13 +1,23 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -import requests -from .types import SDKInitHook, BeforeRequestContext, BeforeRequestHook, AfterSuccessContext, AfterSuccessHook, AfterErrorContext, AfterErrorHook, Hooks +import httpx +from .types import ( + SDKInitHook, + BeforeRequestContext, + BeforeRequestHook, + AfterSuccessContext, + AfterSuccessHook, + AfterErrorContext, + AfterErrorHook, + Hooks, +) from .registration import init_hooks from typing import List, Optional, Tuple +from plex_api_client.httpclient import HttpClient class SDKHooks(Hooks): - def __init__(self): + def __init__(self) -> None: self.sdk_init_hooks: List[SDKInitHook] = [] self.before_request_hooks: List[BeforeRequestHook] = [] self.after_success_hooks: List[AfterSuccessHook] = [] @@ -26,12 +36,14 @@ class SDKHooks(Hooks): def register_after_error_hook(self, hook: AfterErrorHook) -> None: self.after_error_hooks.append(hook) - def sdk_init(self, base_url: str, client: requests.Session) -> Tuple[str, requests.Session]: + def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]: for hook in self.sdk_init_hooks: base_url, client = hook.sdk_init(base_url, client) return base_url, client - def before_request(self, hook_ctx: BeforeRequestContext, request: requests.PreparedRequest) -> requests.PreparedRequest: + def before_request( + self, hook_ctx: BeforeRequestContext, request: httpx.Request + ) -> httpx.Request: for hook in self.before_request_hooks: out = hook.before_request(hook_ctx, request) if isinstance(out, Exception): @@ -40,7 +52,9 @@ class SDKHooks(Hooks): return request - def after_success(self, hook_ctx: AfterSuccessContext, response: requests.Response) -> requests.Response: + def after_success( + self, hook_ctx: AfterSuccessContext, response: httpx.Response + ) -> httpx.Response: for hook in self.after_success_hooks: out = hook.after_success(hook_ctx, response) if isinstance(out, Exception): @@ -48,7 +62,12 @@ class SDKHooks(Hooks): response = out return response - def after_error(self, hook_ctx: AfterErrorContext, response: Optional[requests.Response], error: Optional[Exception]) -> Tuple[Optional[requests.Response], Optional[Exception]]: + def after_error( + self, + hook_ctx: AfterErrorContext, + response: Optional[httpx.Response], + error: Optional[Exception], + ) -> Tuple[Optional[httpx.Response], Optional[Exception]]: for hook in self.after_error_hooks: result = hook.after_error(hook_ctx, response, error) if isinstance(result, Exception): diff --git a/src/plex_api/_hooks/types.py b/src/plex_api_client/_hooks/types.py similarity index 51% rename from src/plex_api/_hooks/types.py rename to src/plex_api_client/_hooks/types.py index b24c141..0619be4 100644 --- a/src/plex_api/_hooks/types.py +++ b/src/plex_api_client/_hooks/types.py @@ -1,7 +1,8 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -import requests as requests_http from abc import ABC, abstractmethod +import httpx +from plex_api_client.httpclient import HttpClient from typing import Any, Callable, List, Optional, Tuple, Union @@ -10,7 +11,12 @@ class HookContext: oauth2_scopes: Optional[List[str]] = None security_source: Optional[Union[Any, Callable[[], Any]]] = None - def __init__(self, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]]): + def __init__( + self, + operation_id: str, + oauth2_scopes: Optional[List[str]], + security_source: Optional[Union[Any, Callable[[], Any]]], + ): self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes self.security_source = security_source @@ -18,41 +24,55 @@ class HookContext: class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): - super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source) + super().__init__( + hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + ) class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): - super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source) - + super().__init__( + hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + ) class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): - super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source) + super().__init__( + hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + ) class SDKInitHook(ABC): @abstractmethod - def sdk_init(self, base_url: str, client: requests_http.Session) -> Tuple[str, requests_http.Session]: + def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]: pass class BeforeRequestHook(ABC): @abstractmethod - def before_request(self, hook_ctx: BeforeRequestContext, request: requests_http.PreparedRequest) -> Union[requests_http.PreparedRequest, Exception]: + def before_request( + self, hook_ctx: BeforeRequestContext, request: httpx.Request + ) -> Union[httpx.Request, Exception]: pass class AfterSuccessHook(ABC): @abstractmethod - def after_success(self, hook_ctx: AfterSuccessContext, response: requests_http.Response) -> Union[requests_http.Response, Exception]: + def after_success( + self, hook_ctx: AfterSuccessContext, response: httpx.Response + ) -> Union[httpx.Response, Exception]: pass class AfterErrorHook(ABC): @abstractmethod - def after_error(self, hook_ctx: AfterErrorContext, response: Optional[requests_http.Response], error: Optional[Exception]) -> Union[Tuple[Optional[requests_http.Response], Optional[Exception]], Exception]: + def after_error( + self, + hook_ctx: AfterErrorContext, + response: Optional[httpx.Response], + error: Optional[Exception], + ) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]: pass diff --git a/src/plex_api_client/activities.py b/src/plex_api_client/activities.py new file mode 100644 index 0000000..850352f --- /dev/null +++ b/src/plex_api_client/activities.py @@ -0,0 +1,392 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Activities(BaseSDK): + r"""Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: + - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. + - They must contain an `type` which is used by clients to distinguish the specific activity. + - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) + - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + + """ + + def get_server_activities( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerActivitiesResponse: + r"""Get Server Activities + + Get Server Activities + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/activities", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getServerActivities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerActivitiesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerActivitiesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerActivitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerActivitiesActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerActivitiesActivitiesResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_activities_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerActivitiesResponse: + r"""Get Server Activities + + Get Server Activities + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/activities", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getServerActivities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerActivitiesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerActivitiesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerActivitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerActivitiesActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerActivitiesActivitiesResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def cancel_server_activities( + self, + *, + activity_uuid: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CancelServerActivitiesResponse: + r"""Cancel Server Activities + + Cancel Server Activities + + :param activity_uuid: The UUID of the activity to cancel. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.CancelServerActivitiesRequest( + activity_uuid=activity_uuid, + ) + + req = self.build_request( + method="DELETE", + path="/activities/{activityUUID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="cancelServerActivities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.CancelServerActivitiesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CancelServerActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.CancelServerActivitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CancelServerActivitiesActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.CancelServerActivitiesActivitiesResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def cancel_server_activities_async( + self, + *, + activity_uuid: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CancelServerActivitiesResponse: + r"""Cancel Server Activities + + Cancel Server Activities + + :param activity_uuid: The UUID of the activity to cancel. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.CancelServerActivitiesRequest( + activity_uuid=activity_uuid, + ) + + req = self.build_request_async( + method="DELETE", + path="/activities/{activityUUID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="cancelServerActivities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.CancelServerActivitiesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CancelServerActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.CancelServerActivitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CancelServerActivitiesActivitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.CancelServerActivitiesActivitiesResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/authentication.py b/src/plex_api_client/authentication.py new file mode 100644 index 0000000..3d96dc1 --- /dev/null +++ b/src/plex_api_client/authentication.py @@ -0,0 +1,850 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional, Union + + +class Authentication(BaseSDK): + r"""API Calls regarding authentication for Plex Media Server""" + + def get_transient_token( + self, + *, + type_: operations.GetTransientTokenQueryParamType, + scope: operations.Scope, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTransientTokenResponse: + r"""Get a Transient Token. + + This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + + + :param type: `delegation` - This is the only supported `type` parameter. + :param scope: `all` - This is the only supported `scope` parameter. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetTransientTokenRequest( + type=type_, + scope=scope, + ) + + req = self.build_request( + method="GET", + path="/security/token", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getTransientToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetTransientTokenResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTransientTokenResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTransientTokenResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTransientTokenAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTransientTokenAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_transient_token_async( + self, + *, + type_: operations.GetTransientTokenQueryParamType, + scope: operations.Scope, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTransientTokenResponse: + r"""Get a Transient Token. + + This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + + + :param type: `delegation` - This is the only supported `type` parameter. + :param scope: `all` - This is the only supported `scope` parameter. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetTransientTokenRequest( + type=type_, + scope=scope, + ) + + req = self.build_request_async( + method="GET", + path="/security/token", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getTransientToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetTransientTokenResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTransientTokenResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTransientTokenResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTransientTokenAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTransientTokenAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_source_connection_information( + self, + *, + source: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSourceConnectionInformationResponse: + r"""Get Source Connection Information + + If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + Note: requires Plex Media Server >= 1.15.4. + + + :param source: The source identifier with an included prefix. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSourceConnectionInformationRequest( + source=source, + ) + + req = self.build_request( + method="GET", + path="/security/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getSourceConnectionInformation", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetSourceConnectionInformationResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSourceConnectionInformationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSourceConnectionInformationResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, + errors.GetSourceConnectionInformationAuthenticationResponseBodyData, + ) + data.raw_response = http_res + raise errors.GetSourceConnectionInformationAuthenticationResponseBody( + data=data + ) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_source_connection_information_async( + self, + *, + source: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSourceConnectionInformationResponse: + r"""Get Source Connection Information + + If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + Note: requires Plex Media Server >= 1.15.4. + + + :param source: The source identifier with an included prefix. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSourceConnectionInformationRequest( + source=source, + ) + + req = self.build_request_async( + method="GET", + path="/security/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getSourceConnectionInformation", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetSourceConnectionInformationResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSourceConnectionInformationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSourceConnectionInformationResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, + errors.GetSourceConnectionInformationAuthenticationResponseBodyData, + ) + data.raw_response = http_res + raise errors.GetSourceConnectionInformationAuthenticationResponseBody( + data=data + ) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_user_details( + self, + *, + x_plex_token: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUserDetailsResponse: + r"""Get User Data By Token + + Get the User data from the provided X-Plex-Token + + :param x_plex_token: Plex Authentication Token + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_USER_DETAILS_SERVERS[0] + + request = operations.GetUserDetailsRequest( + x_plex_token=x_plex_token, + ) + + req = self.build_request( + method="GET", + path="/user", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getUserDetails", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUserDetailsResponse( + user_plex_account=utils.unmarshal_json( + http_res.text, Optional[operations.GetUserDetailsUserPlexAccount] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserDetailsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserDetailsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserDetailsAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserDetailsAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_user_details_async( + self, + *, + x_plex_token: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUserDetailsResponse: + r"""Get User Data By Token + + Get the User data from the provided X-Plex-Token + + :param x_plex_token: Plex Authentication Token + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_USER_DETAILS_SERVERS[0] + + request = operations.GetUserDetailsRequest( + x_plex_token=x_plex_token, + ) + + req = self.build_request_async( + method="GET", + path="/user", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getUserDetails", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUserDetailsResponse( + user_plex_account=utils.unmarshal_json( + http_res.text, Optional[operations.GetUserDetailsUserPlexAccount] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserDetailsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserDetailsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserDetailsAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserDetailsAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def post_users_sign_in_data( + self, + *, + x_plex_client_identifier: Optional[str] = None, + request_body: Optional[ + Union[ + operations.PostUsersSignInDataRequestBody, + operations.PostUsersSignInDataRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PostUsersSignInDataResponse: + r"""Get User Sign In Data + + Sign in user with username and password and return user data with Plex authentication token + + :param x_plex_client_identifier: 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 request_body: Login credentials + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.POST_USERS_SIGN_IN_DATA_SERVERS[0] + + request = operations.PostUsersSignInDataRequest( + x_plex_client_identifier=x_plex_client_identifier, + request_body=utils.get_pydantic_model( + request_body, Optional[operations.PostUsersSignInDataRequestBody] + ), + ) + + req = self.build_request( + method="POST", + path="/users/signin", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.PostUsersSignInDataGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "form", + Optional[operations.PostUsersSignInDataRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="post-users-sign-in-data", + oauth2_scopes=[], + security_source=None, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return operations.PostUsersSignInDataResponse( + user_plex_account=utils.unmarshal_json( + http_res.text, + Optional[operations.PostUsersSignInDataUserPlexAccount], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PostUsersSignInDataResponseBodyData + ) + data.raw_response = http_res + raise errors.PostUsersSignInDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PostUsersSignInDataAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.PostUsersSignInDataAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def post_users_sign_in_data_async( + self, + *, + x_plex_client_identifier: Optional[str] = None, + request_body: Optional[ + Union[ + operations.PostUsersSignInDataRequestBody, + operations.PostUsersSignInDataRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PostUsersSignInDataResponse: + r"""Get User Sign In Data + + Sign in user with username and password and return user data with Plex authentication token + + :param x_plex_client_identifier: 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 request_body: Login credentials + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.POST_USERS_SIGN_IN_DATA_SERVERS[0] + + request = operations.PostUsersSignInDataRequest( + x_plex_client_identifier=x_plex_client_identifier, + request_body=utils.get_pydantic_model( + request_body, Optional[operations.PostUsersSignInDataRequestBody] + ), + ) + + req = self.build_request_async( + method="POST", + path="/users/signin", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.PostUsersSignInDataGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "form", + Optional[operations.PostUsersSignInDataRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="post-users-sign-in-data", + oauth2_scopes=[], + security_source=None, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return operations.PostUsersSignInDataResponse( + user_plex_account=utils.unmarshal_json( + http_res.text, + Optional[operations.PostUsersSignInDataUserPlexAccount], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PostUsersSignInDataResponseBodyData + ) + data.raw_response = http_res + raise errors.PostUsersSignInDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PostUsersSignInDataAuthenticationResponseBodyData + ) + data.raw_response = http_res + raise errors.PostUsersSignInDataAuthenticationResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/basesdk.py b/src/plex_api_client/basesdk.py new file mode 100644 index 0000000..b6c42a1 --- /dev/null +++ b/src/plex_api_client/basesdk.py @@ -0,0 +1,339 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .sdkconfiguration import SDKConfiguration +import httpx +from plex_api_client import utils +from plex_api_client._hooks import ( + AfterErrorContext, + AfterSuccessContext, + BeforeRequestContext, +) +from plex_api_client.models import errors +from plex_api_client.utils import RetryConfig, SerializedRequestBody, get_body_content +from typing import Callable, List, Optional, Tuple + + +class BaseSDK: + sdk_configuration: SDKConfiguration + + def __init__(self, sdk_config: SDKConfiguration) -> None: + self.sdk_configuration = sdk_config + + def get_url(self, base_url, url_variables): + sdk_url, sdk_variables = self.sdk_configuration.get_server_details() + + if base_url is None: + base_url = sdk_url + + if url_variables is None: + url_variables = sdk_variables + + return utils.template_url(base_url, url_variables) + + def build_request_async( + self, + method, + path, + base_url, + url_variables, + request, + request_body_required, + request_has_path_params, + request_has_query_params, + user_agent_header, + accept_header_value, + _globals=None, + security=None, + timeout_ms: Optional[int] = None, + get_serialized_body: Optional[ + Callable[[], Optional[SerializedRequestBody]] + ] = None, + url_override: Optional[str] = None, + ) -> httpx.Request: + client = self.sdk_configuration.async_client + return self.build_request_with_client( + client, + method, + path, + base_url, + url_variables, + request, + request_body_required, + request_has_path_params, + request_has_query_params, + user_agent_header, + accept_header_value, + _globals, + security, + timeout_ms, + get_serialized_body, + url_override, + ) + + def build_request( + self, + method, + path, + base_url, + url_variables, + request, + request_body_required, + request_has_path_params, + request_has_query_params, + user_agent_header, + accept_header_value, + _globals=None, + security=None, + timeout_ms: Optional[int] = None, + get_serialized_body: Optional[ + Callable[[], Optional[SerializedRequestBody]] + ] = None, + url_override: Optional[str] = None, + ) -> httpx.Request: + client = self.sdk_configuration.client + return self.build_request_with_client( + client, + method, + path, + base_url, + url_variables, + request, + request_body_required, + request_has_path_params, + request_has_query_params, + user_agent_header, + accept_header_value, + _globals, + security, + timeout_ms, + get_serialized_body, + url_override, + ) + + def build_request_with_client( + self, + client, + method, + path, + base_url, + url_variables, + request, + request_body_required, + request_has_path_params, + request_has_query_params, + user_agent_header, + accept_header_value, + _globals=None, + security=None, + timeout_ms: Optional[int] = None, + get_serialized_body: Optional[ + Callable[[], Optional[SerializedRequestBody]] + ] = None, + url_override: Optional[str] = None, + ) -> httpx.Request: + query_params = {} + + url = url_override + if url is None: + url = utils.generate_url( + self.get_url(base_url, url_variables), + path, + request if request_has_path_params else None, + _globals if request_has_path_params else None, + ) + + query_params = utils.get_query_params( + request if request_has_query_params else None, + _globals if request_has_query_params else None, + ) + + headers = utils.get_headers(request, _globals) + headers["Accept"] = accept_header_value + headers[user_agent_header] = self.sdk_configuration.user_agent + + if security is not None: + if callable(security): + security = security() + + if security is not None: + security_headers, security_query_params = utils.get_security(security) + headers = {**headers, **security_headers} + query_params = {**query_params, **security_query_params} + + serialized_request_body = SerializedRequestBody("application/octet-stream") + if get_serialized_body is not None: + rb = get_serialized_body() + if request_body_required and rb is None: + raise ValueError("request body is required") + + if rb is not None: + serialized_request_body = rb + + if ( + serialized_request_body.media_type is not None + and serialized_request_body.media_type + not in ( + "multipart/form-data", + "multipart/mixed", + ) + ): + headers["content-type"] = serialized_request_body.media_type + + timeout = timeout_ms / 1000 if timeout_ms is not None else None + + return client.build_request( + method, + url, + params=query_params, + content=serialized_request_body.content, + data=serialized_request_body.data, + files=serialized_request_body.files, + headers=headers, + timeout=timeout, + ) + + def do_request( + self, + hook_ctx, + request, + error_status_codes, + stream=False, + retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, + ) -> httpx.Response: + client = self.sdk_configuration.client + logger = self.sdk_configuration.debug_logger + + def do(): + http_res = None + try: + req = self.sdk_configuration.get_hooks().before_request( + BeforeRequestContext(hook_ctx), request + ) + logger.debug( + "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", + req.method, + req.url, + req.headers, + get_body_content(req), + ) + http_res = client.send(req, stream=stream) + except Exception as e: + _, e = self.sdk_configuration.get_hooks().after_error( + AfterErrorContext(hook_ctx), None, e + ) + if e is not None: + logger.debug("Request Exception", exc_info=True) + raise e + + if http_res is None: + logger.debug("Raising no response SDK error") + raise errors.SDKError("No response received") + + logger.debug( + "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", + http_res.status_code, + http_res.url, + http_res.headers, + "" if stream else http_res.text, + ) + + if utils.match_status_codes(error_status_codes, http_res.status_code): + result, err = self.sdk_configuration.get_hooks().after_error( + AfterErrorContext(hook_ctx), http_res, None + ) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred") + + return http_res + + if retry_config is not None: + http_res = utils.retry(do, utils.Retries(retry_config[0], retry_config[1])) + else: + http_res = do() + + if not utils.match_status_codes(error_status_codes, http_res.status_code): + http_res = self.sdk_configuration.get_hooks().after_success( + AfterSuccessContext(hook_ctx), http_res + ) + + return http_res + + async def do_request_async( + self, + hook_ctx, + request, + error_status_codes, + stream=False, + retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, + ) -> httpx.Response: + client = self.sdk_configuration.async_client + logger = self.sdk_configuration.debug_logger + + async def do(): + http_res = None + try: + req = self.sdk_configuration.get_hooks().before_request( + BeforeRequestContext(hook_ctx), request + ) + logger.debug( + "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", + req.method, + req.url, + req.headers, + get_body_content(req), + ) + http_res = await client.send(req, stream=stream) + except Exception as e: + _, e = self.sdk_configuration.get_hooks().after_error( + AfterErrorContext(hook_ctx), None, e + ) + if e is not None: + logger.debug("Request Exception", exc_info=True) + raise e + + if http_res is None: + logger.debug("Raising no response SDK error") + raise errors.SDKError("No response received") + + logger.debug( + "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", + http_res.status_code, + http_res.url, + http_res.headers, + "" if stream else http_res.text, + ) + + if utils.match_status_codes(error_status_codes, http_res.status_code): + result, err = self.sdk_configuration.get_hooks().after_error( + AfterErrorContext(hook_ctx), http_res, None + ) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred") + + return http_res + + if retry_config is not None: + http_res = await utils.retry_async( + do, utils.Retries(retry_config[0], retry_config[1]) + ) + else: + http_res = await do() + + if not utils.match_status_codes(error_status_codes, http_res.status_code): + http_res = self.sdk_configuration.get_hooks().after_success( + AfterSuccessContext(hook_ctx), http_res + ) + + return http_res diff --git a/src/plex_api_client/butler.py b/src/plex_api_client/butler.py new file mode 100644 index 0000000..ff08e60 --- /dev/null +++ b/src/plex_api_client/butler.py @@ -0,0 +1,942 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Butler(BaseSDK): + r"""Butler is the task manager of the Plex Media Server Ecosystem.""" + + def get_butler_tasks( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetButlerTasksResponse: + r"""Get Butler tasks + + Returns a list of butler tasks + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getButlerTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetButlerTasksResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetButlerTasksResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetButlerTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.GetButlerTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetButlerTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetButlerTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_butler_tasks_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetButlerTasksResponse: + r"""Get Butler tasks + + Returns a list of butler tasks + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getButlerTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetButlerTasksResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetButlerTasksResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetButlerTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.GetButlerTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetButlerTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetButlerTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def start_all_tasks( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartAllTasksResponse: + r"""Start all Butler tasks + + This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + 1. Any tasks not scheduled to run on the current day will be skipped. + 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + 4. If we are outside the configured window, the task will start immediately. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="POST", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="startAllTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StartAllTasksResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartAllTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.StartAllTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartAllTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StartAllTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def start_all_tasks_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartAllTasksResponse: + r"""Start all Butler tasks + + This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + 1. Any tasks not scheduled to run on the current day will be skipped. + 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + 4. If we are outside the configured window, the task will start immediately. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="POST", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="startAllTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StartAllTasksResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartAllTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.StartAllTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartAllTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StartAllTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def stop_all_tasks( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopAllTasksResponse: + r"""Stop all Butler tasks + + This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="DELETE", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="stopAllTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StopAllTasksResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopAllTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.StopAllTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopAllTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StopAllTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def stop_all_tasks_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopAllTasksResponse: + r"""Stop all Butler tasks + + This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="DELETE", + path="/butler", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="stopAllTasks", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StopAllTasksResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopAllTasksResponseBodyData + ) + data.raw_response = http_res + raise errors.StopAllTasksResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopAllTasksButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StopAllTasksButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def start_task( + self, + *, + task_name: operations.TaskName, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartTaskResponse: + r"""Start a single Butler task + + This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + 1. Any tasks not scheduled to run on the current day will be skipped. + 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + 4. If we are outside the configured window, the task will start immediately. + + + :param task_name: the name of the task to be started. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StartTaskRequest( + task_name=task_name, + ) + + req = self.build_request( + method="POST", + path="/butler/{taskName}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="startTask", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, ["200", "202"], "*"): + return operations.StartTaskResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.StartTaskResponseBodyData) + data.raw_response = http_res + raise errors.StartTaskResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartTaskButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StartTaskButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def start_task_async( + self, + *, + task_name: operations.TaskName, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartTaskResponse: + r"""Start a single Butler task + + This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + 1. Any tasks not scheduled to run on the current day will be skipped. + 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + 4. If we are outside the configured window, the task will start immediately. + + + :param task_name: the name of the task to be started. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StartTaskRequest( + task_name=task_name, + ) + + req = self.build_request_async( + method="POST", + path="/butler/{taskName}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="startTask", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, ["200", "202"], "*"): + return operations.StartTaskResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.StartTaskResponseBodyData) + data.raw_response = http_res + raise errors.StartTaskResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartTaskButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StartTaskButlerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def stop_task( + self, + *, + task_name: operations.PathParamTaskName, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopTaskResponse: + r"""Stop a single Butler task + + This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + + + :param task_name: The name of the task to be started. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StopTaskRequest( + task_name=task_name, + ) + + req = self.build_request( + method="DELETE", + path="/butler/{taskName}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="stopTask", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "404", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StopTaskResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.StopTaskResponseBodyData) + data.raw_response = http_res + raise errors.StopTaskResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTaskButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTaskButlerResponseBody(data=data) + if utils.match_response(http_res, ["404", "4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def stop_task_async( + self, + *, + task_name: operations.PathParamTaskName, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopTaskResponse: + r"""Stop a single Butler task + + This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + + + :param task_name: The name of the task to be started. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StopTaskRequest( + task_name=task_name, + ) + + req = self.build_request_async( + method="DELETE", + path="/butler/{taskName}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="stopTask", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "404", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StopTaskResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.StopTaskResponseBodyData) + data.raw_response = http_res + raise errors.StopTaskResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTaskButlerResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTaskButlerResponseBody(data=data) + if utils.match_response(http_res, ["404", "4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/httpclient.py b/src/plex_api_client/httpclient.py new file mode 100644 index 0000000..36b642a --- /dev/null +++ b/src/plex_api_client/httpclient.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +# pyright: reportReturnType = false +from typing_extensions import Protocol, runtime_checkable +import httpx +from typing import Any, Optional, Union + + +@runtime_checkable +class HttpClient(Protocol): + def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + pass + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + pass + + +@runtime_checkable +class AsyncHttpClient(Protocol): + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + pass + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + pass diff --git a/src/plex_api_client/hubs.py b/src/plex_api_client/hubs.py new file mode 100644 index 0000000..33bbf17 --- /dev/null +++ b/src/plex_api_client/hubs.py @@ -0,0 +1,424 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Hubs(BaseSDK): + r"""Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.""" + + def get_global_hubs( + self, + *, + count: Optional[float] = None, + only_transient: Optional[operations.OnlyTransient] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetGlobalHubsResponse: + r"""Get Global Hubs + + Get Global Hubs filtered by the parameters provided. + + :param count: The number of items to return with each hub. + :param only_transient: Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetGlobalHubsRequest( + count=count, + only_transient=only_transient, + ) + + req = self.build_request( + method="GET", + path="/hubs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getGlobalHubs", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetGlobalHubsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetGlobalHubsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGlobalHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGlobalHubsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGlobalHubsHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGlobalHubsHubsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_global_hubs_async( + self, + *, + count: Optional[float] = None, + only_transient: Optional[operations.OnlyTransient] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetGlobalHubsResponse: + r"""Get Global Hubs + + Get Global Hubs filtered by the parameters provided. + + :param count: The number of items to return with each hub. + :param only_transient: Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetGlobalHubsRequest( + count=count, + only_transient=only_transient, + ) + + req = self.build_request_async( + method="GET", + path="/hubs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getGlobalHubs", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetGlobalHubsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetGlobalHubsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGlobalHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGlobalHubsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGlobalHubsHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGlobalHubsHubsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_library_hubs( + self, + *, + section_id: float, + count: Optional[float] = None, + only_transient: Optional[operations.QueryParamOnlyTransient] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryHubsResponse: + r"""Get library specific hubs + + This endpoint will return a list of library specific hubs + + + :param section_id: the Id of the library to query + :param count: The number of items to return with each hub. + :param only_transient: Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetLibraryHubsRequest( + section_id=section_id, + count=count, + only_transient=only_transient, + ) + + req = self.build_request( + method="GET", + path="/hubs/sections/{sectionId}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getLibraryHubs", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryHubsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryHubsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryHubsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryHubsHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryHubsHubsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_library_hubs_async( + self, + *, + section_id: float, + count: Optional[float] = None, + only_transient: Optional[operations.QueryParamOnlyTransient] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryHubsResponse: + r"""Get library specific hubs + + This endpoint will return a list of library specific hubs + + + :param section_id: the Id of the library to query + :param count: The number of items to return with each hub. + :param only_transient: Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetLibraryHubsRequest( + section_id=section_id, + count=count, + only_transient=only_transient, + ) + + req = self.build_request_async( + method="GET", + path="/hubs/sections/{sectionId}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getLibraryHubs", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryHubsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryHubsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryHubsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryHubsHubsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryHubsHubsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/library.py b/src/plex_api_client/library.py new file mode 100644 index 0000000..835f226 --- /dev/null +++ b/src/plex_api_client/library.py @@ -0,0 +1,2546 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Library(BaseSDK): + r"""API Calls interacting with Plex Media Server Libraries""" + + def get_file_hash( + self, + *, + url: str, + type_: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetFileHashResponse: + r"""Get Hash Value + + This resource returns hash values for local files + + :param url: This is the path to the local file, must be prefixed by `file://` + :param type: Item type + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetFileHashRequest( + url=url, + type=type_, + ) + + req = self.build_request( + method="GET", + path="/library/hashes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getFileHash", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetFileHashResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetFileHashResponseBodyData + ) + data.raw_response = http_res + raise errors.GetFileHashResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetFileHashLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetFileHashLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_file_hash_async( + self, + *, + url: str, + type_: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetFileHashResponse: + r"""Get Hash Value + + This resource returns hash values for local files + + :param url: This is the path to the local file, must be prefixed by `file://` + :param type: Item type + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetFileHashRequest( + url=url, + type=type_, + ) + + req = self.build_request_async( + method="GET", + path="/library/hashes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getFileHash", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetFileHashResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetFileHashResponseBodyData + ) + data.raw_response = http_res + raise errors.GetFileHashResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetFileHashLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetFileHashLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_recently_added( + self, + *, + x_plex_container_start: Optional[int] = 0, + x_plex_container_size: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetRecentlyAddedResponse: + r"""Get Recently Added + + This endpoint will return the recently added content. + + + :param x_plex_container_start: The index of the first item to return. If not specified, the first item will be returned. If the number of items exceeds the limit, the response will be paginated. By default this is 0 + :param x_plex_container_size: The number of items to return. If not specified, all items will be returned. If the number of items exceeds the limit, the response will be paginated. By default this is 50 + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetRecentlyAddedRequest( + x_plex_container_start=x_plex_container_start, + x_plex_container_size=x_plex_container_size, + ) + + req = self.build_request( + method="GET", + path="/library/recentlyAdded", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getRecentlyAdded", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetRecentlyAddedResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetRecentlyAddedResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRecentlyAddedResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRecentlyAddedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRecentlyAddedLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRecentlyAddedLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_recently_added_async( + self, + *, + x_plex_container_start: Optional[int] = 0, + x_plex_container_size: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetRecentlyAddedResponse: + r"""Get Recently Added + + This endpoint will return the recently added content. + + + :param x_plex_container_start: The index of the first item to return. If not specified, the first item will be returned. If the number of items exceeds the limit, the response will be paginated. By default this is 0 + :param x_plex_container_size: The number of items to return. If not specified, all items will be returned. If the number of items exceeds the limit, the response will be paginated. By default this is 50 + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetRecentlyAddedRequest( + x_plex_container_start=x_plex_container_start, + x_plex_container_size=x_plex_container_size, + ) + + req = self.build_request_async( + method="GET", + path="/library/recentlyAdded", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getRecentlyAdded", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetRecentlyAddedResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetRecentlyAddedResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRecentlyAddedResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRecentlyAddedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRecentlyAddedLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRecentlyAddedLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_all_libraries( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetAllLibrariesResponse: + r"""Get All Libraries + + A library section (commonly referred to as just a library) is a collection of media. + Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. + For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + + Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. + This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/library/sections", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-all-libraries", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetAllLibrariesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetAllLibrariesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAllLibrariesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAllLibrariesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAllLibrariesLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAllLibrariesLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_all_libraries_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetAllLibrariesResponse: + r"""Get All Libraries + + A library section (commonly referred to as just a library) is a collection of media. + Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. + For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + + Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. + This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/library/sections", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-all-libraries", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetAllLibrariesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetAllLibrariesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAllLibrariesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAllLibrariesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAllLibrariesLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAllLibrariesLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_library_details( + self, + *, + section_key: int, + include_details: Optional[ + operations.IncludeDetails + ] = operations.IncludeDetails.ZERO, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryDetailsResponse: + r"""Get Library Details + + ## Library Details Endpoint + + This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. + + The details include: + + ### Directories + Organized into three categories: + + - **Primary Directories**: + - Used in some clients for quick access to media subsets (e.g., \"All\", \"On Deck\"). + - Most can be replicated via media queries. + - Customizable by users. + + - **Secondary Directories**: + - Marked with `secondary=\"1\"`. + - Used in older clients for structured navigation. + + - **Special Directories**: + - Includes a \"By Folder\" entry for filesystem-based browsing. + - Contains an obsolete `search=\"1\"` entry for on-the-fly search dialog creation. + + ### Types + Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + + - **Type Object Attributes**: + - `key`: Endpoint for the media list of this type. + - `type`: Metadata type (if standard Plex type). + - `title`: Title for this content type (e.g., \"Movies\"). + + - **Filter Objects**: + - Subset of the media query language. + - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + + - **Sort Objects**: + - Description of sort fields. + - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + + > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param include_details: Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetLibraryDetailsRequest( + section_key=section_key, + include_details=include_details, + ) + + req = self.build_request( + method="GET", + path="/library/sections/{sectionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-library-details", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryDetailsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryDetailsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryDetailsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryDetailsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryDetailsLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryDetailsLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_library_details_async( + self, + *, + section_key: int, + include_details: Optional[ + operations.IncludeDetails + ] = operations.IncludeDetails.ZERO, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryDetailsResponse: + r"""Get Library Details + + ## Library Details Endpoint + + This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. + + The details include: + + ### Directories + Organized into three categories: + + - **Primary Directories**: + - Used in some clients for quick access to media subsets (e.g., \"All\", \"On Deck\"). + - Most can be replicated via media queries. + - Customizable by users. + + - **Secondary Directories**: + - Marked with `secondary=\"1\"`. + - Used in older clients for structured navigation. + + - **Special Directories**: + - Includes a \"By Folder\" entry for filesystem-based browsing. + - Contains an obsolete `search=\"1\"` entry for on-the-fly search dialog creation. + + ### Types + Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + + - **Type Object Attributes**: + - `key`: Endpoint for the media list of this type. + - `type`: Metadata type (if standard Plex type). + - `title`: Title for this content type (e.g., \"Movies\"). + + - **Filter Objects**: + - Subset of the media query language. + - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + + - **Sort Objects**: + - Description of sort fields. + - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + + > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param include_details: Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetLibraryDetailsRequest( + section_key=section_key, + include_details=include_details, + ) + + req = self.build_request_async( + method="GET", + path="/library/sections/{sectionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-library-details", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryDetailsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryDetailsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryDetailsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryDetailsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryDetailsLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryDetailsLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def delete_library( + self, + *, + section_key: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.DeleteLibraryResponse: + r"""Delete Library Section + + Delete a library using a specific section id + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.DeleteLibraryRequest( + section_key=section_key, + ) + + req = self.build_request( + method="DELETE", + path="/library/sections/{sectionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="deleteLibrary", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeleteLibraryResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeleteLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.DeleteLibraryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeleteLibraryLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.DeleteLibraryLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def delete_library_async( + self, + *, + section_key: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.DeleteLibraryResponse: + r"""Delete Library Section + + Delete a library using a specific section id + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.DeleteLibraryRequest( + section_key=section_key, + ) + + req = self.build_request_async( + method="DELETE", + path="/library/sections/{sectionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="deleteLibrary", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeleteLibraryResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeleteLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.DeleteLibraryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeleteLibraryLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.DeleteLibraryLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_library_items( + self, + *, + request: Union[ + operations.GetLibraryItemsRequest, + operations.GetLibraryItemsRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryItemsResponse: + r"""Get Library Items + + Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: + - `all`: All items in the section. + - `unwatched`: Items that have not been played. + - `newest`: Items that are recently released. + - `recentlyAdded`: Items that are recently added to the library. + - `recentlyViewed`: Items that were recently viewed. + - `onDeck`: Items to continue watching. + - `collection`: Items categorized by collection. + - `edition`: Items categorized by edition. + - `genre`: Items categorized by genre. + - `year`: Items categorized by year of release. + - `decade`: Items categorized by decade. + - `director`: Items categorized by director. + - `actor`: Items categorized by starring actor. + - `country`: Items categorized by country of origin. + - `contentRating`: Items categorized by content rating. + - `rating`: Items categorized by rating. + - `resolution`: Items categorized by resolution. + - `firstCharacter`: Items categorized by the first letter. + - `folder`: Items categorized by folder. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetLibraryItemsRequest) + request = cast(operations.GetLibraryItemsRequest, request) + + req = self.build_request( + method="GET", + path="/library/sections/{sectionKey}/{tag}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-library-items", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryItemsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryItemsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryItemsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryItemsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryItemsLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryItemsLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_library_items_async( + self, + *, + request: Union[ + operations.GetLibraryItemsRequest, + operations.GetLibraryItemsRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetLibraryItemsResponse: + r"""Get Library Items + + Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: + - `all`: All items in the section. + - `unwatched`: Items that have not been played. + - `newest`: Items that are recently released. + - `recentlyAdded`: Items that are recently added to the library. + - `recentlyViewed`: Items that were recently viewed. + - `onDeck`: Items to continue watching. + - `collection`: Items categorized by collection. + - `edition`: Items categorized by edition. + - `genre`: Items categorized by genre. + - `year`: Items categorized by year of release. + - `decade`: Items categorized by decade. + - `director`: Items categorized by director. + - `actor`: Items categorized by starring actor. + - `country`: Items categorized by country of origin. + - `contentRating`: Items categorized by content rating. + - `rating`: Items categorized by rating. + - `resolution`: Items categorized by resolution. + - `firstCharacter`: Items categorized by the first letter. + - `folder`: Items categorized by folder. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetLibraryItemsRequest) + request = cast(operations.GetLibraryItemsRequest, request) + + req = self.build_request_async( + method="GET", + path="/library/sections/{sectionKey}/{tag}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-library-items", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetLibraryItemsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetLibraryItemsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryItemsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryItemsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetLibraryItemsLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetLibraryItemsLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_refresh_library_metadata( + self, + *, + section_key: int, + force: Optional[operations.Force] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetRefreshLibraryMetadataResponse: + r"""Refresh Metadata Of The Library + + This endpoint Refreshes all the Metadata of the library. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param force: Force the refresh even if the library is already being refreshed. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetRefreshLibraryMetadataRequest( + section_key=section_key, + force=force, + ) + + req = self.build_request( + method="GET", + path="/library/sections/{sectionKey}/refresh", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-refresh-library-metadata", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetRefreshLibraryMetadataResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRefreshLibraryMetadataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRefreshLibraryMetadataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRefreshLibraryMetadataLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRefreshLibraryMetadataLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_refresh_library_metadata_async( + self, + *, + section_key: int, + force: Optional[operations.Force] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetRefreshLibraryMetadataResponse: + r"""Refresh Metadata Of The Library + + This endpoint Refreshes all the Metadata of the library. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param force: Force the refresh even if the library is already being refreshed. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetRefreshLibraryMetadataRequest( + section_key=section_key, + force=force, + ) + + req = self.build_request_async( + method="GET", + path="/library/sections/{sectionKey}/refresh", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-refresh-library-metadata", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetRefreshLibraryMetadataResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRefreshLibraryMetadataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRefreshLibraryMetadataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetRefreshLibraryMetadataLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetRefreshLibraryMetadataLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_search_library( + self, + *, + section_key: int, + type_: operations.QueryParamType, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSearchLibraryResponse: + r"""Search Library + + Search for content within a specific section of the library. + + ### Types + Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + + - **Type Object Attributes**: + - `type`: Metadata type (if standard Plex type). + - `title`: Title for this content type (e.g., \"Movies\"). + + - **Filter Objects**: + - Subset of the media query language. + - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + + - **Sort Objects**: + - Description of sort fields. + - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + + > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSearchLibraryRequest( + section_key=section_key, + type=type_, + ) + + req = self.build_request( + method="GET", + path="/library/sections/{sectionKey}/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-search-library", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSearchLibraryResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSearchLibraryResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchLibraryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchLibraryLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchLibraryLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_search_library_async( + self, + *, + section_key: int, + type_: operations.QueryParamType, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSearchLibraryResponse: + r"""Search Library + + Search for content within a specific section of the library. + + ### Types + Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + + - **Type Object Attributes**: + - `type`: Metadata type (if standard Plex type). + - `title`: Title for this content type (e.g., \"Movies\"). + + - **Filter Objects**: + - Subset of the media query language. + - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + + - **Sort Objects**: + - Description of sort fields. + - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + + > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + + + :param section_key: The unique key of the Plex library. Note: This is unique in the context of the Plex server. + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSearchLibraryRequest( + section_key=section_key, + type=type_, + ) + + req = self.build_request_async( + method="GET", + path="/library/sections/{sectionKey}/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-search-library", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSearchLibraryResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSearchLibraryResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchLibraryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchLibraryLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchLibraryLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_meta_data_by_rating_key( + self, + *, + rating_key: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMetaDataByRatingKeyResponse: + r"""Get Metadata by RatingKey + + This endpoint will return the metadata of a library item specified with the ratingKey. + + + :param rating_key: the id of the library item to return the children of. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMetaDataByRatingKeyRequest( + rating_key=rating_key, + ) + + req = self.build_request( + method="GET", + path="/library/metadata/{ratingKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-meta-data-by-rating-key", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMetaDataByRatingKeyResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetMetaDataByRatingKeyResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetaDataByRatingKeyResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetaDataByRatingKeyResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetaDataByRatingKeyLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetaDataByRatingKeyLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_meta_data_by_rating_key_async( + self, + *, + rating_key: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMetaDataByRatingKeyResponse: + r"""Get Metadata by RatingKey + + This endpoint will return the metadata of a library item specified with the ratingKey. + + + :param rating_key: the id of the library item to return the children of. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMetaDataByRatingKeyRequest( + rating_key=rating_key, + ) + + req = self.build_request_async( + method="GET", + path="/library/metadata/{ratingKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-meta-data-by-rating-key", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMetaDataByRatingKeyResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetMetaDataByRatingKeyResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetaDataByRatingKeyResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetaDataByRatingKeyResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetaDataByRatingKeyLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetaDataByRatingKeyLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_metadata_children( + self, + *, + rating_key: float, + include_elements: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMetadataChildrenResponse: + r"""Get Items Children + + This endpoint will return the children of of a library item specified with the ratingKey. + + + :param rating_key: the id of the library item to return the children of. + :param include_elements: Adds additional elements to the response. Supported types are (Stream) + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMetadataChildrenRequest( + rating_key=rating_key, + include_elements=include_elements, + ) + + req = self.build_request( + method="GET", + path="/library/metadata/{ratingKey}/children", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getMetadataChildren", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMetadataChildrenResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMetadataChildrenResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetadataChildrenResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetadataChildrenResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetadataChildrenLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetadataChildrenLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_metadata_children_async( + self, + *, + rating_key: float, + include_elements: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMetadataChildrenResponse: + r"""Get Items Children + + This endpoint will return the children of of a library item specified with the ratingKey. + + + :param rating_key: the id of the library item to return the children of. + :param include_elements: Adds additional elements to the response. Supported types are (Stream) + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMetadataChildrenRequest( + rating_key=rating_key, + include_elements=include_elements, + ) + + req = self.build_request_async( + method="GET", + path="/library/metadata/{ratingKey}/children", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getMetadataChildren", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMetadataChildrenResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMetadataChildrenResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetadataChildrenResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetadataChildrenResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMetadataChildrenLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMetadataChildrenLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_top_watched_content( + self, + *, + type_: operations.GetTopWatchedContentQueryParamType, + include_guids: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTopWatchedContentResponse: + r"""Get Top Watched Content + + This endpoint will return the top watched content from libraries of a certain type + + + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :param include_guids: Adds the Guids object to the response + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetTopWatchedContentRequest( + type=type_, + include_guids=include_guids, + ) + + req = self.build_request( + method="GET", + path="/library/all/top", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getTopWatchedContent", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTopWatchedContentResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetTopWatchedContentResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTopWatchedContentResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTopWatchedContentResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTopWatchedContentLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTopWatchedContentLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_top_watched_content_async( + self, + *, + type_: operations.GetTopWatchedContentQueryParamType, + include_guids: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTopWatchedContentResponse: + r"""Get Top Watched Content + + This endpoint will return the top watched content from libraries of a certain type + + + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :param include_guids: Adds the Guids object to the response + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetTopWatchedContentRequest( + type=type_, + include_guids=include_guids, + ) + + req = self.build_request_async( + method="GET", + path="/library/all/top", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getTopWatchedContent", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTopWatchedContentResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetTopWatchedContentResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTopWatchedContentResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTopWatchedContentResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTopWatchedContentLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTopWatchedContentLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_on_deck( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetOnDeckResponse: + r"""Get On Deck + + This endpoint will return the on deck content. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/library/onDeck", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getOnDeck", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetOnDeckResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetOnDeckResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GetOnDeckResponseBodyData) + data.raw_response = http_res + raise errors.GetOnDeckResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetOnDeckLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetOnDeckLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_on_deck_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetOnDeckResponse: + r"""Get On Deck + + This endpoint will return the on deck content. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/library/onDeck", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getOnDeck", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetOnDeckResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetOnDeckResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GetOnDeckResponseBodyData) + data.raw_response = http_res + raise errors.GetOnDeckResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetOnDeckLibraryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetOnDeckLibraryResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/log.py b/src/plex_api_client/log.py new file mode 100644 index 0000000..7eac4a3 --- /dev/null +++ b/src/plex_api_client/log.py @@ -0,0 +1,620 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Log(BaseSDK): + r"""Submit logs to the Log Handler for Plex Media Server""" + + def log_line( + self, + *, + level: operations.Level, + message: str, + source: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.LogLineResponse: + r"""Logging a single line message. + + This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + + + :param level: An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose + :param message: The text of the message to write to the log. + :param source: a string indicating the source of the message. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.LogLineRequest( + level=level, + message=message, + source=source, + ) + + req = self.build_request( + method="GET", + path="/log", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="logLine", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.LogLineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.LogLineResponseBodyData) + data.raw_response = http_res + raise errors.LogLineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogLineLogResponseBodyData + ) + data.raw_response = http_res + raise errors.LogLineLogResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def log_line_async( + self, + *, + level: operations.Level, + message: str, + source: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.LogLineResponse: + r"""Logging a single line message. + + This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + + + :param level: An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose + :param message: The text of the message to write to the log. + :param source: a string indicating the source of the message. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.LogLineRequest( + level=level, + message=message, + source=source, + ) + + req = self.build_request_async( + method="GET", + path="/log", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="logLine", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.LogLineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.LogLineResponseBodyData) + data.raw_response = http_res + raise errors.LogLineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogLineLogResponseBodyData + ) + data.raw_response = http_res + raise errors.LogLineLogResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def log_multi_line( + self, + *, + request: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.LogMultiLineResponse: + r"""Logging a multi-line message + + This endpoint allows for the batch addition of log entries to the main Plex Media Server log. + It accepts a text/plain request body, where each line represents a distinct log entry. + Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. + + Log entries are separated by a newline character (`\n`). + Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. + This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. + + The 'level' parameter specifies the log entry's severity or importance, with the following integer values: + - `0`: Error - Critical issues that require immediate attention. + - `1`: Warning - Important events that are not critical but may indicate potential issues. + - `2`: Info - General informational messages about system operation. + - `3`: Debug - Detailed information useful for debugging purposes. + - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. + + The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). + + Example of a single log entry format: + `level=4&message=Sample%20log%20entry&source=applicationName` + + Ensure each parameter is properly URL-encoded to avoid interpretation issues. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + req = self.build_request( + method="POST", + path="/log", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "string", str + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="logMultiLine", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.LogMultiLineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogMultiLineResponseBodyData + ) + data.raw_response = http_res + raise errors.LogMultiLineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogMultiLineLogResponseBodyData + ) + data.raw_response = http_res + raise errors.LogMultiLineLogResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def log_multi_line_async( + self, + *, + request: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.LogMultiLineResponse: + r"""Logging a multi-line message + + This endpoint allows for the batch addition of log entries to the main Plex Media Server log. + It accepts a text/plain request body, where each line represents a distinct log entry. + Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. + + Log entries are separated by a newline character (`\n`). + Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. + This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. + + The 'level' parameter specifies the log entry's severity or importance, with the following integer values: + - `0`: Error - Critical issues that require immediate attention. + - `1`: Warning - Important events that are not critical but may indicate potential issues. + - `2`: Info - General informational messages about system operation. + - `3`: Debug - Detailed information useful for debugging purposes. + - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. + + The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). + + Example of a single log entry format: + `level=4&message=Sample%20log%20entry&source=applicationName` + + Ensure each parameter is properly URL-encoded to avoid interpretation issues. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + req = self.build_request_async( + method="POST", + path="/log", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "string", str + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="logMultiLine", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.LogMultiLineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogMultiLineResponseBodyData + ) + data.raw_response = http_res + raise errors.LogMultiLineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.LogMultiLineLogResponseBodyData + ) + data.raw_response = http_res + raise errors.LogMultiLineLogResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def enable_paper_trail( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.EnablePaperTrailResponse: + r"""Enabling Papertrail + + This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/log/networked", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="enablePaperTrail", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.EnablePaperTrailResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.EnablePaperTrailResponseBodyData + ) + data.raw_response = http_res + raise errors.EnablePaperTrailResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.EnablePaperTrailLogResponseBodyData + ) + data.raw_response = http_res + raise errors.EnablePaperTrailLogResponseBody(data=data) + if utils.match_response(http_res, ["403", "4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def enable_paper_trail_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.EnablePaperTrailResponse: + r"""Enabling Papertrail + + This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/log/networked", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="enablePaperTrail", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.EnablePaperTrailResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.EnablePaperTrailResponseBodyData + ) + data.raw_response = http_res + raise errors.EnablePaperTrailResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.EnablePaperTrailLogResponseBodyData + ) + data.raw_response = http_res + raise errors.EnablePaperTrailLogResponseBody(data=data) + if utils.match_response(http_res, ["403", "4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/media.py b/src/plex_api_client/media.py new file mode 100644 index 0000000..f0ceca2 --- /dev/null +++ b/src/plex_api_client/media.py @@ -0,0 +1,996 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Media(BaseSDK): + r"""API Calls interacting with Plex Media Server Media""" + + def mark_played( + self, + *, + key: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.MarkPlayedResponse: + r"""Mark Media Played + + This will mark the provided media key as Played. + + :param key: The media key to mark as played + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.MarkPlayedRequest( + key=key, + ) + + req = self.build_request( + method="GET", + path="/:/scrobble", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="markPlayed", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.MarkPlayedResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkPlayedResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkPlayedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkPlayedMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkPlayedMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def mark_played_async( + self, + *, + key: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.MarkPlayedResponse: + r"""Mark Media Played + + This will mark the provided media key as Played. + + :param key: The media key to mark as played + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.MarkPlayedRequest( + key=key, + ) + + req = self.build_request_async( + method="GET", + path="/:/scrobble", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="markPlayed", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.MarkPlayedResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkPlayedResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkPlayedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkPlayedMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkPlayedMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def mark_unplayed( + self, + *, + key: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.MarkUnplayedResponse: + r"""Mark Media Unplayed + + This will mark the provided media key as Unplayed. + + :param key: The media key to mark as Unplayed + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.MarkUnplayedRequest( + key=key, + ) + + req = self.build_request( + method="GET", + path="/:/unscrobble", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="markUnplayed", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.MarkUnplayedResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkUnplayedResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkUnplayedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkUnplayedMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkUnplayedMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def mark_unplayed_async( + self, + *, + key: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.MarkUnplayedResponse: + r"""Mark Media Unplayed + + This will mark the provided media key as Unplayed. + + :param key: The media key to mark as Unplayed + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.MarkUnplayedRequest( + key=key, + ) + + req = self.build_request_async( + method="GET", + path="/:/unscrobble", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="markUnplayed", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.MarkUnplayedResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkUnplayedResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkUnplayedResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.MarkUnplayedMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.MarkUnplayedMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def update_play_progress( + self, + *, + key: str, + time: float, + state: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UpdatePlayProgressResponse: + r"""Update Media Play Progress + + This API command can be used to update the play progress of a media item. + + + :param key: the media key + :param time: The time, in milliseconds, used to set the media playback progress. + :param state: The playback state of the media item. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UpdatePlayProgressRequest( + key=key, + time=time, + state=state, + ) + + req = self.build_request( + method="POST", + path="/:/progress", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="updatePlayProgress", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePlayProgressResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlayProgressResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlayProgressResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlayProgressMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlayProgressMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def update_play_progress_async( + self, + *, + key: str, + time: float, + state: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UpdatePlayProgressResponse: + r"""Update Media Play Progress + + This API command can be used to update the play progress of a media item. + + + :param key: the media key + :param time: The time, in milliseconds, used to set the media playback progress. + :param state: The playback state of the media item. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UpdatePlayProgressRequest( + key=key, + time=time, + state=state, + ) + + req = self.build_request_async( + method="POST", + path="/:/progress", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="updatePlayProgress", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePlayProgressResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlayProgressResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlayProgressResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlayProgressMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlayProgressMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_banner_image( + self, + *, + request: Union[ + operations.GetBannerImageRequest, operations.GetBannerImageRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetBannerImageResponse: + r"""Get Banner Image + + Gets the banner image of the media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetBannerImageRequest) + request = cast(operations.GetBannerImageRequest, request) + + req = self.build_request( + method="GET", + path="/library/metadata/{ratingKey}/banner", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/jpeg", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-banner-image", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "image/jpeg"): + return operations.GetBannerImageResponse( + response_stream=http_res, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBannerImageResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBannerImageResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBannerImageMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBannerImageMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_banner_image_async( + self, + *, + request: Union[ + operations.GetBannerImageRequest, operations.GetBannerImageRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetBannerImageResponse: + r"""Get Banner Image + + Gets the banner image of the media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetBannerImageRequest) + request = cast(operations.GetBannerImageRequest, request) + + req = self.build_request_async( + method="GET", + path="/library/metadata/{ratingKey}/banner", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/jpeg", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-banner-image", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "image/jpeg"): + return operations.GetBannerImageResponse( + response_stream=http_res, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBannerImageResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBannerImageResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBannerImageMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBannerImageMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_thumb_image( + self, + *, + request: Union[ + operations.GetThumbImageRequest, operations.GetThumbImageRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetThumbImageResponse: + r"""Get Thumb Image + + Gets the thumbnail image of the media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetThumbImageRequest) + request = cast(operations.GetThumbImageRequest, request) + + req = self.build_request( + method="GET", + path="/library/metadata/{ratingKey}/thumb", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/jpeg", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-thumb-image", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "image/jpeg"): + return operations.GetThumbImageResponse( + response_stream=http_res, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetThumbImageResponseBodyData + ) + data.raw_response = http_res + raise errors.GetThumbImageResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetThumbImageMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.GetThumbImageMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_thumb_image_async( + self, + *, + request: Union[ + operations.GetThumbImageRequest, operations.GetThumbImageRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetThumbImageResponse: + r"""Get Thumb Image + + Gets the thumbnail image of the media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetThumbImageRequest) + request = cast(operations.GetThumbImageRequest, request) + + req = self.build_request_async( + method="GET", + path="/library/metadata/{ratingKey}/thumb", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/jpeg", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-thumb-image", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "image/jpeg"): + return operations.GetThumbImageResponse( + response_stream=http_res, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetThumbImageResponseBodyData + ) + data.raw_response = http_res + raise errors.GetThumbImageResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetThumbImageMediaResponseBodyData + ) + data.raw_response = http_res + raise errors.GetThumbImageMediaResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/models/components/__init__.py b/src/plex_api_client/models/components/__init__.py new file mode 100644 index 0000000..2ed55ec --- /dev/null +++ b/src/plex_api_client/models/components/__init__.py @@ -0,0 +1,5 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .security import Security, SecurityTypedDict + +__all__ = ["Security", "SecurityTypedDict"] diff --git a/src/plex_api_client/models/components/security.py b/src/plex_api_client/models/components/security.py new file mode 100644 index 0000000..c70076e --- /dev/null +++ b/src/plex_api_client/models/components/security.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, SecurityMetadata +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class SecurityTypedDict(TypedDict): + access_token: NotRequired[str] + + +class Security(BaseModel): + access_token: Annotated[ + Optional[str], + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="apiKey", + sub_type="query", + field_name="X-Plex-Token", + ) + ), + ] = None diff --git a/src/plex_api_client/models/errors/__init__.py b/src/plex_api_client/models/errors/__init__.py new file mode 100644 index 0000000..72f1f70 --- /dev/null +++ b/src/plex_api_client/models/errors/__init__.py @@ -0,0 +1,1319 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .addplaylistcontents import ( + AddPlaylistContentsErrors, + AddPlaylistContentsErrorsTypedDict, + AddPlaylistContentsPlaylistsErrors, + AddPlaylistContentsPlaylistsErrorsTypedDict, + AddPlaylistContentsPlaylistsResponseBody, + AddPlaylistContentsPlaylistsResponseBodyData, + AddPlaylistContentsResponseBody, + AddPlaylistContentsResponseBodyData, +) +from .applyupdates import ( + ApplyUpdatesErrors, + ApplyUpdatesErrorsTypedDict, + ApplyUpdatesResponseBody, + ApplyUpdatesResponseBodyData, + ApplyUpdatesUpdaterErrors, + ApplyUpdatesUpdaterErrorsTypedDict, + ApplyUpdatesUpdaterResponseBody, + ApplyUpdatesUpdaterResponseBodyData, +) +from .cancelserveractivities import ( + CancelServerActivitiesActivitiesErrors, + CancelServerActivitiesActivitiesErrorsTypedDict, + CancelServerActivitiesActivitiesResponseBody, + CancelServerActivitiesActivitiesResponseBodyData, + CancelServerActivitiesErrors, + CancelServerActivitiesErrorsTypedDict, + CancelServerActivitiesResponseBody, + CancelServerActivitiesResponseBodyData, +) +from .checkforupdates import ( + CheckForUpdatesErrors, + CheckForUpdatesErrorsTypedDict, + CheckForUpdatesResponseBody, + CheckForUpdatesResponseBodyData, + CheckForUpdatesUpdaterErrors, + CheckForUpdatesUpdaterErrorsTypedDict, + CheckForUpdatesUpdaterResponseBody, + CheckForUpdatesUpdaterResponseBodyData, +) +from .clearplaylistcontents import ( + ClearPlaylistContentsErrors, + ClearPlaylistContentsErrorsTypedDict, + ClearPlaylistContentsPlaylistsErrors, + ClearPlaylistContentsPlaylistsErrorsTypedDict, + ClearPlaylistContentsPlaylistsResponseBody, + ClearPlaylistContentsPlaylistsResponseBodyData, + ClearPlaylistContentsResponseBody, + ClearPlaylistContentsResponseBodyData, +) +from .createplaylist import ( + CreatePlaylistErrors, + CreatePlaylistErrorsTypedDict, + CreatePlaylistPlaylistsErrors, + CreatePlaylistPlaylistsErrorsTypedDict, + CreatePlaylistPlaylistsResponseBody, + CreatePlaylistPlaylistsResponseBodyData, + CreatePlaylistResponseBody, + CreatePlaylistResponseBodyData, +) +from .deletelibrary import ( + DeleteLibraryErrors, + DeleteLibraryErrorsTypedDict, + DeleteLibraryLibraryErrors, + DeleteLibraryLibraryErrorsTypedDict, + DeleteLibraryLibraryResponseBody, + DeleteLibraryLibraryResponseBodyData, + DeleteLibraryResponseBody, + DeleteLibraryResponseBodyData, +) +from .deleteplaylist import ( + DeletePlaylistErrors, + DeletePlaylistErrorsTypedDict, + DeletePlaylistPlaylistsErrors, + DeletePlaylistPlaylistsErrorsTypedDict, + DeletePlaylistPlaylistsResponseBody, + DeletePlaylistPlaylistsResponseBodyData, + DeletePlaylistResponseBody, + DeletePlaylistResponseBodyData, +) +from .enablepapertrail import ( + EnablePaperTrailErrors, + EnablePaperTrailErrorsTypedDict, + EnablePaperTrailLogErrors, + EnablePaperTrailLogErrorsTypedDict, + EnablePaperTrailLogResponseBody, + EnablePaperTrailLogResponseBodyData, + EnablePaperTrailResponseBody, + EnablePaperTrailResponseBodyData, +) +from .get_all_libraries import ( + GetAllLibrariesErrors, + GetAllLibrariesErrorsTypedDict, + GetAllLibrariesLibraryErrors, + GetAllLibrariesLibraryErrorsTypedDict, + GetAllLibrariesLibraryResponseBody, + GetAllLibrariesLibraryResponseBodyData, + GetAllLibrariesResponseBody, + GetAllLibrariesResponseBodyData, +) +from .get_banner_image import ( + GetBannerImageErrors, + GetBannerImageErrorsTypedDict, + GetBannerImageMediaErrors, + GetBannerImageMediaErrorsTypedDict, + GetBannerImageMediaResponseBody, + GetBannerImageMediaResponseBodyData, + GetBannerImageResponseBody, + GetBannerImageResponseBodyData, +) +from .get_library_details import ( + GetLibraryDetailsErrors, + GetLibraryDetailsErrorsTypedDict, + GetLibraryDetailsLibraryErrors, + GetLibraryDetailsLibraryErrorsTypedDict, + GetLibraryDetailsLibraryResponseBody, + GetLibraryDetailsLibraryResponseBodyData, + GetLibraryDetailsResponseBody, + GetLibraryDetailsResponseBodyData, +) +from .get_library_items import ( + GetLibraryItemsErrors, + GetLibraryItemsErrorsTypedDict, + GetLibraryItemsLibraryErrors, + GetLibraryItemsLibraryErrorsTypedDict, + GetLibraryItemsLibraryResponseBody, + GetLibraryItemsLibraryResponseBodyData, + GetLibraryItemsResponseBody, + GetLibraryItemsResponseBodyData, +) +from .get_media_providers import ( + GetMediaProvidersErrors, + GetMediaProvidersErrorsTypedDict, + GetMediaProvidersResponseBody, + GetMediaProvidersResponseBodyData, + GetMediaProvidersServerErrors, + GetMediaProvidersServerErrorsTypedDict, + GetMediaProvidersServerResponseBody, + GetMediaProvidersServerResponseBodyData, +) +from .get_meta_data_by_rating_key import ( + GetMetaDataByRatingKeyErrors, + GetMetaDataByRatingKeyErrorsTypedDict, + GetMetaDataByRatingKeyLibraryErrors, + GetMetaDataByRatingKeyLibraryErrorsTypedDict, + GetMetaDataByRatingKeyLibraryResponseBody, + GetMetaDataByRatingKeyLibraryResponseBodyData, + GetMetaDataByRatingKeyResponseBody, + GetMetaDataByRatingKeyResponseBodyData, +) +from .get_refresh_library_metadata import ( + GetRefreshLibraryMetadataErrors, + GetRefreshLibraryMetadataErrorsTypedDict, + GetRefreshLibraryMetadataLibraryErrors, + GetRefreshLibraryMetadataLibraryErrorsTypedDict, + GetRefreshLibraryMetadataLibraryResponseBody, + GetRefreshLibraryMetadataLibraryResponseBodyData, + GetRefreshLibraryMetadataResponseBody, + GetRefreshLibraryMetadataResponseBodyData, +) +from .get_search_library import ( + GetSearchLibraryErrors, + GetSearchLibraryErrorsTypedDict, + GetSearchLibraryLibraryErrors, + GetSearchLibraryLibraryErrorsTypedDict, + GetSearchLibraryLibraryResponseBody, + GetSearchLibraryLibraryResponseBodyData, + GetSearchLibraryResponseBody, + GetSearchLibraryResponseBodyData, +) +from .get_server_identity import ( + GetServerIdentityResponseBody, + GetServerIdentityResponseBodyData, +) +from .get_server_resources import ( + GetServerResourcesErrors, + GetServerResourcesErrorsTypedDict, + GetServerResourcesPlexErrors, + GetServerResourcesPlexErrorsTypedDict, + GetServerResourcesPlexResponseBody, + GetServerResourcesPlexResponseBodyData, + GetServerResourcesResponseBody, + GetServerResourcesResponseBodyData, +) +from .get_thumb_image import ( + GetThumbImageErrors, + GetThumbImageErrorsTypedDict, + GetThumbImageMediaErrors, + GetThumbImageMediaErrorsTypedDict, + GetThumbImageMediaResponseBody, + GetThumbImageMediaResponseBodyData, + GetThumbImageResponseBody, + GetThumbImageResponseBodyData, +) +from .get_watch_list import ( + GetWatchListErrors, + GetWatchListErrorsTypedDict, + GetWatchListResponseBody, + GetWatchListResponseBodyData, + GetWatchListWatchlistErrors, + GetWatchListWatchlistErrorsTypedDict, + GetWatchListWatchlistResponseBody, + GetWatchListWatchlistResponseBodyData, +) +from .getavailableclients import ( + GetAvailableClientsErrors, + GetAvailableClientsErrorsTypedDict, + GetAvailableClientsResponseBody, + GetAvailableClientsResponseBodyData, + GetAvailableClientsServerErrors, + GetAvailableClientsServerErrorsTypedDict, + GetAvailableClientsServerResponseBody, + GetAvailableClientsServerResponseBodyData, +) +from .getbandwidthstatistics import ( + GetBandwidthStatisticsErrors, + GetBandwidthStatisticsErrorsTypedDict, + GetBandwidthStatisticsResponseBody, + GetBandwidthStatisticsResponseBodyData, + GetBandwidthStatisticsStatisticsErrors, + GetBandwidthStatisticsStatisticsErrorsTypedDict, + GetBandwidthStatisticsStatisticsResponseBody, + GetBandwidthStatisticsStatisticsResponseBodyData, +) +from .getbutlertasks import ( + GetButlerTasksButlerErrors, + GetButlerTasksButlerErrorsTypedDict, + GetButlerTasksButlerResponseBody, + GetButlerTasksButlerResponseBodyData, + GetButlerTasksErrors, + GetButlerTasksErrorsTypedDict, + GetButlerTasksResponseBody, + GetButlerTasksResponseBodyData, +) +from .getcompanionsdata import ( + GetCompanionsDataErrors, + GetCompanionsDataErrorsTypedDict, + GetCompanionsDataPlexErrors, + GetCompanionsDataPlexErrorsTypedDict, + GetCompanionsDataPlexResponseBody, + GetCompanionsDataPlexResponseBodyData, + GetCompanionsDataResponseBody, + GetCompanionsDataResponseBodyData, +) +from .getdevices import ( + GetDevicesErrors, + GetDevicesErrorsTypedDict, + GetDevicesResponseBody, + GetDevicesResponseBodyData, + GetDevicesServerErrors, + GetDevicesServerErrorsTypedDict, + GetDevicesServerResponseBody, + GetDevicesServerResponseBodyData, +) +from .getfilehash import ( + GetFileHashErrors, + GetFileHashErrorsTypedDict, + GetFileHashLibraryErrors, + GetFileHashLibraryErrorsTypedDict, + GetFileHashLibraryResponseBody, + GetFileHashLibraryResponseBodyData, + GetFileHashResponseBody, + GetFileHashResponseBodyData, +) +from .getgeodata import ( + GetGeoDataErrors, + GetGeoDataErrorsTypedDict, + GetGeoDataPlexErrors, + GetGeoDataPlexErrorsTypedDict, + GetGeoDataPlexResponseBody, + GetGeoDataPlexResponseBodyData, + GetGeoDataResponseBody, + GetGeoDataResponseBodyData, +) +from .getglobalhubs import ( + GetGlobalHubsErrors, + GetGlobalHubsErrorsTypedDict, + GetGlobalHubsHubsErrors, + GetGlobalHubsHubsErrorsTypedDict, + GetGlobalHubsHubsResponseBody, + GetGlobalHubsHubsResponseBodyData, + GetGlobalHubsResponseBody, + GetGlobalHubsResponseBodyData, +) +from .gethomedata import ( + GetHomeDataErrors, + GetHomeDataErrorsTypedDict, + GetHomeDataPlexErrors, + GetHomeDataPlexErrorsTypedDict, + GetHomeDataPlexResponseBody, + GetHomeDataPlexResponseBodyData, + GetHomeDataResponseBody, + GetHomeDataResponseBodyData, +) +from .getlibraryhubs import ( + GetLibraryHubsErrors, + GetLibraryHubsErrorsTypedDict, + GetLibraryHubsHubsErrors, + GetLibraryHubsHubsErrorsTypedDict, + GetLibraryHubsHubsResponseBody, + GetLibraryHubsHubsResponseBodyData, + GetLibraryHubsResponseBody, + GetLibraryHubsResponseBodyData, +) +from .getmetadatachildren import ( + GetMetadataChildrenErrors, + GetMetadataChildrenErrorsTypedDict, + GetMetadataChildrenLibraryErrors, + GetMetadataChildrenLibraryErrorsTypedDict, + GetMetadataChildrenLibraryResponseBody, + GetMetadataChildrenLibraryResponseBodyData, + GetMetadataChildrenResponseBody, + GetMetadataChildrenResponseBodyData, +) +from .getmyplexaccount import ( + GetMyPlexAccountErrors, + GetMyPlexAccountErrorsTypedDict, + GetMyPlexAccountResponseBody, + GetMyPlexAccountResponseBodyData, + GetMyPlexAccountServerErrors, + GetMyPlexAccountServerErrorsTypedDict, + GetMyPlexAccountServerResponseBody, + GetMyPlexAccountServerResponseBodyData, +) +from .getondeck import ( + GetOnDeckErrors, + GetOnDeckErrorsTypedDict, + GetOnDeckLibraryErrors, + GetOnDeckLibraryErrorsTypedDict, + GetOnDeckLibraryResponseBody, + GetOnDeckLibraryResponseBodyData, + GetOnDeckResponseBody, + GetOnDeckResponseBodyData, +) +from .getpin import ( + GetPinErrors, + GetPinErrorsTypedDict, + GetPinResponseBody, + GetPinResponseBodyData, +) +from .getplaylist import ( + GetPlaylistErrors, + GetPlaylistErrorsTypedDict, + GetPlaylistPlaylistsErrors, + GetPlaylistPlaylistsErrorsTypedDict, + GetPlaylistPlaylistsResponseBody, + GetPlaylistPlaylistsResponseBodyData, + GetPlaylistResponseBody, + GetPlaylistResponseBodyData, +) +from .getplaylistcontents import ( + GetPlaylistContentsErrors, + GetPlaylistContentsErrorsTypedDict, + GetPlaylistContentsPlaylistsErrors, + GetPlaylistContentsPlaylistsErrorsTypedDict, + GetPlaylistContentsPlaylistsResponseBody, + GetPlaylistContentsPlaylistsResponseBodyData, + GetPlaylistContentsResponseBody, + GetPlaylistContentsResponseBodyData, +) +from .getplaylists import ( + GetPlaylistsErrors, + GetPlaylistsErrorsTypedDict, + GetPlaylistsPlaylistsErrors, + GetPlaylistsPlaylistsErrorsTypedDict, + GetPlaylistsPlaylistsResponseBody, + GetPlaylistsPlaylistsResponseBodyData, + GetPlaylistsResponseBody, + GetPlaylistsResponseBodyData, +) +from .getrecentlyadded import ( + GetRecentlyAddedErrors, + GetRecentlyAddedErrorsTypedDict, + GetRecentlyAddedLibraryErrors, + GetRecentlyAddedLibraryErrorsTypedDict, + GetRecentlyAddedLibraryResponseBody, + GetRecentlyAddedLibraryResponseBodyData, + GetRecentlyAddedResponseBody, + GetRecentlyAddedResponseBodyData, +) +from .getresizedphoto import ( + GetResizedPhotoErrors, + GetResizedPhotoErrorsTypedDict, + GetResizedPhotoResponseBody, + GetResizedPhotoResponseBodyData, + GetResizedPhotoServerErrors, + GetResizedPhotoServerErrorsTypedDict, + GetResizedPhotoServerResponseBody, + GetResizedPhotoServerResponseBodyData, +) +from .getresourcesstatistics import ( + GetResourcesStatisticsErrors, + GetResourcesStatisticsErrorsTypedDict, + GetResourcesStatisticsResponseBody, + GetResourcesStatisticsResponseBodyData, + GetResourcesStatisticsStatisticsErrors, + GetResourcesStatisticsStatisticsErrorsTypedDict, + GetResourcesStatisticsStatisticsResponseBody, + GetResourcesStatisticsStatisticsResponseBodyData, +) +from .getsearchresults import ( + GetSearchResultsErrors, + GetSearchResultsErrorsTypedDict, + GetSearchResultsResponseBody, + GetSearchResultsResponseBodyData, + GetSearchResultsSearchErrors, + GetSearchResultsSearchErrorsTypedDict, + GetSearchResultsSearchResponseBody, + GetSearchResultsSearchResponseBodyData, +) +from .getserveractivities import ( + GetServerActivitiesActivitiesErrors, + GetServerActivitiesActivitiesErrorsTypedDict, + GetServerActivitiesActivitiesResponseBody, + GetServerActivitiesActivitiesResponseBodyData, + GetServerActivitiesErrors, + GetServerActivitiesErrorsTypedDict, + GetServerActivitiesResponseBody, + GetServerActivitiesResponseBodyData, +) +from .getservercapabilities import ( + Errors, + ErrorsTypedDict, + GetServerCapabilitiesErrors, + GetServerCapabilitiesErrorsTypedDict, + GetServerCapabilitiesResponseBody, + GetServerCapabilitiesResponseBodyData, + GetServerCapabilitiesServerResponseBody, + GetServerCapabilitiesServerResponseBodyData, +) +from .getserverlist import ( + GetServerListErrors, + GetServerListErrorsTypedDict, + GetServerListResponseBody, + GetServerListResponseBodyData, + GetServerListServerErrors, + GetServerListServerErrorsTypedDict, + GetServerListServerResponseBody, + GetServerListServerResponseBodyData, +) +from .getserverpreferences import ( + GetServerPreferencesErrors, + GetServerPreferencesErrorsTypedDict, + GetServerPreferencesResponseBody, + GetServerPreferencesResponseBodyData, + GetServerPreferencesServerErrors, + GetServerPreferencesServerErrorsTypedDict, + GetServerPreferencesServerResponseBody, + GetServerPreferencesServerResponseBodyData, +) +from .getsessionhistory import ( + GetSessionHistoryErrors, + GetSessionHistoryErrorsTypedDict, + GetSessionHistoryResponseBody, + GetSessionHistoryResponseBodyData, + GetSessionHistorySessionsErrors, + GetSessionHistorySessionsErrorsTypedDict, + GetSessionHistorySessionsResponseBody, + GetSessionHistorySessionsResponseBodyData, +) +from .getsessions import ( + GetSessionsErrors, + GetSessionsErrorsTypedDict, + GetSessionsResponseBody, + GetSessionsResponseBodyData, + GetSessionsSessionsErrors, + GetSessionsSessionsErrorsTypedDict, + GetSessionsSessionsResponseBody, + GetSessionsSessionsResponseBodyData, +) +from .getsourceconnectioninformation import ( + GetSourceConnectionInformationAuthenticationErrors, + GetSourceConnectionInformationAuthenticationErrorsTypedDict, + GetSourceConnectionInformationAuthenticationResponseBody, + GetSourceConnectionInformationAuthenticationResponseBodyData, + GetSourceConnectionInformationErrors, + GetSourceConnectionInformationErrorsTypedDict, + GetSourceConnectionInformationResponseBody, + GetSourceConnectionInformationResponseBodyData, +) +from .getstatistics import ( + GetStatisticsErrors, + GetStatisticsErrorsTypedDict, + GetStatisticsResponseBody, + GetStatisticsResponseBodyData, + GetStatisticsStatisticsErrors, + GetStatisticsStatisticsErrorsTypedDict, + GetStatisticsStatisticsResponseBody, + GetStatisticsStatisticsResponseBodyData, +) +from .gettimeline import ( + GetTimelineErrors, + GetTimelineErrorsTypedDict, + GetTimelineResponseBody, + GetTimelineResponseBodyData, + GetTimelineVideoErrors, + GetTimelineVideoErrorsTypedDict, + GetTimelineVideoResponseBody, + GetTimelineVideoResponseBodyData, +) +from .gettokenbypinid import ( + GetTokenByPinIDErrors, + GetTokenByPinIDErrorsTypedDict, + GetTokenByPinIDPlexErrors, + GetTokenByPinIDPlexErrorsTypedDict, + GetTokenByPinIDPlexResponseBody, + GetTokenByPinIDPlexResponseBodyData, + GetTokenByPinIDResponseBody, + GetTokenByPinIDResponseBodyData, +) +from .gettopwatchedcontent import ( + GetTopWatchedContentErrors, + GetTopWatchedContentErrorsTypedDict, + GetTopWatchedContentLibraryErrors, + GetTopWatchedContentLibraryErrorsTypedDict, + GetTopWatchedContentLibraryResponseBody, + GetTopWatchedContentLibraryResponseBodyData, + GetTopWatchedContentResponseBody, + GetTopWatchedContentResponseBodyData, +) +from .gettranscodesessions import ( + GetTranscodeSessionsErrors, + GetTranscodeSessionsErrorsTypedDict, + GetTranscodeSessionsResponseBody, + GetTranscodeSessionsResponseBodyData, + GetTranscodeSessionsSessionsErrors, + GetTranscodeSessionsSessionsErrorsTypedDict, + GetTranscodeSessionsSessionsResponseBody, + GetTranscodeSessionsSessionsResponseBodyData, +) +from .gettransienttoken import ( + GetTransientTokenAuthenticationErrors, + GetTransientTokenAuthenticationErrorsTypedDict, + GetTransientTokenAuthenticationResponseBody, + GetTransientTokenAuthenticationResponseBodyData, + GetTransientTokenErrors, + GetTransientTokenErrorsTypedDict, + GetTransientTokenResponseBody, + GetTransientTokenResponseBodyData, +) +from .getupdatestatus import ( + GetUpdateStatusErrors, + GetUpdateStatusErrorsTypedDict, + GetUpdateStatusResponseBody, + GetUpdateStatusResponseBodyData, + GetUpdateStatusUpdaterErrors, + GetUpdateStatusUpdaterErrorsTypedDict, + GetUpdateStatusUpdaterResponseBody, + GetUpdateStatusUpdaterResponseBodyData, +) +from .getuserdetails import ( + GetUserDetailsAuthenticationErrors, + GetUserDetailsAuthenticationErrorsTypedDict, + GetUserDetailsAuthenticationResponseBody, + GetUserDetailsAuthenticationResponseBodyData, + GetUserDetailsErrors, + GetUserDetailsErrorsTypedDict, + GetUserDetailsResponseBody, + GetUserDetailsResponseBodyData, +) +from .getuserfriends import ( + GetUserFriendsErrors, + GetUserFriendsErrorsTypedDict, + GetUserFriendsPlexErrors, + GetUserFriendsPlexErrorsTypedDict, + GetUserFriendsPlexResponseBody, + GetUserFriendsPlexResponseBodyData, + GetUserFriendsResponseBody, + GetUserFriendsResponseBodyData, +) +from .logline import ( + LogLineErrors, + LogLineErrorsTypedDict, + LogLineLogErrors, + LogLineLogErrorsTypedDict, + LogLineLogResponseBody, + LogLineLogResponseBodyData, + LogLineResponseBody, + LogLineResponseBodyData, +) +from .logmultiline import ( + LogMultiLineErrors, + LogMultiLineErrorsTypedDict, + LogMultiLineLogErrors, + LogMultiLineLogErrorsTypedDict, + LogMultiLineLogResponseBody, + LogMultiLineLogResponseBodyData, + LogMultiLineResponseBody, + LogMultiLineResponseBodyData, +) +from .markplayed import ( + MarkPlayedErrors, + MarkPlayedErrorsTypedDict, + MarkPlayedMediaErrors, + MarkPlayedMediaErrorsTypedDict, + MarkPlayedMediaResponseBody, + MarkPlayedMediaResponseBodyData, + MarkPlayedResponseBody, + MarkPlayedResponseBodyData, +) +from .markunplayed import ( + MarkUnplayedErrors, + MarkUnplayedErrorsTypedDict, + MarkUnplayedMediaErrors, + MarkUnplayedMediaErrorsTypedDict, + MarkUnplayedMediaResponseBody, + MarkUnplayedMediaResponseBodyData, + MarkUnplayedResponseBody, + MarkUnplayedResponseBodyData, +) +from .performsearch import ( + PerformSearchErrors, + PerformSearchErrorsTypedDict, + PerformSearchResponseBody, + PerformSearchResponseBodyData, + PerformSearchSearchErrors, + PerformSearchSearchErrorsTypedDict, + PerformSearchSearchResponseBody, + PerformSearchSearchResponseBodyData, +) +from .performvoicesearch import ( + PerformVoiceSearchErrors, + PerformVoiceSearchErrorsTypedDict, + PerformVoiceSearchResponseBody, + PerformVoiceSearchResponseBodyData, + PerformVoiceSearchSearchErrors, + PerformVoiceSearchSearchErrorsTypedDict, + PerformVoiceSearchSearchResponseBody, + PerformVoiceSearchSearchResponseBodyData, +) +from .post_users_sign_in_data import ( + PostUsersSignInDataAuthenticationErrors, + PostUsersSignInDataAuthenticationErrorsTypedDict, + PostUsersSignInDataAuthenticationResponseBody, + PostUsersSignInDataAuthenticationResponseBodyData, + PostUsersSignInDataErrors, + PostUsersSignInDataErrorsTypedDict, + PostUsersSignInDataResponseBody, + PostUsersSignInDataResponseBodyData, +) +from .sdkerror import SDKError +from .startalltasks import ( + StartAllTasksButlerErrors, + StartAllTasksButlerErrorsTypedDict, + StartAllTasksButlerResponseBody, + StartAllTasksButlerResponseBodyData, + StartAllTasksErrors, + StartAllTasksErrorsTypedDict, + StartAllTasksResponseBody, + StartAllTasksResponseBodyData, +) +from .starttask import ( + StartTaskButlerErrors, + StartTaskButlerErrorsTypedDict, + StartTaskButlerResponseBody, + StartTaskButlerResponseBodyData, + StartTaskErrors, + StartTaskErrorsTypedDict, + StartTaskResponseBody, + StartTaskResponseBodyData, +) +from .startuniversaltranscode import ( + StartUniversalTranscodeErrors, + StartUniversalTranscodeErrorsTypedDict, + StartUniversalTranscodeResponseBody, + StartUniversalTranscodeResponseBodyData, + StartUniversalTranscodeVideoErrors, + StartUniversalTranscodeVideoErrorsTypedDict, + StartUniversalTranscodeVideoResponseBody, + StartUniversalTranscodeVideoResponseBodyData, +) +from .stopalltasks import ( + StopAllTasksButlerErrors, + StopAllTasksButlerErrorsTypedDict, + StopAllTasksButlerResponseBody, + StopAllTasksButlerResponseBodyData, + StopAllTasksErrors, + StopAllTasksErrorsTypedDict, + StopAllTasksResponseBody, + StopAllTasksResponseBodyData, +) +from .stoptask import ( + StopTaskButlerErrors, + StopTaskButlerErrorsTypedDict, + StopTaskButlerResponseBody, + StopTaskButlerResponseBodyData, + StopTaskErrors, + StopTaskErrorsTypedDict, + StopTaskResponseBody, + StopTaskResponseBodyData, +) +from .stoptranscodesession import ( + StopTranscodeSessionErrors, + StopTranscodeSessionErrorsTypedDict, + StopTranscodeSessionResponseBody, + StopTranscodeSessionResponseBodyData, + StopTranscodeSessionSessionsErrors, + StopTranscodeSessionSessionsErrorsTypedDict, + StopTranscodeSessionSessionsResponseBody, + StopTranscodeSessionSessionsResponseBodyData, +) +from .updateplaylist import ( + UpdatePlaylistErrors, + UpdatePlaylistErrorsTypedDict, + UpdatePlaylistPlaylistsErrors, + UpdatePlaylistPlaylistsErrorsTypedDict, + UpdatePlaylistPlaylistsResponseBody, + UpdatePlaylistPlaylistsResponseBodyData, + UpdatePlaylistResponseBody, + UpdatePlaylistResponseBodyData, +) +from .updateplayprogress import ( + UpdatePlayProgressErrors, + UpdatePlayProgressErrorsTypedDict, + UpdatePlayProgressMediaErrors, + UpdatePlayProgressMediaErrorsTypedDict, + UpdatePlayProgressMediaResponseBody, + UpdatePlayProgressMediaResponseBodyData, + UpdatePlayProgressResponseBody, + UpdatePlayProgressResponseBodyData, +) +from .uploadplaylist import ( + UploadPlaylistErrors, + UploadPlaylistErrorsTypedDict, + UploadPlaylistPlaylistsErrors, + UploadPlaylistPlaylistsErrorsTypedDict, + UploadPlaylistPlaylistsResponseBody, + UploadPlaylistPlaylistsResponseBodyData, + UploadPlaylistResponseBody, + UploadPlaylistResponseBodyData, +) + +__all__ = [ + "AddPlaylistContentsErrors", + "AddPlaylistContentsErrorsTypedDict", + "AddPlaylistContentsPlaylistsErrors", + "AddPlaylistContentsPlaylistsErrorsTypedDict", + "AddPlaylistContentsPlaylistsResponseBody", + "AddPlaylistContentsPlaylistsResponseBodyData", + "AddPlaylistContentsResponseBody", + "AddPlaylistContentsResponseBodyData", + "ApplyUpdatesErrors", + "ApplyUpdatesErrorsTypedDict", + "ApplyUpdatesResponseBody", + "ApplyUpdatesResponseBodyData", + "ApplyUpdatesUpdaterErrors", + "ApplyUpdatesUpdaterErrorsTypedDict", + "ApplyUpdatesUpdaterResponseBody", + "ApplyUpdatesUpdaterResponseBodyData", + "CancelServerActivitiesActivitiesErrors", + "CancelServerActivitiesActivitiesErrorsTypedDict", + "CancelServerActivitiesActivitiesResponseBody", + "CancelServerActivitiesActivitiesResponseBodyData", + "CancelServerActivitiesErrors", + "CancelServerActivitiesErrorsTypedDict", + "CancelServerActivitiesResponseBody", + "CancelServerActivitiesResponseBodyData", + "CheckForUpdatesErrors", + "CheckForUpdatesErrorsTypedDict", + "CheckForUpdatesResponseBody", + "CheckForUpdatesResponseBodyData", + "CheckForUpdatesUpdaterErrors", + "CheckForUpdatesUpdaterErrorsTypedDict", + "CheckForUpdatesUpdaterResponseBody", + "CheckForUpdatesUpdaterResponseBodyData", + "ClearPlaylistContentsErrors", + "ClearPlaylistContentsErrorsTypedDict", + "ClearPlaylistContentsPlaylistsErrors", + "ClearPlaylistContentsPlaylistsErrorsTypedDict", + "ClearPlaylistContentsPlaylistsResponseBody", + "ClearPlaylistContentsPlaylistsResponseBodyData", + "ClearPlaylistContentsResponseBody", + "ClearPlaylistContentsResponseBodyData", + "CreatePlaylistErrors", + "CreatePlaylistErrorsTypedDict", + "CreatePlaylistPlaylistsErrors", + "CreatePlaylistPlaylistsErrorsTypedDict", + "CreatePlaylistPlaylistsResponseBody", + "CreatePlaylistPlaylistsResponseBodyData", + "CreatePlaylistResponseBody", + "CreatePlaylistResponseBodyData", + "DeleteLibraryErrors", + "DeleteLibraryErrorsTypedDict", + "DeleteLibraryLibraryErrors", + "DeleteLibraryLibraryErrorsTypedDict", + "DeleteLibraryLibraryResponseBody", + "DeleteLibraryLibraryResponseBodyData", + "DeleteLibraryResponseBody", + "DeleteLibraryResponseBodyData", + "DeletePlaylistErrors", + "DeletePlaylistErrorsTypedDict", + "DeletePlaylistPlaylistsErrors", + "DeletePlaylistPlaylistsErrorsTypedDict", + "DeletePlaylistPlaylistsResponseBody", + "DeletePlaylistPlaylistsResponseBodyData", + "DeletePlaylistResponseBody", + "DeletePlaylistResponseBodyData", + "EnablePaperTrailErrors", + "EnablePaperTrailErrorsTypedDict", + "EnablePaperTrailLogErrors", + "EnablePaperTrailLogErrorsTypedDict", + "EnablePaperTrailLogResponseBody", + "EnablePaperTrailLogResponseBodyData", + "EnablePaperTrailResponseBody", + "EnablePaperTrailResponseBodyData", + "Errors", + "ErrorsTypedDict", + "GetAllLibrariesErrors", + "GetAllLibrariesErrorsTypedDict", + "GetAllLibrariesLibraryErrors", + "GetAllLibrariesLibraryErrorsTypedDict", + "GetAllLibrariesLibraryResponseBody", + "GetAllLibrariesLibraryResponseBodyData", + "GetAllLibrariesResponseBody", + "GetAllLibrariesResponseBodyData", + "GetAvailableClientsErrors", + "GetAvailableClientsErrorsTypedDict", + "GetAvailableClientsResponseBody", + "GetAvailableClientsResponseBodyData", + "GetAvailableClientsServerErrors", + "GetAvailableClientsServerErrorsTypedDict", + "GetAvailableClientsServerResponseBody", + "GetAvailableClientsServerResponseBodyData", + "GetBandwidthStatisticsErrors", + "GetBandwidthStatisticsErrorsTypedDict", + "GetBandwidthStatisticsResponseBody", + "GetBandwidthStatisticsResponseBodyData", + "GetBandwidthStatisticsStatisticsErrors", + "GetBandwidthStatisticsStatisticsErrorsTypedDict", + "GetBandwidthStatisticsStatisticsResponseBody", + "GetBandwidthStatisticsStatisticsResponseBodyData", + "GetBannerImageErrors", + "GetBannerImageErrorsTypedDict", + "GetBannerImageMediaErrors", + "GetBannerImageMediaErrorsTypedDict", + "GetBannerImageMediaResponseBody", + "GetBannerImageMediaResponseBodyData", + "GetBannerImageResponseBody", + "GetBannerImageResponseBodyData", + "GetButlerTasksButlerErrors", + "GetButlerTasksButlerErrorsTypedDict", + "GetButlerTasksButlerResponseBody", + "GetButlerTasksButlerResponseBodyData", + "GetButlerTasksErrors", + "GetButlerTasksErrorsTypedDict", + "GetButlerTasksResponseBody", + "GetButlerTasksResponseBodyData", + "GetCompanionsDataErrors", + "GetCompanionsDataErrorsTypedDict", + "GetCompanionsDataPlexErrors", + "GetCompanionsDataPlexErrorsTypedDict", + "GetCompanionsDataPlexResponseBody", + "GetCompanionsDataPlexResponseBodyData", + "GetCompanionsDataResponseBody", + "GetCompanionsDataResponseBodyData", + "GetDevicesErrors", + "GetDevicesErrorsTypedDict", + "GetDevicesResponseBody", + "GetDevicesResponseBodyData", + "GetDevicesServerErrors", + "GetDevicesServerErrorsTypedDict", + "GetDevicesServerResponseBody", + "GetDevicesServerResponseBodyData", + "GetFileHashErrors", + "GetFileHashErrorsTypedDict", + "GetFileHashLibraryErrors", + "GetFileHashLibraryErrorsTypedDict", + "GetFileHashLibraryResponseBody", + "GetFileHashLibraryResponseBodyData", + "GetFileHashResponseBody", + "GetFileHashResponseBodyData", + "GetGeoDataErrors", + "GetGeoDataErrorsTypedDict", + "GetGeoDataPlexErrors", + "GetGeoDataPlexErrorsTypedDict", + "GetGeoDataPlexResponseBody", + "GetGeoDataPlexResponseBodyData", + "GetGeoDataResponseBody", + "GetGeoDataResponseBodyData", + "GetGlobalHubsErrors", + "GetGlobalHubsErrorsTypedDict", + "GetGlobalHubsHubsErrors", + "GetGlobalHubsHubsErrorsTypedDict", + "GetGlobalHubsHubsResponseBody", + "GetGlobalHubsHubsResponseBodyData", + "GetGlobalHubsResponseBody", + "GetGlobalHubsResponseBodyData", + "GetHomeDataErrors", + "GetHomeDataErrorsTypedDict", + "GetHomeDataPlexErrors", + "GetHomeDataPlexErrorsTypedDict", + "GetHomeDataPlexResponseBody", + "GetHomeDataPlexResponseBodyData", + "GetHomeDataResponseBody", + "GetHomeDataResponseBodyData", + "GetLibraryDetailsErrors", + "GetLibraryDetailsErrorsTypedDict", + "GetLibraryDetailsLibraryErrors", + "GetLibraryDetailsLibraryErrorsTypedDict", + "GetLibraryDetailsLibraryResponseBody", + "GetLibraryDetailsLibraryResponseBodyData", + "GetLibraryDetailsResponseBody", + "GetLibraryDetailsResponseBodyData", + "GetLibraryHubsErrors", + "GetLibraryHubsErrorsTypedDict", + "GetLibraryHubsHubsErrors", + "GetLibraryHubsHubsErrorsTypedDict", + "GetLibraryHubsHubsResponseBody", + "GetLibraryHubsHubsResponseBodyData", + "GetLibraryHubsResponseBody", + "GetLibraryHubsResponseBodyData", + "GetLibraryItemsErrors", + "GetLibraryItemsErrorsTypedDict", + "GetLibraryItemsLibraryErrors", + "GetLibraryItemsLibraryErrorsTypedDict", + "GetLibraryItemsLibraryResponseBody", + "GetLibraryItemsLibraryResponseBodyData", + "GetLibraryItemsResponseBody", + "GetLibraryItemsResponseBodyData", + "GetMediaProvidersErrors", + "GetMediaProvidersErrorsTypedDict", + "GetMediaProvidersResponseBody", + "GetMediaProvidersResponseBodyData", + "GetMediaProvidersServerErrors", + "GetMediaProvidersServerErrorsTypedDict", + "GetMediaProvidersServerResponseBody", + "GetMediaProvidersServerResponseBodyData", + "GetMetaDataByRatingKeyErrors", + "GetMetaDataByRatingKeyErrorsTypedDict", + "GetMetaDataByRatingKeyLibraryErrors", + "GetMetaDataByRatingKeyLibraryErrorsTypedDict", + "GetMetaDataByRatingKeyLibraryResponseBody", + "GetMetaDataByRatingKeyLibraryResponseBodyData", + "GetMetaDataByRatingKeyResponseBody", + "GetMetaDataByRatingKeyResponseBodyData", + "GetMetadataChildrenErrors", + "GetMetadataChildrenErrorsTypedDict", + "GetMetadataChildrenLibraryErrors", + "GetMetadataChildrenLibraryErrorsTypedDict", + "GetMetadataChildrenLibraryResponseBody", + "GetMetadataChildrenLibraryResponseBodyData", + "GetMetadataChildrenResponseBody", + "GetMetadataChildrenResponseBodyData", + "GetMyPlexAccountErrors", + "GetMyPlexAccountErrorsTypedDict", + "GetMyPlexAccountResponseBody", + "GetMyPlexAccountResponseBodyData", + "GetMyPlexAccountServerErrors", + "GetMyPlexAccountServerErrorsTypedDict", + "GetMyPlexAccountServerResponseBody", + "GetMyPlexAccountServerResponseBodyData", + "GetOnDeckErrors", + "GetOnDeckErrorsTypedDict", + "GetOnDeckLibraryErrors", + "GetOnDeckLibraryErrorsTypedDict", + "GetOnDeckLibraryResponseBody", + "GetOnDeckLibraryResponseBodyData", + "GetOnDeckResponseBody", + "GetOnDeckResponseBodyData", + "GetPinErrors", + "GetPinErrorsTypedDict", + "GetPinResponseBody", + "GetPinResponseBodyData", + "GetPlaylistContentsErrors", + "GetPlaylistContentsErrorsTypedDict", + "GetPlaylistContentsPlaylistsErrors", + "GetPlaylistContentsPlaylistsErrorsTypedDict", + "GetPlaylistContentsPlaylistsResponseBody", + "GetPlaylistContentsPlaylistsResponseBodyData", + "GetPlaylistContentsResponseBody", + "GetPlaylistContentsResponseBodyData", + "GetPlaylistErrors", + "GetPlaylistErrorsTypedDict", + "GetPlaylistPlaylistsErrors", + "GetPlaylistPlaylistsErrorsTypedDict", + "GetPlaylistPlaylistsResponseBody", + "GetPlaylistPlaylistsResponseBodyData", + "GetPlaylistResponseBody", + "GetPlaylistResponseBodyData", + "GetPlaylistsErrors", + "GetPlaylistsErrorsTypedDict", + "GetPlaylistsPlaylistsErrors", + "GetPlaylistsPlaylistsErrorsTypedDict", + "GetPlaylistsPlaylistsResponseBody", + "GetPlaylistsPlaylistsResponseBodyData", + "GetPlaylistsResponseBody", + "GetPlaylistsResponseBodyData", + "GetRecentlyAddedErrors", + "GetRecentlyAddedErrorsTypedDict", + "GetRecentlyAddedLibraryErrors", + "GetRecentlyAddedLibraryErrorsTypedDict", + "GetRecentlyAddedLibraryResponseBody", + "GetRecentlyAddedLibraryResponseBodyData", + "GetRecentlyAddedResponseBody", + "GetRecentlyAddedResponseBodyData", + "GetRefreshLibraryMetadataErrors", + "GetRefreshLibraryMetadataErrorsTypedDict", + "GetRefreshLibraryMetadataLibraryErrors", + "GetRefreshLibraryMetadataLibraryErrorsTypedDict", + "GetRefreshLibraryMetadataLibraryResponseBody", + "GetRefreshLibraryMetadataLibraryResponseBodyData", + "GetRefreshLibraryMetadataResponseBody", + "GetRefreshLibraryMetadataResponseBodyData", + "GetResizedPhotoErrors", + "GetResizedPhotoErrorsTypedDict", + "GetResizedPhotoResponseBody", + "GetResizedPhotoResponseBodyData", + "GetResizedPhotoServerErrors", + "GetResizedPhotoServerErrorsTypedDict", + "GetResizedPhotoServerResponseBody", + "GetResizedPhotoServerResponseBodyData", + "GetResourcesStatisticsErrors", + "GetResourcesStatisticsErrorsTypedDict", + "GetResourcesStatisticsResponseBody", + "GetResourcesStatisticsResponseBodyData", + "GetResourcesStatisticsStatisticsErrors", + "GetResourcesStatisticsStatisticsErrorsTypedDict", + "GetResourcesStatisticsStatisticsResponseBody", + "GetResourcesStatisticsStatisticsResponseBodyData", + "GetSearchLibraryErrors", + "GetSearchLibraryErrorsTypedDict", + "GetSearchLibraryLibraryErrors", + "GetSearchLibraryLibraryErrorsTypedDict", + "GetSearchLibraryLibraryResponseBody", + "GetSearchLibraryLibraryResponseBodyData", + "GetSearchLibraryResponseBody", + "GetSearchLibraryResponseBodyData", + "GetSearchResultsErrors", + "GetSearchResultsErrorsTypedDict", + "GetSearchResultsResponseBody", + "GetSearchResultsResponseBodyData", + "GetSearchResultsSearchErrors", + "GetSearchResultsSearchErrorsTypedDict", + "GetSearchResultsSearchResponseBody", + "GetSearchResultsSearchResponseBodyData", + "GetServerActivitiesActivitiesErrors", + "GetServerActivitiesActivitiesErrorsTypedDict", + "GetServerActivitiesActivitiesResponseBody", + "GetServerActivitiesActivitiesResponseBodyData", + "GetServerActivitiesErrors", + "GetServerActivitiesErrorsTypedDict", + "GetServerActivitiesResponseBody", + "GetServerActivitiesResponseBodyData", + "GetServerCapabilitiesErrors", + "GetServerCapabilitiesErrorsTypedDict", + "GetServerCapabilitiesResponseBody", + "GetServerCapabilitiesResponseBodyData", + "GetServerCapabilitiesServerResponseBody", + "GetServerCapabilitiesServerResponseBodyData", + "GetServerIdentityResponseBody", + "GetServerIdentityResponseBodyData", + "GetServerListErrors", + "GetServerListErrorsTypedDict", + "GetServerListResponseBody", + "GetServerListResponseBodyData", + "GetServerListServerErrors", + "GetServerListServerErrorsTypedDict", + "GetServerListServerResponseBody", + "GetServerListServerResponseBodyData", + "GetServerPreferencesErrors", + "GetServerPreferencesErrorsTypedDict", + "GetServerPreferencesResponseBody", + "GetServerPreferencesResponseBodyData", + "GetServerPreferencesServerErrors", + "GetServerPreferencesServerErrorsTypedDict", + "GetServerPreferencesServerResponseBody", + "GetServerPreferencesServerResponseBodyData", + "GetServerResourcesErrors", + "GetServerResourcesErrorsTypedDict", + "GetServerResourcesPlexErrors", + "GetServerResourcesPlexErrorsTypedDict", + "GetServerResourcesPlexResponseBody", + "GetServerResourcesPlexResponseBodyData", + "GetServerResourcesResponseBody", + "GetServerResourcesResponseBodyData", + "GetSessionHistoryErrors", + "GetSessionHistoryErrorsTypedDict", + "GetSessionHistoryResponseBody", + "GetSessionHistoryResponseBodyData", + "GetSessionHistorySessionsErrors", + "GetSessionHistorySessionsErrorsTypedDict", + "GetSessionHistorySessionsResponseBody", + "GetSessionHistorySessionsResponseBodyData", + "GetSessionsErrors", + "GetSessionsErrorsTypedDict", + "GetSessionsResponseBody", + "GetSessionsResponseBodyData", + "GetSessionsSessionsErrors", + "GetSessionsSessionsErrorsTypedDict", + "GetSessionsSessionsResponseBody", + "GetSessionsSessionsResponseBodyData", + "GetSourceConnectionInformationAuthenticationErrors", + "GetSourceConnectionInformationAuthenticationErrorsTypedDict", + "GetSourceConnectionInformationAuthenticationResponseBody", + "GetSourceConnectionInformationAuthenticationResponseBodyData", + "GetSourceConnectionInformationErrors", + "GetSourceConnectionInformationErrorsTypedDict", + "GetSourceConnectionInformationResponseBody", + "GetSourceConnectionInformationResponseBodyData", + "GetStatisticsErrors", + "GetStatisticsErrorsTypedDict", + "GetStatisticsResponseBody", + "GetStatisticsResponseBodyData", + "GetStatisticsStatisticsErrors", + "GetStatisticsStatisticsErrorsTypedDict", + "GetStatisticsStatisticsResponseBody", + "GetStatisticsStatisticsResponseBodyData", + "GetThumbImageErrors", + "GetThumbImageErrorsTypedDict", + "GetThumbImageMediaErrors", + "GetThumbImageMediaErrorsTypedDict", + "GetThumbImageMediaResponseBody", + "GetThumbImageMediaResponseBodyData", + "GetThumbImageResponseBody", + "GetThumbImageResponseBodyData", + "GetTimelineErrors", + "GetTimelineErrorsTypedDict", + "GetTimelineResponseBody", + "GetTimelineResponseBodyData", + "GetTimelineVideoErrors", + "GetTimelineVideoErrorsTypedDict", + "GetTimelineVideoResponseBody", + "GetTimelineVideoResponseBodyData", + "GetTokenByPinIDErrors", + "GetTokenByPinIDErrorsTypedDict", + "GetTokenByPinIDPlexErrors", + "GetTokenByPinIDPlexErrorsTypedDict", + "GetTokenByPinIDPlexResponseBody", + "GetTokenByPinIDPlexResponseBodyData", + "GetTokenByPinIDResponseBody", + "GetTokenByPinIDResponseBodyData", + "GetTopWatchedContentErrors", + "GetTopWatchedContentErrorsTypedDict", + "GetTopWatchedContentLibraryErrors", + "GetTopWatchedContentLibraryErrorsTypedDict", + "GetTopWatchedContentLibraryResponseBody", + "GetTopWatchedContentLibraryResponseBodyData", + "GetTopWatchedContentResponseBody", + "GetTopWatchedContentResponseBodyData", + "GetTranscodeSessionsErrors", + "GetTranscodeSessionsErrorsTypedDict", + "GetTranscodeSessionsResponseBody", + "GetTranscodeSessionsResponseBodyData", + "GetTranscodeSessionsSessionsErrors", + "GetTranscodeSessionsSessionsErrorsTypedDict", + "GetTranscodeSessionsSessionsResponseBody", + "GetTranscodeSessionsSessionsResponseBodyData", + "GetTransientTokenAuthenticationErrors", + "GetTransientTokenAuthenticationErrorsTypedDict", + "GetTransientTokenAuthenticationResponseBody", + "GetTransientTokenAuthenticationResponseBodyData", + "GetTransientTokenErrors", + "GetTransientTokenErrorsTypedDict", + "GetTransientTokenResponseBody", + "GetTransientTokenResponseBodyData", + "GetUpdateStatusErrors", + "GetUpdateStatusErrorsTypedDict", + "GetUpdateStatusResponseBody", + "GetUpdateStatusResponseBodyData", + "GetUpdateStatusUpdaterErrors", + "GetUpdateStatusUpdaterErrorsTypedDict", + "GetUpdateStatusUpdaterResponseBody", + "GetUpdateStatusUpdaterResponseBodyData", + "GetUserDetailsAuthenticationErrors", + "GetUserDetailsAuthenticationErrorsTypedDict", + "GetUserDetailsAuthenticationResponseBody", + "GetUserDetailsAuthenticationResponseBodyData", + "GetUserDetailsErrors", + "GetUserDetailsErrorsTypedDict", + "GetUserDetailsResponseBody", + "GetUserDetailsResponseBodyData", + "GetUserFriendsErrors", + "GetUserFriendsErrorsTypedDict", + "GetUserFriendsPlexErrors", + "GetUserFriendsPlexErrorsTypedDict", + "GetUserFriendsPlexResponseBody", + "GetUserFriendsPlexResponseBodyData", + "GetUserFriendsResponseBody", + "GetUserFriendsResponseBodyData", + "GetWatchListErrors", + "GetWatchListErrorsTypedDict", + "GetWatchListResponseBody", + "GetWatchListResponseBodyData", + "GetWatchListWatchlistErrors", + "GetWatchListWatchlistErrorsTypedDict", + "GetWatchListWatchlistResponseBody", + "GetWatchListWatchlistResponseBodyData", + "LogLineErrors", + "LogLineErrorsTypedDict", + "LogLineLogErrors", + "LogLineLogErrorsTypedDict", + "LogLineLogResponseBody", + "LogLineLogResponseBodyData", + "LogLineResponseBody", + "LogLineResponseBodyData", + "LogMultiLineErrors", + "LogMultiLineErrorsTypedDict", + "LogMultiLineLogErrors", + "LogMultiLineLogErrorsTypedDict", + "LogMultiLineLogResponseBody", + "LogMultiLineLogResponseBodyData", + "LogMultiLineResponseBody", + "LogMultiLineResponseBodyData", + "MarkPlayedErrors", + "MarkPlayedErrorsTypedDict", + "MarkPlayedMediaErrors", + "MarkPlayedMediaErrorsTypedDict", + "MarkPlayedMediaResponseBody", + "MarkPlayedMediaResponseBodyData", + "MarkPlayedResponseBody", + "MarkPlayedResponseBodyData", + "MarkUnplayedErrors", + "MarkUnplayedErrorsTypedDict", + "MarkUnplayedMediaErrors", + "MarkUnplayedMediaErrorsTypedDict", + "MarkUnplayedMediaResponseBody", + "MarkUnplayedMediaResponseBodyData", + "MarkUnplayedResponseBody", + "MarkUnplayedResponseBodyData", + "PerformSearchErrors", + "PerformSearchErrorsTypedDict", + "PerformSearchResponseBody", + "PerformSearchResponseBodyData", + "PerformSearchSearchErrors", + "PerformSearchSearchErrorsTypedDict", + "PerformSearchSearchResponseBody", + "PerformSearchSearchResponseBodyData", + "PerformVoiceSearchErrors", + "PerformVoiceSearchErrorsTypedDict", + "PerformVoiceSearchResponseBody", + "PerformVoiceSearchResponseBodyData", + "PerformVoiceSearchSearchErrors", + "PerformVoiceSearchSearchErrorsTypedDict", + "PerformVoiceSearchSearchResponseBody", + "PerformVoiceSearchSearchResponseBodyData", + "PostUsersSignInDataAuthenticationErrors", + "PostUsersSignInDataAuthenticationErrorsTypedDict", + "PostUsersSignInDataAuthenticationResponseBody", + "PostUsersSignInDataAuthenticationResponseBodyData", + "PostUsersSignInDataErrors", + "PostUsersSignInDataErrorsTypedDict", + "PostUsersSignInDataResponseBody", + "PostUsersSignInDataResponseBodyData", + "SDKError", + "StartAllTasksButlerErrors", + "StartAllTasksButlerErrorsTypedDict", + "StartAllTasksButlerResponseBody", + "StartAllTasksButlerResponseBodyData", + "StartAllTasksErrors", + "StartAllTasksErrorsTypedDict", + "StartAllTasksResponseBody", + "StartAllTasksResponseBodyData", + "StartTaskButlerErrors", + "StartTaskButlerErrorsTypedDict", + "StartTaskButlerResponseBody", + "StartTaskButlerResponseBodyData", + "StartTaskErrors", + "StartTaskErrorsTypedDict", + "StartTaskResponseBody", + "StartTaskResponseBodyData", + "StartUniversalTranscodeErrors", + "StartUniversalTranscodeErrorsTypedDict", + "StartUniversalTranscodeResponseBody", + "StartUniversalTranscodeResponseBodyData", + "StartUniversalTranscodeVideoErrors", + "StartUniversalTranscodeVideoErrorsTypedDict", + "StartUniversalTranscodeVideoResponseBody", + "StartUniversalTranscodeVideoResponseBodyData", + "StopAllTasksButlerErrors", + "StopAllTasksButlerErrorsTypedDict", + "StopAllTasksButlerResponseBody", + "StopAllTasksButlerResponseBodyData", + "StopAllTasksErrors", + "StopAllTasksErrorsTypedDict", + "StopAllTasksResponseBody", + "StopAllTasksResponseBodyData", + "StopTaskButlerErrors", + "StopTaskButlerErrorsTypedDict", + "StopTaskButlerResponseBody", + "StopTaskButlerResponseBodyData", + "StopTaskErrors", + "StopTaskErrorsTypedDict", + "StopTaskResponseBody", + "StopTaskResponseBodyData", + "StopTranscodeSessionErrors", + "StopTranscodeSessionErrorsTypedDict", + "StopTranscodeSessionResponseBody", + "StopTranscodeSessionResponseBodyData", + "StopTranscodeSessionSessionsErrors", + "StopTranscodeSessionSessionsErrorsTypedDict", + "StopTranscodeSessionSessionsResponseBody", + "StopTranscodeSessionSessionsResponseBodyData", + "UpdatePlayProgressErrors", + "UpdatePlayProgressErrorsTypedDict", + "UpdatePlayProgressMediaErrors", + "UpdatePlayProgressMediaErrorsTypedDict", + "UpdatePlayProgressMediaResponseBody", + "UpdatePlayProgressMediaResponseBodyData", + "UpdatePlayProgressResponseBody", + "UpdatePlayProgressResponseBodyData", + "UpdatePlaylistErrors", + "UpdatePlaylistErrorsTypedDict", + "UpdatePlaylistPlaylistsErrors", + "UpdatePlaylistPlaylistsErrorsTypedDict", + "UpdatePlaylistPlaylistsResponseBody", + "UpdatePlaylistPlaylistsResponseBodyData", + "UpdatePlaylistResponseBody", + "UpdatePlaylistResponseBodyData", + "UploadPlaylistErrors", + "UploadPlaylistErrorsTypedDict", + "UploadPlaylistPlaylistsErrors", + "UploadPlaylistPlaylistsErrorsTypedDict", + "UploadPlaylistPlaylistsResponseBody", + "UploadPlaylistPlaylistsResponseBodyData", + "UploadPlaylistResponseBody", + "UploadPlaylistResponseBodyData", +] diff --git a/src/plex_api_client/models/errors/addplaylistcontents.py b/src/plex_api_client/models/errors/addplaylistcontents.py new file mode 100644 index 0000000..255b253 --- /dev/null +++ b/src/plex_api_client/models/errors/addplaylistcontents.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AddPlaylistContentsPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class AddPlaylistContentsPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class AddPlaylistContentsPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[AddPlaylistContentsPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class AddPlaylistContentsPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: AddPlaylistContentsPlaylistsResponseBodyData + + def __init__(self, data: AddPlaylistContentsPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, AddPlaylistContentsPlaylistsResponseBodyData + ) + + +class AddPlaylistContentsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class AddPlaylistContentsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class AddPlaylistContentsResponseBodyData(BaseModel): + errors: Optional[List[AddPlaylistContentsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class AddPlaylistContentsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: AddPlaylistContentsResponseBodyData + + def __init__(self, data: AddPlaylistContentsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, AddPlaylistContentsResponseBodyData) diff --git a/src/plex_api_client/models/errors/applyupdates.py b/src/plex_api_client/models/errors/applyupdates.py new file mode 100644 index 0000000..1595ce5 --- /dev/null +++ b/src/plex_api_client/models/errors/applyupdates.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ApplyUpdatesUpdaterErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class ApplyUpdatesUpdaterErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class ApplyUpdatesUpdaterResponseBodyData(BaseModel): + errors: Optional[List[ApplyUpdatesUpdaterErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ApplyUpdatesUpdaterResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: ApplyUpdatesUpdaterResponseBodyData + + def __init__(self, data: ApplyUpdatesUpdaterResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, ApplyUpdatesUpdaterResponseBodyData) + + +class ApplyUpdatesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class ApplyUpdatesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class ApplyUpdatesResponseBodyData(BaseModel): + errors: Optional[List[ApplyUpdatesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ApplyUpdatesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: ApplyUpdatesResponseBodyData + + def __init__(self, data: ApplyUpdatesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, ApplyUpdatesResponseBodyData) diff --git a/src/plex_api_client/models/errors/cancelserveractivities.py b/src/plex_api_client/models/errors/cancelserveractivities.py new file mode 100644 index 0000000..5c345d0 --- /dev/null +++ b/src/plex_api_client/models/errors/cancelserveractivities.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class CancelServerActivitiesActivitiesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CancelServerActivitiesActivitiesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CancelServerActivitiesActivitiesResponseBodyData(BaseModel): + errors: Optional[List[CancelServerActivitiesActivitiesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CancelServerActivitiesActivitiesResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: CancelServerActivitiesActivitiesResponseBodyData + + def __init__(self, data: CancelServerActivitiesActivitiesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, CancelServerActivitiesActivitiesResponseBodyData + ) + + +class CancelServerActivitiesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CancelServerActivitiesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CancelServerActivitiesResponseBodyData(BaseModel): + errors: Optional[List[CancelServerActivitiesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CancelServerActivitiesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: CancelServerActivitiesResponseBodyData + + def __init__(self, data: CancelServerActivitiesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, CancelServerActivitiesResponseBodyData) diff --git a/src/plex_api_client/models/errors/checkforupdates.py b/src/plex_api_client/models/errors/checkforupdates.py new file mode 100644 index 0000000..8b174ba --- /dev/null +++ b/src/plex_api_client/models/errors/checkforupdates.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class CheckForUpdatesUpdaterErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CheckForUpdatesUpdaterErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CheckForUpdatesUpdaterResponseBodyData(BaseModel): + errors: Optional[List[CheckForUpdatesUpdaterErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CheckForUpdatesUpdaterResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: CheckForUpdatesUpdaterResponseBodyData + + def __init__(self, data: CheckForUpdatesUpdaterResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, CheckForUpdatesUpdaterResponseBodyData) + + +class CheckForUpdatesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CheckForUpdatesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CheckForUpdatesResponseBodyData(BaseModel): + errors: Optional[List[CheckForUpdatesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CheckForUpdatesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: CheckForUpdatesResponseBodyData + + def __init__(self, data: CheckForUpdatesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, CheckForUpdatesResponseBodyData) diff --git a/src/plex_api_client/models/errors/clearplaylistcontents.py b/src/plex_api_client/models/errors/clearplaylistcontents.py new file mode 100644 index 0000000..3be54c8 --- /dev/null +++ b/src/plex_api_client/models/errors/clearplaylistcontents.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ClearPlaylistContentsPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class ClearPlaylistContentsPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class ClearPlaylistContentsPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[ClearPlaylistContentsPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ClearPlaylistContentsPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: ClearPlaylistContentsPlaylistsResponseBodyData + + def __init__(self, data: ClearPlaylistContentsPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, ClearPlaylistContentsPlaylistsResponseBodyData + ) + + +class ClearPlaylistContentsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class ClearPlaylistContentsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class ClearPlaylistContentsResponseBodyData(BaseModel): + errors: Optional[List[ClearPlaylistContentsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ClearPlaylistContentsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: ClearPlaylistContentsResponseBodyData + + def __init__(self, data: ClearPlaylistContentsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, ClearPlaylistContentsResponseBodyData) diff --git a/src/plex_api_client/models/errors/createplaylist.py b/src/plex_api_client/models/errors/createplaylist.py new file mode 100644 index 0000000..34e4558 --- /dev/null +++ b/src/plex_api_client/models/errors/createplaylist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class CreatePlaylistPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CreatePlaylistPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CreatePlaylistPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[CreatePlaylistPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CreatePlaylistPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: CreatePlaylistPlaylistsResponseBodyData + + def __init__(self, data: CreatePlaylistPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, CreatePlaylistPlaylistsResponseBodyData) + + +class CreatePlaylistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class CreatePlaylistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class CreatePlaylistResponseBodyData(BaseModel): + errors: Optional[List[CreatePlaylistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CreatePlaylistResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: CreatePlaylistResponseBodyData + + def __init__(self, data: CreatePlaylistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, CreatePlaylistResponseBodyData) diff --git a/src/plex_api_client/models/errors/deletelibrary.py b/src/plex_api_client/models/errors/deletelibrary.py new file mode 100644 index 0000000..5c34cc9 --- /dev/null +++ b/src/plex_api_client/models/errors/deletelibrary.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class DeleteLibraryLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class DeleteLibraryLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class DeleteLibraryLibraryResponseBodyData(BaseModel): + errors: Optional[List[DeleteLibraryLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeleteLibraryLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: DeleteLibraryLibraryResponseBodyData + + def __init__(self, data: DeleteLibraryLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, DeleteLibraryLibraryResponseBodyData) + + +class DeleteLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class DeleteLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class DeleteLibraryResponseBodyData(BaseModel): + errors: Optional[List[DeleteLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeleteLibraryResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: DeleteLibraryResponseBodyData + + def __init__(self, data: DeleteLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, DeleteLibraryResponseBodyData) diff --git a/src/plex_api_client/models/errors/deleteplaylist.py b/src/plex_api_client/models/errors/deleteplaylist.py new file mode 100644 index 0000000..bc616b1 --- /dev/null +++ b/src/plex_api_client/models/errors/deleteplaylist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class DeletePlaylistPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class DeletePlaylistPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class DeletePlaylistPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[DeletePlaylistPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeletePlaylistPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: DeletePlaylistPlaylistsResponseBodyData + + def __init__(self, data: DeletePlaylistPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, DeletePlaylistPlaylistsResponseBodyData) + + +class DeletePlaylistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class DeletePlaylistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class DeletePlaylistResponseBodyData(BaseModel): + errors: Optional[List[DeletePlaylistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeletePlaylistResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: DeletePlaylistResponseBodyData + + def __init__(self, data: DeletePlaylistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, DeletePlaylistResponseBodyData) diff --git a/src/plex_api_client/models/errors/enablepapertrail.py b/src/plex_api_client/models/errors/enablepapertrail.py new file mode 100644 index 0000000..089a201 --- /dev/null +++ b/src/plex_api_client/models/errors/enablepapertrail.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class EnablePaperTrailLogErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class EnablePaperTrailLogErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class EnablePaperTrailLogResponseBodyData(BaseModel): + errors: Optional[List[EnablePaperTrailLogErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class EnablePaperTrailLogResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: EnablePaperTrailLogResponseBodyData + + def __init__(self, data: EnablePaperTrailLogResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, EnablePaperTrailLogResponseBodyData) + + +class EnablePaperTrailErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class EnablePaperTrailErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class EnablePaperTrailResponseBodyData(BaseModel): + errors: Optional[List[EnablePaperTrailErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class EnablePaperTrailResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: EnablePaperTrailResponseBodyData + + def __init__(self, data: EnablePaperTrailResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, EnablePaperTrailResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_all_libraries.py b/src/plex_api_client/models/errors/get_all_libraries.py new file mode 100644 index 0000000..f5f626e --- /dev/null +++ b/src/plex_api_client/models/errors/get_all_libraries.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetAllLibrariesLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetAllLibrariesLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetAllLibrariesLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetAllLibrariesLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetAllLibrariesLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetAllLibrariesLibraryResponseBodyData + + def __init__(self, data: GetAllLibrariesLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetAllLibrariesLibraryResponseBodyData) + + +class GetAllLibrariesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetAllLibrariesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetAllLibrariesResponseBodyData(BaseModel): + errors: Optional[List[GetAllLibrariesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetAllLibrariesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetAllLibrariesResponseBodyData + + def __init__(self, data: GetAllLibrariesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetAllLibrariesResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_banner_image.py b/src/plex_api_client/models/errors/get_banner_image.py new file mode 100644 index 0000000..2cd2695 --- /dev/null +++ b/src/plex_api_client/models/errors/get_banner_image.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetBannerImageMediaErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetBannerImageMediaErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetBannerImageMediaResponseBodyData(BaseModel): + errors: Optional[List[GetBannerImageMediaErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetBannerImageMediaResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetBannerImageMediaResponseBodyData + + def __init__(self, data: GetBannerImageMediaResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetBannerImageMediaResponseBodyData) + + +class GetBannerImageErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetBannerImageErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetBannerImageResponseBodyData(BaseModel): + errors: Optional[List[GetBannerImageErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetBannerImageResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetBannerImageResponseBodyData + + def __init__(self, data: GetBannerImageResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetBannerImageResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_library_details.py b/src/plex_api_client/models/errors/get_library_details.py new file mode 100644 index 0000000..298ad47 --- /dev/null +++ b/src/plex_api_client/models/errors/get_library_details.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetLibraryDetailsLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryDetailsLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryDetailsLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryDetailsLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryDetailsLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetLibraryDetailsLibraryResponseBodyData + + def __init__(self, data: GetLibraryDetailsLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryDetailsLibraryResponseBodyData) + + +class GetLibraryDetailsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryDetailsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryDetailsResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryDetailsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryDetailsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetLibraryDetailsResponseBodyData + + def __init__(self, data: GetLibraryDetailsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryDetailsResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_library_items.py b/src/plex_api_client/models/errors/get_library_items.py new file mode 100644 index 0000000..22a7455 --- /dev/null +++ b/src/plex_api_client/models/errors/get_library_items.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetLibraryItemsLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryItemsLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryItemsLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryItemsLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryItemsLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetLibraryItemsLibraryResponseBodyData + + def __init__(self, data: GetLibraryItemsLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryItemsLibraryResponseBodyData) + + +class GetLibraryItemsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryItemsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryItemsResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryItemsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryItemsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetLibraryItemsResponseBodyData + + def __init__(self, data: GetLibraryItemsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryItemsResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_media_providers.py b/src/plex_api_client/models/errors/get_media_providers.py new file mode 100644 index 0000000..3d433d6 --- /dev/null +++ b/src/plex_api_client/models/errors/get_media_providers.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMediaProvidersServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMediaProvidersServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMediaProvidersServerResponseBodyData(BaseModel): + errors: Optional[List[GetMediaProvidersServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMediaProvidersServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetMediaProvidersServerResponseBodyData + + def __init__(self, data: GetMediaProvidersServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMediaProvidersServerResponseBodyData) + + +class GetMediaProvidersErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMediaProvidersErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMediaProvidersResponseBodyData(BaseModel): + errors: Optional[List[GetMediaProvidersErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMediaProvidersResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetMediaProvidersResponseBodyData + + def __init__(self, data: GetMediaProvidersResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMediaProvidersResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_meta_data_by_rating_key.py b/src/plex_api_client/models/errors/get_meta_data_by_rating_key.py new file mode 100644 index 0000000..2f1660a --- /dev/null +++ b/src/plex_api_client/models/errors/get_meta_data_by_rating_key.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMetaDataByRatingKeyLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMetaDataByRatingKeyLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMetaDataByRatingKeyLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetMetaDataByRatingKeyLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMetaDataByRatingKeyLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetMetaDataByRatingKeyLibraryResponseBodyData + + def __init__(self, data: GetMetaDataByRatingKeyLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetMetaDataByRatingKeyLibraryResponseBodyData + ) + + +class GetMetaDataByRatingKeyErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMetaDataByRatingKeyErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMetaDataByRatingKeyResponseBodyData(BaseModel): + errors: Optional[List[GetMetaDataByRatingKeyErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMetaDataByRatingKeyResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetMetaDataByRatingKeyResponseBodyData + + def __init__(self, data: GetMetaDataByRatingKeyResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMetaDataByRatingKeyResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_refresh_library_metadata.py b/src/plex_api_client/models/errors/get_refresh_library_metadata.py new file mode 100644 index 0000000..c3e9c82 --- /dev/null +++ b/src/plex_api_client/models/errors/get_refresh_library_metadata.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetRefreshLibraryMetadataLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetRefreshLibraryMetadataLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetRefreshLibraryMetadataLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetRefreshLibraryMetadataLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetRefreshLibraryMetadataLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetRefreshLibraryMetadataLibraryResponseBodyData + + def __init__(self, data: GetRefreshLibraryMetadataLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetRefreshLibraryMetadataLibraryResponseBodyData + ) + + +class GetRefreshLibraryMetadataErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetRefreshLibraryMetadataErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetRefreshLibraryMetadataResponseBodyData(BaseModel): + errors: Optional[List[GetRefreshLibraryMetadataErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetRefreshLibraryMetadataResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetRefreshLibraryMetadataResponseBodyData + + def __init__(self, data: GetRefreshLibraryMetadataResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetRefreshLibraryMetadataResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_search_library.py b/src/plex_api_client/models/errors/get_search_library.py new file mode 100644 index 0000000..437f1b1 --- /dev/null +++ b/src/plex_api_client/models/errors/get_search_library.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSearchLibraryLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSearchLibraryLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSearchLibraryLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetSearchLibraryLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSearchLibraryLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetSearchLibraryLibraryResponseBodyData + + def __init__(self, data: GetSearchLibraryLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSearchLibraryLibraryResponseBodyData) + + +class GetSearchLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSearchLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSearchLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetSearchLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSearchLibraryResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetSearchLibraryResponseBodyData + + def __init__(self, data: GetSearchLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSearchLibraryResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_server_identity.py b/src/plex_api_client/models/errors/get_server_identity.py new file mode 100644 index 0000000..0b8dbbf --- /dev/null +++ b/src/plex_api_client/models/errors/get_server_identity.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import Optional +from typing_extensions import Annotated + + +class GetServerIdentityResponseBodyData(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerIdentityResponseBody(Exception): + r"""Request Timeout""" + + data: GetServerIdentityResponseBodyData + + def __init__(self, data: GetServerIdentityResponseBodyData): + self.data = data + + def __str__(self) -> str: + return self.data.message if self.data.message is not None else "unknown error" diff --git a/src/plex_api_client/models/errors/get_server_resources.py b/src/plex_api_client/models/errors/get_server_resources.py new file mode 100644 index 0000000..b4eb5ff --- /dev/null +++ b/src/plex_api_client/models/errors/get_server_resources.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerResourcesPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerResourcesPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerResourcesPlexResponseBodyData(BaseModel): + errors: Optional[List[GetServerResourcesPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerResourcesPlexResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetServerResourcesPlexResponseBodyData + + def __init__(self, data: GetServerResourcesPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerResourcesPlexResponseBodyData) + + +class GetServerResourcesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerResourcesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerResourcesResponseBodyData(BaseModel): + errors: Optional[List[GetServerResourcesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerResourcesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetServerResourcesResponseBodyData + + def __init__(self, data: GetServerResourcesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerResourcesResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_thumb_image.py b/src/plex_api_client/models/errors/get_thumb_image.py new file mode 100644 index 0000000..af995bd --- /dev/null +++ b/src/plex_api_client/models/errors/get_thumb_image.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetThumbImageMediaErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetThumbImageMediaErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetThumbImageMediaResponseBodyData(BaseModel): + errors: Optional[List[GetThumbImageMediaErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetThumbImageMediaResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetThumbImageMediaResponseBodyData + + def __init__(self, data: GetThumbImageMediaResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetThumbImageMediaResponseBodyData) + + +class GetThumbImageErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetThumbImageErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetThumbImageResponseBodyData(BaseModel): + errors: Optional[List[GetThumbImageErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetThumbImageResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetThumbImageResponseBodyData + + def __init__(self, data: GetThumbImageResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetThumbImageResponseBodyData) diff --git a/src/plex_api_client/models/errors/get_watch_list.py b/src/plex_api_client/models/errors/get_watch_list.py new file mode 100644 index 0000000..09ae963 --- /dev/null +++ b/src/plex_api_client/models/errors/get_watch_list.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetWatchListWatchlistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetWatchListWatchlistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetWatchListWatchlistResponseBodyData(BaseModel): + errors: Optional[List[GetWatchListWatchlistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetWatchListWatchlistResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetWatchListWatchlistResponseBodyData + + def __init__(self, data: GetWatchListWatchlistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetWatchListWatchlistResponseBodyData) + + +class GetWatchListErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetWatchListErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetWatchListResponseBodyData(BaseModel): + errors: Optional[List[GetWatchListErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetWatchListResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetWatchListResponseBodyData + + def __init__(self, data: GetWatchListResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetWatchListResponseBodyData) diff --git a/src/plex_api_client/models/errors/getavailableclients.py b/src/plex_api_client/models/errors/getavailableclients.py new file mode 100644 index 0000000..4f701f5 --- /dev/null +++ b/src/plex_api_client/models/errors/getavailableclients.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetAvailableClientsServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetAvailableClientsServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetAvailableClientsServerResponseBodyData(BaseModel): + errors: Optional[List[GetAvailableClientsServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetAvailableClientsServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetAvailableClientsServerResponseBodyData + + def __init__(self, data: GetAvailableClientsServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetAvailableClientsServerResponseBodyData) + + +class GetAvailableClientsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetAvailableClientsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetAvailableClientsResponseBodyData(BaseModel): + errors: Optional[List[GetAvailableClientsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetAvailableClientsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetAvailableClientsResponseBodyData + + def __init__(self, data: GetAvailableClientsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetAvailableClientsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getbandwidthstatistics.py b/src/plex_api_client/models/errors/getbandwidthstatistics.py new file mode 100644 index 0000000..f27a8ff --- /dev/null +++ b/src/plex_api_client/models/errors/getbandwidthstatistics.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetBandwidthStatisticsStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetBandwidthStatisticsStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetBandwidthStatisticsStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetBandwidthStatisticsStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetBandwidthStatisticsStatisticsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetBandwidthStatisticsStatisticsResponseBodyData + + def __init__(self, data: GetBandwidthStatisticsStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetBandwidthStatisticsStatisticsResponseBodyData + ) + + +class GetBandwidthStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetBandwidthStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetBandwidthStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetBandwidthStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetBandwidthStatisticsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetBandwidthStatisticsResponseBodyData + + def __init__(self, data: GetBandwidthStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetBandwidthStatisticsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getbutlertasks.py b/src/plex_api_client/models/errors/getbutlertasks.py new file mode 100644 index 0000000..4264c96 --- /dev/null +++ b/src/plex_api_client/models/errors/getbutlertasks.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetButlerTasksButlerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetButlerTasksButlerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetButlerTasksButlerResponseBodyData(BaseModel): + errors: Optional[List[GetButlerTasksButlerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetButlerTasksButlerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetButlerTasksButlerResponseBodyData + + def __init__(self, data: GetButlerTasksButlerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetButlerTasksButlerResponseBodyData) + + +class GetButlerTasksErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetButlerTasksErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetButlerTasksResponseBodyData(BaseModel): + errors: Optional[List[GetButlerTasksErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetButlerTasksResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetButlerTasksResponseBodyData + + def __init__(self, data: GetButlerTasksResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetButlerTasksResponseBodyData) diff --git a/src/plex_api_client/models/errors/getcompanionsdata.py b/src/plex_api_client/models/errors/getcompanionsdata.py new file mode 100644 index 0000000..97c5d14 --- /dev/null +++ b/src/plex_api_client/models/errors/getcompanionsdata.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetCompanionsDataPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetCompanionsDataPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetCompanionsDataPlexResponseBodyData(BaseModel): + errors: Optional[List[GetCompanionsDataPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetCompanionsDataPlexResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetCompanionsDataPlexResponseBodyData + + def __init__(self, data: GetCompanionsDataPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetCompanionsDataPlexResponseBodyData) + + +class GetCompanionsDataErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetCompanionsDataErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetCompanionsDataResponseBodyData(BaseModel): + errors: Optional[List[GetCompanionsDataErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetCompanionsDataResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetCompanionsDataResponseBodyData + + def __init__(self, data: GetCompanionsDataResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetCompanionsDataResponseBodyData) diff --git a/src/plex_api_client/models/errors/getdevices.py b/src/plex_api_client/models/errors/getdevices.py new file mode 100644 index 0000000..a8dd70a --- /dev/null +++ b/src/plex_api_client/models/errors/getdevices.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetDevicesServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetDevicesServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetDevicesServerResponseBodyData(BaseModel): + errors: Optional[List[GetDevicesServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetDevicesServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetDevicesServerResponseBodyData + + def __init__(self, data: GetDevicesServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetDevicesServerResponseBodyData) + + +class GetDevicesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetDevicesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetDevicesResponseBodyData(BaseModel): + errors: Optional[List[GetDevicesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetDevicesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetDevicesResponseBodyData + + def __init__(self, data: GetDevicesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetDevicesResponseBodyData) diff --git a/src/plex_api_client/models/errors/getfilehash.py b/src/plex_api_client/models/errors/getfilehash.py new file mode 100644 index 0000000..cc1a3fd --- /dev/null +++ b/src/plex_api_client/models/errors/getfilehash.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetFileHashLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetFileHashLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetFileHashLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetFileHashLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetFileHashLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetFileHashLibraryResponseBodyData + + def __init__(self, data: GetFileHashLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetFileHashLibraryResponseBodyData) + + +class GetFileHashErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetFileHashErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetFileHashResponseBodyData(BaseModel): + errors: Optional[List[GetFileHashErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetFileHashResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetFileHashResponseBodyData + + def __init__(self, data: GetFileHashResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetFileHashResponseBodyData) diff --git a/src/plex_api_client/models/errors/getgeodata.py b/src/plex_api_client/models/errors/getgeodata.py new file mode 100644 index 0000000..54c04c8 --- /dev/null +++ b/src/plex_api_client/models/errors/getgeodata.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetGeoDataPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetGeoDataPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetGeoDataPlexResponseBodyData(BaseModel): + errors: Optional[List[GetGeoDataPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetGeoDataPlexResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetGeoDataPlexResponseBodyData + + def __init__(self, data: GetGeoDataPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetGeoDataPlexResponseBodyData) + + +class GetGeoDataErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetGeoDataErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetGeoDataResponseBodyData(BaseModel): + errors: Optional[List[GetGeoDataErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetGeoDataResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetGeoDataResponseBodyData + + def __init__(self, data: GetGeoDataResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetGeoDataResponseBodyData) diff --git a/src/plex_api_client/models/errors/getglobalhubs.py b/src/plex_api_client/models/errors/getglobalhubs.py new file mode 100644 index 0000000..432bf1c --- /dev/null +++ b/src/plex_api_client/models/errors/getglobalhubs.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetGlobalHubsHubsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetGlobalHubsHubsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetGlobalHubsHubsResponseBodyData(BaseModel): + errors: Optional[List[GetGlobalHubsHubsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetGlobalHubsHubsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetGlobalHubsHubsResponseBodyData + + def __init__(self, data: GetGlobalHubsHubsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetGlobalHubsHubsResponseBodyData) + + +class GetGlobalHubsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetGlobalHubsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetGlobalHubsResponseBodyData(BaseModel): + errors: Optional[List[GetGlobalHubsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetGlobalHubsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetGlobalHubsResponseBodyData + + def __init__(self, data: GetGlobalHubsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetGlobalHubsResponseBodyData) diff --git a/src/plex_api_client/models/errors/gethomedata.py b/src/plex_api_client/models/errors/gethomedata.py new file mode 100644 index 0000000..66547f2 --- /dev/null +++ b/src/plex_api_client/models/errors/gethomedata.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetHomeDataPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetHomeDataPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetHomeDataPlexResponseBodyData(BaseModel): + errors: Optional[List[GetHomeDataPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetHomeDataPlexResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetHomeDataPlexResponseBodyData + + def __init__(self, data: GetHomeDataPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetHomeDataPlexResponseBodyData) + + +class GetHomeDataErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetHomeDataErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetHomeDataResponseBodyData(BaseModel): + errors: Optional[List[GetHomeDataErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetHomeDataResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetHomeDataResponseBodyData + + def __init__(self, data: GetHomeDataResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetHomeDataResponseBodyData) diff --git a/src/plex_api_client/models/errors/getlibraryhubs.py b/src/plex_api_client/models/errors/getlibraryhubs.py new file mode 100644 index 0000000..5436193 --- /dev/null +++ b/src/plex_api_client/models/errors/getlibraryhubs.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetLibraryHubsHubsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryHubsHubsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryHubsHubsResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryHubsHubsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryHubsHubsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetLibraryHubsHubsResponseBodyData + + def __init__(self, data: GetLibraryHubsHubsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryHubsHubsResponseBodyData) + + +class GetLibraryHubsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetLibraryHubsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetLibraryHubsResponseBodyData(BaseModel): + errors: Optional[List[GetLibraryHubsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetLibraryHubsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetLibraryHubsResponseBodyData + + def __init__(self, data: GetLibraryHubsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetLibraryHubsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getmetadatachildren.py b/src/plex_api_client/models/errors/getmetadatachildren.py new file mode 100644 index 0000000..36d28c8 --- /dev/null +++ b/src/plex_api_client/models/errors/getmetadatachildren.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMetadataChildrenLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMetadataChildrenLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMetadataChildrenLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetMetadataChildrenLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMetadataChildrenLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetMetadataChildrenLibraryResponseBodyData + + def __init__(self, data: GetMetadataChildrenLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMetadataChildrenLibraryResponseBodyData) + + +class GetMetadataChildrenErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMetadataChildrenErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMetadataChildrenResponseBodyData(BaseModel): + errors: Optional[List[GetMetadataChildrenErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMetadataChildrenResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetMetadataChildrenResponseBodyData + + def __init__(self, data: GetMetadataChildrenResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMetadataChildrenResponseBodyData) diff --git a/src/plex_api_client/models/errors/getmyplexaccount.py b/src/plex_api_client/models/errors/getmyplexaccount.py new file mode 100644 index 0000000..ac2e248 --- /dev/null +++ b/src/plex_api_client/models/errors/getmyplexaccount.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMyPlexAccountServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMyPlexAccountServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMyPlexAccountServerResponseBodyData(BaseModel): + errors: Optional[List[GetMyPlexAccountServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMyPlexAccountServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetMyPlexAccountServerResponseBodyData + + def __init__(self, data: GetMyPlexAccountServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMyPlexAccountServerResponseBodyData) + + +class GetMyPlexAccountErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetMyPlexAccountErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetMyPlexAccountResponseBodyData(BaseModel): + errors: Optional[List[GetMyPlexAccountErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetMyPlexAccountResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetMyPlexAccountResponseBodyData + + def __init__(self, data: GetMyPlexAccountResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetMyPlexAccountResponseBodyData) diff --git a/src/plex_api_client/models/errors/getondeck.py b/src/plex_api_client/models/errors/getondeck.py new file mode 100644 index 0000000..dee6622 --- /dev/null +++ b/src/plex_api_client/models/errors/getondeck.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetOnDeckLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetOnDeckLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetOnDeckLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetOnDeckLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetOnDeckLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetOnDeckLibraryResponseBodyData + + def __init__(self, data: GetOnDeckLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetOnDeckLibraryResponseBodyData) + + +class GetOnDeckErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetOnDeckErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetOnDeckResponseBodyData(BaseModel): + errors: Optional[List[GetOnDeckErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetOnDeckResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetOnDeckResponseBodyData + + def __init__(self, data: GetOnDeckResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetOnDeckResponseBodyData) diff --git a/src/plex_api_client/models/errors/getpin.py b/src/plex_api_client/models/errors/getpin.py new file mode 100644 index 0000000..511b2d6 --- /dev/null +++ b/src/plex_api_client/models/errors/getpin.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPinErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPinErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPinResponseBodyData(BaseModel): + errors: Optional[List[GetPinErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPinResponseBody(Exception): + r"""Bad Request response when the X-Plex-Client-Identifier is missing""" + + data: GetPinResponseBodyData + + def __init__(self, data: GetPinResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPinResponseBodyData) diff --git a/src/plex_api_client/models/errors/getplaylist.py b/src/plex_api_client/models/errors/getplaylist.py new file mode 100644 index 0000000..b506938 --- /dev/null +++ b/src/plex_api_client/models/errors/getplaylist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPlaylistPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetPlaylistPlaylistsResponseBodyData + + def __init__(self, data: GetPlaylistPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPlaylistPlaylistsResponseBodyData) + + +class GetPlaylistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetPlaylistResponseBodyData + + def __init__(self, data: GetPlaylistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPlaylistResponseBodyData) diff --git a/src/plex_api_client/models/errors/getplaylistcontents.py b/src/plex_api_client/models/errors/getplaylistcontents.py new file mode 100644 index 0000000..9455203 --- /dev/null +++ b/src/plex_api_client/models/errors/getplaylistcontents.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPlaylistContentsPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistContentsPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistContentsPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistContentsPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistContentsPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetPlaylistContentsPlaylistsResponseBodyData + + def __init__(self, data: GetPlaylistContentsPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetPlaylistContentsPlaylistsResponseBodyData + ) + + +class GetPlaylistContentsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistContentsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistContentsResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistContentsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistContentsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetPlaylistContentsResponseBodyData + + def __init__(self, data: GetPlaylistContentsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPlaylistContentsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getplaylists.py b/src/plex_api_client/models/errors/getplaylists.py new file mode 100644 index 0000000..b65feaf --- /dev/null +++ b/src/plex_api_client/models/errors/getplaylists.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPlaylistsPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistsPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistsPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistsPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistsPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetPlaylistsPlaylistsResponseBodyData + + def __init__(self, data: GetPlaylistsPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPlaylistsPlaylistsResponseBodyData) + + +class GetPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[GetPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetPlaylistsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetPlaylistsResponseBodyData + + def __init__(self, data: GetPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetPlaylistsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getrecentlyadded.py b/src/plex_api_client/models/errors/getrecentlyadded.py new file mode 100644 index 0000000..eaff480 --- /dev/null +++ b/src/plex_api_client/models/errors/getrecentlyadded.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetRecentlyAddedLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetRecentlyAddedLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetRecentlyAddedLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetRecentlyAddedLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetRecentlyAddedLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetRecentlyAddedLibraryResponseBodyData + + def __init__(self, data: GetRecentlyAddedLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetRecentlyAddedLibraryResponseBodyData) + + +class GetRecentlyAddedErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetRecentlyAddedErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetRecentlyAddedResponseBodyData(BaseModel): + errors: Optional[List[GetRecentlyAddedErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetRecentlyAddedResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetRecentlyAddedResponseBodyData + + def __init__(self, data: GetRecentlyAddedResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetRecentlyAddedResponseBodyData) diff --git a/src/plex_api_client/models/errors/getresizedphoto.py b/src/plex_api_client/models/errors/getresizedphoto.py new file mode 100644 index 0000000..4e8ed66 --- /dev/null +++ b/src/plex_api_client/models/errors/getresizedphoto.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetResizedPhotoServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetResizedPhotoServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetResizedPhotoServerResponseBodyData(BaseModel): + errors: Optional[List[GetResizedPhotoServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetResizedPhotoServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetResizedPhotoServerResponseBodyData + + def __init__(self, data: GetResizedPhotoServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetResizedPhotoServerResponseBodyData) + + +class GetResizedPhotoErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetResizedPhotoErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetResizedPhotoResponseBodyData(BaseModel): + errors: Optional[List[GetResizedPhotoErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetResizedPhotoResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetResizedPhotoResponseBodyData + + def __init__(self, data: GetResizedPhotoResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetResizedPhotoResponseBodyData) diff --git a/src/plex_api_client/models/errors/getresourcesstatistics.py b/src/plex_api_client/models/errors/getresourcesstatistics.py new file mode 100644 index 0000000..299ea4d --- /dev/null +++ b/src/plex_api_client/models/errors/getresourcesstatistics.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetResourcesStatisticsStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetResourcesStatisticsStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetResourcesStatisticsStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetResourcesStatisticsStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetResourcesStatisticsStatisticsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetResourcesStatisticsStatisticsResponseBodyData + + def __init__(self, data: GetResourcesStatisticsStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetResourcesStatisticsStatisticsResponseBodyData + ) + + +class GetResourcesStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetResourcesStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetResourcesStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetResourcesStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetResourcesStatisticsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetResourcesStatisticsResponseBodyData + + def __init__(self, data: GetResourcesStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetResourcesStatisticsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getsearchresults.py b/src/plex_api_client/models/errors/getsearchresults.py new file mode 100644 index 0000000..9977667 --- /dev/null +++ b/src/plex_api_client/models/errors/getsearchresults.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSearchResultsSearchErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSearchResultsSearchErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSearchResultsSearchResponseBodyData(BaseModel): + errors: Optional[List[GetSearchResultsSearchErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSearchResultsSearchResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetSearchResultsSearchResponseBodyData + + def __init__(self, data: GetSearchResultsSearchResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSearchResultsSearchResponseBodyData) + + +class GetSearchResultsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSearchResultsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSearchResultsResponseBodyData(BaseModel): + errors: Optional[List[GetSearchResultsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSearchResultsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetSearchResultsResponseBodyData + + def __init__(self, data: GetSearchResultsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSearchResultsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getserveractivities.py b/src/plex_api_client/models/errors/getserveractivities.py new file mode 100644 index 0000000..72868d1 --- /dev/null +++ b/src/plex_api_client/models/errors/getserveractivities.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerActivitiesActivitiesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerActivitiesActivitiesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerActivitiesActivitiesResponseBodyData(BaseModel): + errors: Optional[List[GetServerActivitiesActivitiesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerActivitiesActivitiesResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetServerActivitiesActivitiesResponseBodyData + + def __init__(self, data: GetServerActivitiesActivitiesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetServerActivitiesActivitiesResponseBodyData + ) + + +class GetServerActivitiesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerActivitiesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerActivitiesResponseBodyData(BaseModel): + errors: Optional[List[GetServerActivitiesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerActivitiesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetServerActivitiesResponseBodyData + + def __init__(self, data: GetServerActivitiesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerActivitiesResponseBodyData) diff --git a/src/plex_api_client/models/errors/getservercapabilities.py b/src/plex_api_client/models/errors/getservercapabilities.py new file mode 100644 index 0000000..7619acd --- /dev/null +++ b/src/plex_api_client/models/errors/getservercapabilities.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerCapabilitiesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerCapabilitiesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerCapabilitiesServerResponseBodyData(BaseModel): + errors: Optional[List[GetServerCapabilitiesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerCapabilitiesServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetServerCapabilitiesServerResponseBodyData + + def __init__(self, data: GetServerCapabilitiesServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetServerCapabilitiesServerResponseBodyData + ) + + +class ErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class Errors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerCapabilitiesResponseBodyData(BaseModel): + errors: Optional[List[Errors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerCapabilitiesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetServerCapabilitiesResponseBodyData + + def __init__(self, data: GetServerCapabilitiesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerCapabilitiesResponseBodyData) diff --git a/src/plex_api_client/models/errors/getserverlist.py b/src/plex_api_client/models/errors/getserverlist.py new file mode 100644 index 0000000..032cc93 --- /dev/null +++ b/src/plex_api_client/models/errors/getserverlist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerListServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerListServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerListServerResponseBodyData(BaseModel): + errors: Optional[List[GetServerListServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerListServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetServerListServerResponseBodyData + + def __init__(self, data: GetServerListServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerListServerResponseBodyData) + + +class GetServerListErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerListErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerListResponseBodyData(BaseModel): + errors: Optional[List[GetServerListErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerListResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetServerListResponseBodyData + + def __init__(self, data: GetServerListResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerListResponseBodyData) diff --git a/src/plex_api_client/models/errors/getserverpreferences.py b/src/plex_api_client/models/errors/getserverpreferences.py new file mode 100644 index 0000000..cf6427d --- /dev/null +++ b/src/plex_api_client/models/errors/getserverpreferences.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerPreferencesServerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerPreferencesServerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerPreferencesServerResponseBodyData(BaseModel): + errors: Optional[List[GetServerPreferencesServerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerPreferencesServerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetServerPreferencesServerResponseBodyData + + def __init__(self, data: GetServerPreferencesServerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerPreferencesServerResponseBodyData) + + +class GetServerPreferencesErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetServerPreferencesErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetServerPreferencesResponseBodyData(BaseModel): + errors: Optional[List[GetServerPreferencesErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetServerPreferencesResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetServerPreferencesResponseBodyData + + def __init__(self, data: GetServerPreferencesResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetServerPreferencesResponseBodyData) diff --git a/src/plex_api_client/models/errors/getsessionhistory.py b/src/plex_api_client/models/errors/getsessionhistory.py new file mode 100644 index 0000000..b37a321 --- /dev/null +++ b/src/plex_api_client/models/errors/getsessionhistory.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSessionHistorySessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSessionHistorySessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSessionHistorySessionsResponseBodyData(BaseModel): + errors: Optional[List[GetSessionHistorySessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSessionHistorySessionsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetSessionHistorySessionsResponseBodyData + + def __init__(self, data: GetSessionHistorySessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSessionHistorySessionsResponseBodyData) + + +class GetSessionHistoryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSessionHistoryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSessionHistoryResponseBodyData(BaseModel): + errors: Optional[List[GetSessionHistoryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSessionHistoryResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetSessionHistoryResponseBodyData + + def __init__(self, data: GetSessionHistoryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSessionHistoryResponseBodyData) diff --git a/src/plex_api_client/models/errors/getsessions.py b/src/plex_api_client/models/errors/getsessions.py new file mode 100644 index 0000000..16cd0f4 --- /dev/null +++ b/src/plex_api_client/models/errors/getsessions.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSessionsSessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSessionsSessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSessionsSessionsResponseBodyData(BaseModel): + errors: Optional[List[GetSessionsSessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSessionsSessionsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetSessionsSessionsResponseBodyData + + def __init__(self, data: GetSessionsSessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSessionsSessionsResponseBodyData) + + +class GetSessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSessionsResponseBodyData(BaseModel): + errors: Optional[List[GetSessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSessionsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetSessionsResponseBodyData + + def __init__(self, data: GetSessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetSessionsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getsourceconnectioninformation.py b/src/plex_api_client/models/errors/getsourceconnectioninformation.py new file mode 100644 index 0000000..b5b8de8 --- /dev/null +++ b/src/plex_api_client/models/errors/getsourceconnectioninformation.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSourceConnectionInformationAuthenticationErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSourceConnectionInformationAuthenticationErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSourceConnectionInformationAuthenticationResponseBodyData(BaseModel): + errors: Optional[List[GetSourceConnectionInformationAuthenticationErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSourceConnectionInformationAuthenticationResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetSourceConnectionInformationAuthenticationResponseBodyData + + def __init__( + self, data: GetSourceConnectionInformationAuthenticationResponseBodyData + ): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetSourceConnectionInformationAuthenticationResponseBodyData + ) + + +class GetSourceConnectionInformationErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetSourceConnectionInformationErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetSourceConnectionInformationResponseBodyData(BaseModel): + errors: Optional[List[GetSourceConnectionInformationErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSourceConnectionInformationResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetSourceConnectionInformationResponseBodyData + + def __init__(self, data: GetSourceConnectionInformationResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetSourceConnectionInformationResponseBodyData + ) diff --git a/src/plex_api_client/models/errors/getstatistics.py b/src/plex_api_client/models/errors/getstatistics.py new file mode 100644 index 0000000..02a094d --- /dev/null +++ b/src/plex_api_client/models/errors/getstatistics.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetStatisticsStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetStatisticsStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetStatisticsStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetStatisticsStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetStatisticsStatisticsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetStatisticsStatisticsResponseBodyData + + def __init__(self, data: GetStatisticsStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetStatisticsStatisticsResponseBodyData) + + +class GetStatisticsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetStatisticsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetStatisticsResponseBodyData(BaseModel): + errors: Optional[List[GetStatisticsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetStatisticsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetStatisticsResponseBodyData + + def __init__(self, data: GetStatisticsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetStatisticsResponseBodyData) diff --git a/src/plex_api_client/models/errors/gettimeline.py b/src/plex_api_client/models/errors/gettimeline.py new file mode 100644 index 0000000..f3a3fda --- /dev/null +++ b/src/plex_api_client/models/errors/gettimeline.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTimelineVideoErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTimelineVideoErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTimelineVideoResponseBodyData(BaseModel): + errors: Optional[List[GetTimelineVideoErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTimelineVideoResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetTimelineVideoResponseBodyData + + def __init__(self, data: GetTimelineVideoResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTimelineVideoResponseBodyData) + + +class GetTimelineErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTimelineErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTimelineResponseBodyData(BaseModel): + errors: Optional[List[GetTimelineErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTimelineResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetTimelineResponseBodyData + + def __init__(self, data: GetTimelineResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTimelineResponseBodyData) diff --git a/src/plex_api_client/models/errors/gettokenbypinid.py b/src/plex_api_client/models/errors/gettokenbypinid.py new file mode 100644 index 0000000..0569fc1 --- /dev/null +++ b/src/plex_api_client/models/errors/gettokenbypinid.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTokenByPinIDPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + + +class GetTokenByPinIDPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + +class GetTokenByPinIDPlexResponseBodyData(BaseModel): + errors: Optional[List[GetTokenByPinIDPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTokenByPinIDPlexResponseBody(Exception): + r"""Not Found or Expired""" + + data: GetTokenByPinIDPlexResponseBodyData + + def __init__(self, data: GetTokenByPinIDPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTokenByPinIDPlexResponseBodyData) + + +class GetTokenByPinIDErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTokenByPinIDErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTokenByPinIDResponseBodyData(BaseModel): + errors: Optional[List[GetTokenByPinIDErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTokenByPinIDResponseBody(Exception): + r"""Bad Request response when the X-Plex-Client-Identifier is missing""" + + data: GetTokenByPinIDResponseBodyData + + def __init__(self, data: GetTokenByPinIDResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTokenByPinIDResponseBodyData) diff --git a/src/plex_api_client/models/errors/gettopwatchedcontent.py b/src/plex_api_client/models/errors/gettopwatchedcontent.py new file mode 100644 index 0000000..ccb1c85 --- /dev/null +++ b/src/plex_api_client/models/errors/gettopwatchedcontent.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTopWatchedContentLibraryErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTopWatchedContentLibraryErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTopWatchedContentLibraryResponseBodyData(BaseModel): + errors: Optional[List[GetTopWatchedContentLibraryErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTopWatchedContentLibraryResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetTopWatchedContentLibraryResponseBodyData + + def __init__(self, data: GetTopWatchedContentLibraryResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetTopWatchedContentLibraryResponseBodyData + ) + + +class GetTopWatchedContentErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTopWatchedContentErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTopWatchedContentResponseBodyData(BaseModel): + errors: Optional[List[GetTopWatchedContentErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTopWatchedContentResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetTopWatchedContentResponseBodyData + + def __init__(self, data: GetTopWatchedContentResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTopWatchedContentResponseBodyData) diff --git a/src/plex_api_client/models/errors/gettranscodesessions.py b/src/plex_api_client/models/errors/gettranscodesessions.py new file mode 100644 index 0000000..c20d89e --- /dev/null +++ b/src/plex_api_client/models/errors/gettranscodesessions.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTranscodeSessionsSessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTranscodeSessionsSessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTranscodeSessionsSessionsResponseBodyData(BaseModel): + errors: Optional[List[GetTranscodeSessionsSessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTranscodeSessionsSessionsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetTranscodeSessionsSessionsResponseBodyData + + def __init__(self, data: GetTranscodeSessionsSessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetTranscodeSessionsSessionsResponseBodyData + ) + + +class GetTranscodeSessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTranscodeSessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTranscodeSessionsResponseBodyData(BaseModel): + errors: Optional[List[GetTranscodeSessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTranscodeSessionsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetTranscodeSessionsResponseBodyData + + def __init__(self, data: GetTranscodeSessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTranscodeSessionsResponseBodyData) diff --git a/src/plex_api_client/models/errors/gettransienttoken.py b/src/plex_api_client/models/errors/gettransienttoken.py new file mode 100644 index 0000000..6457653 --- /dev/null +++ b/src/plex_api_client/models/errors/gettransienttoken.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTransientTokenAuthenticationErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTransientTokenAuthenticationErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTransientTokenAuthenticationResponseBodyData(BaseModel): + errors: Optional[List[GetTransientTokenAuthenticationErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTransientTokenAuthenticationResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetTransientTokenAuthenticationResponseBodyData + + def __init__(self, data: GetTransientTokenAuthenticationResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetTransientTokenAuthenticationResponseBodyData + ) + + +class GetTransientTokenErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetTransientTokenErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetTransientTokenResponseBodyData(BaseModel): + errors: Optional[List[GetTransientTokenErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTransientTokenResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetTransientTokenResponseBodyData + + def __init__(self, data: GetTransientTokenResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetTransientTokenResponseBodyData) diff --git a/src/plex_api_client/models/errors/getupdatestatus.py b/src/plex_api_client/models/errors/getupdatestatus.py new file mode 100644 index 0000000..9e73329 --- /dev/null +++ b/src/plex_api_client/models/errors/getupdatestatus.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetUpdateStatusUpdaterErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUpdateStatusUpdaterErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUpdateStatusUpdaterResponseBodyData(BaseModel): + errors: Optional[List[GetUpdateStatusUpdaterErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUpdateStatusUpdaterResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetUpdateStatusUpdaterResponseBodyData + + def __init__(self, data: GetUpdateStatusUpdaterResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetUpdateStatusUpdaterResponseBodyData) + + +class GetUpdateStatusErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUpdateStatusErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUpdateStatusResponseBodyData(BaseModel): + errors: Optional[List[GetUpdateStatusErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUpdateStatusResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetUpdateStatusResponseBodyData + + def __init__(self, data: GetUpdateStatusResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetUpdateStatusResponseBodyData) diff --git a/src/plex_api_client/models/errors/getuserdetails.py b/src/plex_api_client/models/errors/getuserdetails.py new file mode 100644 index 0000000..8bdbf88 --- /dev/null +++ b/src/plex_api_client/models/errors/getuserdetails.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetUserDetailsAuthenticationErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUserDetailsAuthenticationErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUserDetailsAuthenticationResponseBodyData(BaseModel): + errors: Optional[List[GetUserDetailsAuthenticationErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUserDetailsAuthenticationResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetUserDetailsAuthenticationResponseBodyData + + def __init__(self, data: GetUserDetailsAuthenticationResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GetUserDetailsAuthenticationResponseBodyData + ) + + +class GetUserDetailsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUserDetailsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUserDetailsResponseBodyData(BaseModel): + errors: Optional[List[GetUserDetailsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUserDetailsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetUserDetailsResponseBodyData + + def __init__(self, data: GetUserDetailsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetUserDetailsResponseBodyData) diff --git a/src/plex_api_client/models/errors/getuserfriends.py b/src/plex_api_client/models/errors/getuserfriends.py new file mode 100644 index 0000000..8d8d580 --- /dev/null +++ b/src/plex_api_client/models/errors/getuserfriends.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetUserFriendsPlexErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUserFriendsPlexErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUserFriendsPlexResponseBodyData(BaseModel): + errors: Optional[List[GetUserFriendsPlexErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUserFriendsPlexResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: GetUserFriendsPlexResponseBodyData + + def __init__(self, data: GetUserFriendsPlexResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetUserFriendsPlexResponseBodyData) + + +class GetUserFriendsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class GetUserFriendsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class GetUserFriendsResponseBodyData(BaseModel): + errors: Optional[List[GetUserFriendsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetUserFriendsResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: GetUserFriendsResponseBodyData + + def __init__(self, data: GetUserFriendsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GetUserFriendsResponseBodyData) diff --git a/src/plex_api_client/models/errors/logline.py b/src/plex_api_client/models/errors/logline.py new file mode 100644 index 0000000..85bca5b --- /dev/null +++ b/src/plex_api_client/models/errors/logline.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class LogLineLogErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class LogLineLogErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class LogLineLogResponseBodyData(BaseModel): + errors: Optional[List[LogLineLogErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogLineLogResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: LogLineLogResponseBodyData + + def __init__(self, data: LogLineLogResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, LogLineLogResponseBodyData) + + +class LogLineErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class LogLineErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class LogLineResponseBodyData(BaseModel): + errors: Optional[List[LogLineErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogLineResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: LogLineResponseBodyData + + def __init__(self, data: LogLineResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, LogLineResponseBodyData) diff --git a/src/plex_api_client/models/errors/logmultiline.py b/src/plex_api_client/models/errors/logmultiline.py new file mode 100644 index 0000000..b7f3d58 --- /dev/null +++ b/src/plex_api_client/models/errors/logmultiline.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class LogMultiLineLogErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class LogMultiLineLogErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class LogMultiLineLogResponseBodyData(BaseModel): + errors: Optional[List[LogMultiLineLogErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogMultiLineLogResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: LogMultiLineLogResponseBodyData + + def __init__(self, data: LogMultiLineLogResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, LogMultiLineLogResponseBodyData) + + +class LogMultiLineErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class LogMultiLineErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class LogMultiLineResponseBodyData(BaseModel): + errors: Optional[List[LogMultiLineErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogMultiLineResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: LogMultiLineResponseBodyData + + def __init__(self, data: LogMultiLineResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, LogMultiLineResponseBodyData) diff --git a/src/plex_api_client/models/errors/markplayed.py b/src/plex_api_client/models/errors/markplayed.py new file mode 100644 index 0000000..2dff1e0 --- /dev/null +++ b/src/plex_api_client/models/errors/markplayed.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class MarkPlayedMediaErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class MarkPlayedMediaErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class MarkPlayedMediaResponseBodyData(BaseModel): + errors: Optional[List[MarkPlayedMediaErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkPlayedMediaResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: MarkPlayedMediaResponseBodyData + + def __init__(self, data: MarkPlayedMediaResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, MarkPlayedMediaResponseBodyData) + + +class MarkPlayedErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class MarkPlayedErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class MarkPlayedResponseBodyData(BaseModel): + errors: Optional[List[MarkPlayedErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkPlayedResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: MarkPlayedResponseBodyData + + def __init__(self, data: MarkPlayedResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, MarkPlayedResponseBodyData) diff --git a/src/plex_api_client/models/errors/markunplayed.py b/src/plex_api_client/models/errors/markunplayed.py new file mode 100644 index 0000000..1db3a03 --- /dev/null +++ b/src/plex_api_client/models/errors/markunplayed.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class MarkUnplayedMediaErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class MarkUnplayedMediaErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class MarkUnplayedMediaResponseBodyData(BaseModel): + errors: Optional[List[MarkUnplayedMediaErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkUnplayedMediaResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: MarkUnplayedMediaResponseBodyData + + def __init__(self, data: MarkUnplayedMediaResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, MarkUnplayedMediaResponseBodyData) + + +class MarkUnplayedErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class MarkUnplayedErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class MarkUnplayedResponseBodyData(BaseModel): + errors: Optional[List[MarkUnplayedErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkUnplayedResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: MarkUnplayedResponseBodyData + + def __init__(self, data: MarkUnplayedResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, MarkUnplayedResponseBodyData) diff --git a/src/plex_api_client/models/errors/performsearch.py b/src/plex_api_client/models/errors/performsearch.py new file mode 100644 index 0000000..d55b837 --- /dev/null +++ b/src/plex_api_client/models/errors/performsearch.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PerformSearchSearchErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PerformSearchSearchErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PerformSearchSearchResponseBodyData(BaseModel): + errors: Optional[List[PerformSearchSearchErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformSearchSearchResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: PerformSearchSearchResponseBodyData + + def __init__(self, data: PerformSearchSearchResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, PerformSearchSearchResponseBodyData) + + +class PerformSearchErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PerformSearchErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PerformSearchResponseBodyData(BaseModel): + errors: Optional[List[PerformSearchErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformSearchResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: PerformSearchResponseBodyData + + def __init__(self, data: PerformSearchResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, PerformSearchResponseBodyData) diff --git a/src/plex_api_client/models/errors/performvoicesearch.py b/src/plex_api_client/models/errors/performvoicesearch.py new file mode 100644 index 0000000..8a31a1f --- /dev/null +++ b/src/plex_api_client/models/errors/performvoicesearch.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PerformVoiceSearchSearchErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PerformVoiceSearchSearchErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PerformVoiceSearchSearchResponseBodyData(BaseModel): + errors: Optional[List[PerformVoiceSearchSearchErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformVoiceSearchSearchResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: PerformVoiceSearchSearchResponseBodyData + + def __init__(self, data: PerformVoiceSearchSearchResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, PerformVoiceSearchSearchResponseBodyData) + + +class PerformVoiceSearchErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PerformVoiceSearchErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PerformVoiceSearchResponseBodyData(BaseModel): + errors: Optional[List[PerformVoiceSearchErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformVoiceSearchResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: PerformVoiceSearchResponseBodyData + + def __init__(self, data: PerformVoiceSearchResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, PerformVoiceSearchResponseBodyData) diff --git a/src/plex_api_client/models/errors/post_users_sign_in_data.py b/src/plex_api_client/models/errors/post_users_sign_in_data.py new file mode 100644 index 0000000..74834da --- /dev/null +++ b/src/plex_api_client/models/errors/post_users_sign_in_data.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PostUsersSignInDataAuthenticationErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PostUsersSignInDataAuthenticationErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PostUsersSignInDataAuthenticationResponseBodyData(BaseModel): + errors: Optional[List[PostUsersSignInDataAuthenticationErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PostUsersSignInDataAuthenticationResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: PostUsersSignInDataAuthenticationResponseBodyData + + def __init__(self, data: PostUsersSignInDataAuthenticationResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, PostUsersSignInDataAuthenticationResponseBodyData + ) + + +class PostUsersSignInDataErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class PostUsersSignInDataErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class PostUsersSignInDataResponseBodyData(BaseModel): + errors: Optional[List[PostUsersSignInDataErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PostUsersSignInDataResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: PostUsersSignInDataResponseBodyData + + def __init__(self, data: PostUsersSignInDataResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, PostUsersSignInDataResponseBodyData) diff --git a/src/plex_api_client/models/errors/sdkerror.py b/src/plex_api_client/models/errors/sdkerror.py new file mode 100644 index 0000000..03216cb --- /dev/null +++ b/src/plex_api_client/models/errors/sdkerror.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from dataclasses import dataclass +from typing import Optional +import httpx + + +@dataclass +class SDKError(Exception): + """Represents an error returned by the API.""" + + message: str + status_code: int = -1 + body: str = "" + raw_response: Optional[httpx.Response] = None + + def __str__(self): + body = "" + if len(self.body) > 0: + body = f"\n{self.body}" + + return f"{self.message}: Status {self.status_code}{body}" diff --git a/src/plex_api_client/models/errors/startalltasks.py b/src/plex_api_client/models/errors/startalltasks.py new file mode 100644 index 0000000..58a7f6e --- /dev/null +++ b/src/plex_api_client/models/errors/startalltasks.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StartAllTasksButlerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartAllTasksButlerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartAllTasksButlerResponseBodyData(BaseModel): + errors: Optional[List[StartAllTasksButlerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartAllTasksButlerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StartAllTasksButlerResponseBodyData + + def __init__(self, data: StartAllTasksButlerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StartAllTasksButlerResponseBodyData) + + +class StartAllTasksErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartAllTasksErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartAllTasksResponseBodyData(BaseModel): + errors: Optional[List[StartAllTasksErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartAllTasksResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StartAllTasksResponseBodyData + + def __init__(self, data: StartAllTasksResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StartAllTasksResponseBodyData) diff --git a/src/plex_api_client/models/errors/starttask.py b/src/plex_api_client/models/errors/starttask.py new file mode 100644 index 0000000..53c4304 --- /dev/null +++ b/src/plex_api_client/models/errors/starttask.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StartTaskButlerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartTaskButlerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartTaskButlerResponseBodyData(BaseModel): + errors: Optional[List[StartTaskButlerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartTaskButlerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StartTaskButlerResponseBodyData + + def __init__(self, data: StartTaskButlerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StartTaskButlerResponseBodyData) + + +class StartTaskErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartTaskErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartTaskResponseBodyData(BaseModel): + errors: Optional[List[StartTaskErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartTaskResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StartTaskResponseBodyData + + def __init__(self, data: StartTaskResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StartTaskResponseBodyData) diff --git a/src/plex_api_client/models/errors/startuniversaltranscode.py b/src/plex_api_client/models/errors/startuniversaltranscode.py new file mode 100644 index 0000000..2597eda --- /dev/null +++ b/src/plex_api_client/models/errors/startuniversaltranscode.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StartUniversalTranscodeVideoErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartUniversalTranscodeVideoErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartUniversalTranscodeVideoResponseBodyData(BaseModel): + errors: Optional[List[StartUniversalTranscodeVideoErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartUniversalTranscodeVideoResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StartUniversalTranscodeVideoResponseBodyData + + def __init__(self, data: StartUniversalTranscodeVideoResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, StartUniversalTranscodeVideoResponseBodyData + ) + + +class StartUniversalTranscodeErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StartUniversalTranscodeErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StartUniversalTranscodeResponseBodyData(BaseModel): + errors: Optional[List[StartUniversalTranscodeErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartUniversalTranscodeResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StartUniversalTranscodeResponseBodyData + + def __init__(self, data: StartUniversalTranscodeResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StartUniversalTranscodeResponseBodyData) diff --git a/src/plex_api_client/models/errors/stopalltasks.py b/src/plex_api_client/models/errors/stopalltasks.py new file mode 100644 index 0000000..ff11057 --- /dev/null +++ b/src/plex_api_client/models/errors/stopalltasks.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StopAllTasksButlerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopAllTasksButlerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopAllTasksButlerResponseBodyData(BaseModel): + errors: Optional[List[StopAllTasksButlerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopAllTasksButlerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StopAllTasksButlerResponseBodyData + + def __init__(self, data: StopAllTasksButlerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StopAllTasksButlerResponseBodyData) + + +class StopAllTasksErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopAllTasksErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopAllTasksResponseBodyData(BaseModel): + errors: Optional[List[StopAllTasksErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopAllTasksResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StopAllTasksResponseBodyData + + def __init__(self, data: StopAllTasksResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StopAllTasksResponseBodyData) diff --git a/src/plex_api_client/models/errors/stoptask.py b/src/plex_api_client/models/errors/stoptask.py new file mode 100644 index 0000000..bc241ef --- /dev/null +++ b/src/plex_api_client/models/errors/stoptask.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StopTaskButlerErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopTaskButlerErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopTaskButlerResponseBodyData(BaseModel): + errors: Optional[List[StopTaskButlerErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTaskButlerResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StopTaskButlerResponseBodyData + + def __init__(self, data: StopTaskButlerResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StopTaskButlerResponseBodyData) + + +class StopTaskErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopTaskErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopTaskResponseBodyData(BaseModel): + errors: Optional[List[StopTaskErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTaskResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StopTaskResponseBodyData + + def __init__(self, data: StopTaskResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StopTaskResponseBodyData) diff --git a/src/plex_api_client/models/errors/stoptranscodesession.py b/src/plex_api_client/models/errors/stoptranscodesession.py new file mode 100644 index 0000000..f163217 --- /dev/null +++ b/src/plex_api_client/models/errors/stoptranscodesession.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StopTranscodeSessionSessionsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopTranscodeSessionSessionsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopTranscodeSessionSessionsResponseBodyData(BaseModel): + errors: Optional[List[StopTranscodeSessionSessionsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTranscodeSessionSessionsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: StopTranscodeSessionSessionsResponseBodyData + + def __init__(self, data: StopTranscodeSessionSessionsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, StopTranscodeSessionSessionsResponseBodyData + ) + + +class StopTranscodeSessionErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class StopTranscodeSessionErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class StopTranscodeSessionResponseBodyData(BaseModel): + errors: Optional[List[StopTranscodeSessionErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTranscodeSessionResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: StopTranscodeSessionResponseBodyData + + def __init__(self, data: StopTranscodeSessionResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, StopTranscodeSessionResponseBodyData) diff --git a/src/plex_api_client/models/errors/updateplaylist.py b/src/plex_api_client/models/errors/updateplaylist.py new file mode 100644 index 0000000..cfe4356 --- /dev/null +++ b/src/plex_api_client/models/errors/updateplaylist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class UpdatePlaylistPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UpdatePlaylistPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UpdatePlaylistPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[UpdatePlaylistPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlaylistPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: UpdatePlaylistPlaylistsResponseBodyData + + def __init__(self, data: UpdatePlaylistPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UpdatePlaylistPlaylistsResponseBodyData) + + +class UpdatePlaylistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UpdatePlaylistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UpdatePlaylistResponseBodyData(BaseModel): + errors: Optional[List[UpdatePlaylistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlaylistResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: UpdatePlaylistResponseBodyData + + def __init__(self, data: UpdatePlaylistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UpdatePlaylistResponseBodyData) diff --git a/src/plex_api_client/models/errors/updateplayprogress.py b/src/plex_api_client/models/errors/updateplayprogress.py new file mode 100644 index 0000000..75ca388 --- /dev/null +++ b/src/plex_api_client/models/errors/updateplayprogress.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class UpdatePlayProgressMediaErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UpdatePlayProgressMediaErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UpdatePlayProgressMediaResponseBodyData(BaseModel): + errors: Optional[List[UpdatePlayProgressMediaErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlayProgressMediaResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: UpdatePlayProgressMediaResponseBodyData + + def __init__(self, data: UpdatePlayProgressMediaResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UpdatePlayProgressMediaResponseBodyData) + + +class UpdatePlayProgressErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UpdatePlayProgressErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UpdatePlayProgressResponseBodyData(BaseModel): + errors: Optional[List[UpdatePlayProgressErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlayProgressResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: UpdatePlayProgressResponseBodyData + + def __init__(self, data: UpdatePlayProgressResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UpdatePlayProgressResponseBodyData) diff --git a/src/plex_api_client/models/errors/uploadplaylist.py b/src/plex_api_client/models/errors/uploadplaylist.py new file mode 100644 index 0000000..4816361 --- /dev/null +++ b/src/plex_api_client/models/errors/uploadplaylist.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client import utils +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class UploadPlaylistPlaylistsErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UploadPlaylistPlaylistsErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UploadPlaylistPlaylistsResponseBodyData(BaseModel): + errors: Optional[List[UploadPlaylistPlaylistsErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UploadPlaylistPlaylistsResponseBody(Exception): + r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" + + data: UploadPlaylistPlaylistsResponseBodyData + + def __init__(self, data: UploadPlaylistPlaylistsResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UploadPlaylistPlaylistsResponseBodyData) + + +class UploadPlaylistErrorsTypedDict(TypedDict): + code: NotRequired[int] + message: NotRequired[str] + status: NotRequired[int] + + +class UploadPlaylistErrors(BaseModel): + code: Optional[int] = None + + message: Optional[str] = None + + status: Optional[int] = None + + +class UploadPlaylistResponseBodyData(BaseModel): + errors: Optional[List[UploadPlaylistErrors]] = None + + raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( + None + ) + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UploadPlaylistResponseBody(Exception): + r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" + + data: UploadPlaylistResponseBodyData + + def __init__(self, data: UploadPlaylistResponseBodyData): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, UploadPlaylistResponseBodyData) diff --git a/src/plex_api_client/models/internal/__init__.py b/src/plex_api_client/models/internal/__init__.py new file mode 100644 index 0000000..9e3dfb7 --- /dev/null +++ b/src/plex_api_client/models/internal/__init__.py @@ -0,0 +1,5 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .globals import Globals, GlobalsTypedDict + +__all__ = ["Globals", "GlobalsTypedDict"] diff --git a/src/plex_api_client/models/internal/globals.py b/src/plex_api_client/models/internal/globals.py new file mode 100644 index 0000000..3be05ec --- /dev/null +++ b/src/plex_api_client/models/internal/globals.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GlobalsTypedDict(TypedDict): + x_plex_client_identifier: 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 Globals(BaseModel): + x_plex_client_identifier: 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) + + """ diff --git a/src/plex_api_client/models/operations/__init__.py b/src/plex_api_client/models/operations/__init__.py new file mode 100644 index 0000000..5bad216 --- /dev/null +++ b/src/plex_api_client/models/operations/__init__.py @@ -0,0 +1,1646 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .addplaylistcontents import ( + AddPlaylistContentsMediaContainer, + AddPlaylistContentsMediaContainerTypedDict, + AddPlaylistContentsMetadata, + AddPlaylistContentsMetadataTypedDict, + AddPlaylistContentsRequest, + AddPlaylistContentsRequestTypedDict, + AddPlaylistContentsResponse, + AddPlaylistContentsResponseBody, + AddPlaylistContentsResponseBodyTypedDict, + AddPlaylistContentsResponseTypedDict, +) +from .applyupdates import ( + ApplyUpdatesRequest, + ApplyUpdatesRequestTypedDict, + ApplyUpdatesResponse, + ApplyUpdatesResponseTypedDict, + Skip, + Tonight, +) +from .cancelserveractivities import ( + CancelServerActivitiesRequest, + CancelServerActivitiesRequestTypedDict, + CancelServerActivitiesResponse, + CancelServerActivitiesResponseTypedDict, +) +from .checkforupdates import ( + CheckForUpdatesRequest, + CheckForUpdatesRequestTypedDict, + CheckForUpdatesResponse, + CheckForUpdatesResponseTypedDict, + Download, +) +from .clearplaylistcontents import ( + ClearPlaylistContentsRequest, + ClearPlaylistContentsRequestTypedDict, + ClearPlaylistContentsResponse, + ClearPlaylistContentsResponseTypedDict, +) +from .createplaylist import ( + CreatePlaylistMediaContainer, + CreatePlaylistMediaContainerTypedDict, + CreatePlaylistMetadata, + CreatePlaylistMetadataTypedDict, + CreatePlaylistQueryParamType, + CreatePlaylistRequest, + CreatePlaylistRequestTypedDict, + CreatePlaylistResponse, + CreatePlaylistResponseBody, + CreatePlaylistResponseBodyTypedDict, + CreatePlaylistResponseTypedDict, + Smart, +) +from .deletelibrary import ( + DeleteLibraryRequest, + DeleteLibraryRequestTypedDict, + DeleteLibraryResponse, + DeleteLibraryResponseTypedDict, +) +from .deleteplaylist import ( + DeletePlaylistRequest, + DeletePlaylistRequestTypedDict, + DeletePlaylistResponse, + DeletePlaylistResponseTypedDict, +) +from .enablepapertrail import ( + EnablePaperTrailResponse, + EnablePaperTrailResponseTypedDict, +) +from .get_all_libraries import ( + GetAllLibrariesDirectory, + GetAllLibrariesDirectoryTypedDict, + GetAllLibrariesMediaContainer, + GetAllLibrariesMediaContainerTypedDict, + GetAllLibrariesResponse, + GetAllLibrariesResponseBody, + GetAllLibrariesResponseBodyTypedDict, + GetAllLibrariesResponseTypedDict, + Location, + LocationTypedDict, +) +from .get_banner_image import ( + GetBannerImageRequest, + GetBannerImageRequestTypedDict, + GetBannerImageResponse, + GetBannerImageResponseTypedDict, +) +from .get_library_details import ( + Field, + FieldType, + FieldTypeTypedDict, + FieldTypedDict, + GetLibraryDetailsDirectory, + GetLibraryDetailsDirectoryTypedDict, + GetLibraryDetailsFilter, + GetLibraryDetailsFilterTypedDict, + GetLibraryDetailsMediaContainer, + GetLibraryDetailsMediaContainerTypedDict, + GetLibraryDetailsRequest, + GetLibraryDetailsRequestTypedDict, + GetLibraryDetailsResponse, + GetLibraryDetailsResponseBody, + GetLibraryDetailsResponseBodyTypedDict, + GetLibraryDetailsResponseTypedDict, + GetLibraryDetailsType, + GetLibraryDetailsTypeTypedDict, + IncludeDetails, + Operator, + OperatorTypedDict, + Sort, + SortTypedDict, +) +from .get_library_items import ( + GetLibraryItemsCountry, + GetLibraryItemsCountryTypedDict, + GetLibraryItemsDirector, + GetLibraryItemsDirectorTypedDict, + GetLibraryItemsGenre, + GetLibraryItemsGenreTypedDict, + GetLibraryItemsMedia, + GetLibraryItemsMediaContainer, + GetLibraryItemsMediaContainerTypedDict, + GetLibraryItemsMediaTypedDict, + GetLibraryItemsMetadata, + GetLibraryItemsMetadataTypedDict, + GetLibraryItemsPart, + GetLibraryItemsPartTypedDict, + GetLibraryItemsRequest, + GetLibraryItemsRequestTypedDict, + GetLibraryItemsResponse, + GetLibraryItemsResponseBody, + GetLibraryItemsResponseBodyTypedDict, + GetLibraryItemsResponseTypedDict, + GetLibraryItemsRole, + GetLibraryItemsRoleTypedDict, + GetLibraryItemsWriter, + GetLibraryItemsWriterTypedDict, + IncludeGuids, + IncludeMeta, + LibrarySectionID, + LibrarySectionIDTypedDict, + Tag, + Type, +) +from .get_media_providers import ( + Feature, + FeatureTypedDict, + GetMediaProvidersDirectory, + GetMediaProvidersDirectoryTypedDict, + GetMediaProvidersMediaContainer, + GetMediaProvidersMediaContainerTypedDict, + GetMediaProvidersRequest, + GetMediaProvidersRequestTypedDict, + GetMediaProvidersResponse, + GetMediaProvidersResponseBody, + GetMediaProvidersResponseBodyTypedDict, + GetMediaProvidersResponseTypedDict, + MediaProvider, + MediaProviderTypedDict, + Pivot, + PivotTypedDict, +) +from .get_meta_data_by_rating_key import ( + GetMetaDataByRatingKeyCountry, + GetMetaDataByRatingKeyCountryTypedDict, + GetMetaDataByRatingKeyDirector, + GetMetaDataByRatingKeyDirectorTypedDict, + GetMetaDataByRatingKeyGenre, + GetMetaDataByRatingKeyGenreTypedDict, + GetMetaDataByRatingKeyMedia, + GetMetaDataByRatingKeyMediaContainer, + GetMetaDataByRatingKeyMediaContainerTypedDict, + GetMetaDataByRatingKeyMediaTypedDict, + GetMetaDataByRatingKeyMetadata, + GetMetaDataByRatingKeyMetadataTypedDict, + GetMetaDataByRatingKeyPart, + GetMetaDataByRatingKeyPartTypedDict, + GetMetaDataByRatingKeyRequest, + GetMetaDataByRatingKeyRequestTypedDict, + GetMetaDataByRatingKeyResponse, + GetMetaDataByRatingKeyResponseBody, + GetMetaDataByRatingKeyResponseBodyTypedDict, + GetMetaDataByRatingKeyResponseTypedDict, + GetMetaDataByRatingKeyRole, + GetMetaDataByRatingKeyRoleTypedDict, + GetMetaDataByRatingKeyWriter, + GetMetaDataByRatingKeyWriterTypedDict, + Guids, + GuidsTypedDict, + Producer, + ProducerTypedDict, + Ratings, + RatingsTypedDict, + Stream, + StreamTypedDict, +) +from .get_refresh_library_metadata import ( + Force, + GetRefreshLibraryMetadataRequest, + GetRefreshLibraryMetadataRequestTypedDict, + GetRefreshLibraryMetadataResponse, + GetRefreshLibraryMetadataResponseTypedDict, +) +from .get_search_library import ( + GetSearchLibraryMediaContainer, + GetSearchLibraryMediaContainerTypedDict, + GetSearchLibraryMetadata, + GetSearchLibraryMetadataTypedDict, + GetSearchLibraryRequest, + GetSearchLibraryRequestTypedDict, + GetSearchLibraryResponse, + GetSearchLibraryResponseBody, + GetSearchLibraryResponseBodyTypedDict, + GetSearchLibraryResponseTypedDict, + QueryParamType, +) +from .get_server_identity import ( + GetServerIdentityMediaContainer, + GetServerIdentityMediaContainerTypedDict, + GetServerIdentityResponse, + GetServerIdentityResponseBody, + GetServerIdentityResponseBodyTypedDict, + GetServerIdentityResponseTypedDict, +) +from .get_server_resources import ( + Connections, + ConnectionsTypedDict, + GET_SERVER_RESOURCES_SERVERS, + GetServerResourcesGlobals, + GetServerResourcesGlobalsTypedDict, + GetServerResourcesRequest, + GetServerResourcesRequestTypedDict, + GetServerResourcesResponse, + GetServerResourcesResponseTypedDict, + IncludeHTTPS, + IncludeIPv6, + IncludeRelay, + PlexDevice, + PlexDeviceTypedDict, +) +from .get_thumb_image import ( + GetThumbImageRequest, + GetThumbImageRequestTypedDict, + GetThumbImageResponse, + GetThumbImageResponseTypedDict, +) +from .get_watch_list import ( + Filter, + GET_WATCH_LIST_SERVERS, + GetWatchListRequest, + GetWatchListRequestTypedDict, + GetWatchListResponse, + GetWatchListResponseBody, + GetWatchListResponseBodyTypedDict, + GetWatchListResponseTypedDict, + Image, + ImageTypedDict, + IncludeCollections, + IncludeExternalMedia, + Libtype, + Metadata, + MetadataTypedDict, +) +from .getavailableclients import ( + GetAvailableClientsMediaContainer, + GetAvailableClientsMediaContainerTypedDict, + GetAvailableClientsResponse, + GetAvailableClientsResponseBody, + GetAvailableClientsResponseBodyTypedDict, + GetAvailableClientsResponseTypedDict, + Server, + ServerTypedDict, +) +from .getbandwidthstatistics import ( + GetBandwidthStatisticsAccount, + GetBandwidthStatisticsAccountTypedDict, + GetBandwidthStatisticsDevice, + GetBandwidthStatisticsDeviceTypedDict, + GetBandwidthStatisticsMediaContainer, + GetBandwidthStatisticsMediaContainerTypedDict, + GetBandwidthStatisticsRequest, + GetBandwidthStatisticsRequestTypedDict, + GetBandwidthStatisticsResponse, + GetBandwidthStatisticsResponseBody, + GetBandwidthStatisticsResponseBodyTypedDict, + GetBandwidthStatisticsResponseTypedDict, + StatisticsBandwidth, + StatisticsBandwidthTypedDict, +) +from .getbutlertasks import ( + ButlerTask, + ButlerTaskTypedDict, + ButlerTasks, + ButlerTasksTypedDict, + GetButlerTasksResponse, + GetButlerTasksResponseBody, + GetButlerTasksResponseBodyTypedDict, + GetButlerTasksResponseTypedDict, +) +from .getcompanionsdata import ( + GET_COMPANIONS_DATA_SERVERS, + GetCompanionsDataResponse, + GetCompanionsDataResponseTypedDict, + ResponseBody, + ResponseBodyTypedDict, +) +from .getdevices import ( + Device, + DeviceTypedDict, + GetDevicesMediaContainer, + GetDevicesMediaContainerTypedDict, + GetDevicesResponse, + GetDevicesResponseBody, + GetDevicesResponseBodyTypedDict, + GetDevicesResponseTypedDict, +) +from .getfilehash import ( + GetFileHashRequest, + GetFileHashRequestTypedDict, + GetFileHashResponse, + GetFileHashResponseTypedDict, +) +from .getgeodata import ( + GET_GEO_DATA_SERVERS, + GetGeoDataGeoData, + GetGeoDataGeoDataTypedDict, + GetGeoDataResponse, + GetGeoDataResponseTypedDict, +) +from .getglobalhubs import ( + GetGlobalHubsMediaContainer, + GetGlobalHubsMediaContainerTypedDict, + GetGlobalHubsMetadata, + GetGlobalHubsMetadataTypedDict, + GetGlobalHubsRequest, + GetGlobalHubsRequestTypedDict, + GetGlobalHubsResponse, + GetGlobalHubsResponseBody, + GetGlobalHubsResponseBodyTypedDict, + GetGlobalHubsResponseTypedDict, + Hub, + HubTypedDict, + OnlyTransient, +) +from .gethomedata import ( + GetHomeDataResponse, + GetHomeDataResponseBody, + GetHomeDataResponseBodyTypedDict, + GetHomeDataResponseTypedDict, +) +from .getlibraryhubs import ( + GetLibraryHubsCountry, + GetLibraryHubsCountryTypedDict, + GetLibraryHubsDirector, + GetLibraryHubsDirectorTypedDict, + GetLibraryHubsGenre, + GetLibraryHubsGenreTypedDict, + GetLibraryHubsHub, + GetLibraryHubsHubTypedDict, + GetLibraryHubsMedia, + GetLibraryHubsMediaContainer, + GetLibraryHubsMediaContainerTypedDict, + GetLibraryHubsMediaTypedDict, + GetLibraryHubsMetadata, + GetLibraryHubsMetadataTypedDict, + GetLibraryHubsPart, + GetLibraryHubsPartTypedDict, + GetLibraryHubsRequest, + GetLibraryHubsRequestTypedDict, + GetLibraryHubsResponse, + GetLibraryHubsResponseBody, + GetLibraryHubsResponseBodyTypedDict, + GetLibraryHubsResponseTypedDict, + GetLibraryHubsRole, + GetLibraryHubsRoleTypedDict, + GetLibraryHubsWriter, + GetLibraryHubsWriterTypedDict, + QueryParamOnlyTransient, +) +from .getmetadatachildren import ( + GetMetadataChildrenDirectory, + GetMetadataChildrenDirectoryTypedDict, + GetMetadataChildrenMediaContainer, + GetMetadataChildrenMediaContainerTypedDict, + GetMetadataChildrenMetadata, + GetMetadataChildrenMetadataTypedDict, + GetMetadataChildrenRequest, + GetMetadataChildrenRequestTypedDict, + GetMetadataChildrenResponse, + GetMetadataChildrenResponseBody, + GetMetadataChildrenResponseBodyTypedDict, + GetMetadataChildrenResponseTypedDict, +) +from .getmyplexaccount import ( + GetMyPlexAccountResponse, + GetMyPlexAccountResponseBody, + GetMyPlexAccountResponseBodyTypedDict, + GetMyPlexAccountResponseTypedDict, + MyPlex, + MyPlexTypedDict, +) +from .getondeck import ( + GetOnDeckGuids, + GetOnDeckGuidsTypedDict, + GetOnDeckMedia, + GetOnDeckMediaContainer, + GetOnDeckMediaContainerTypedDict, + GetOnDeckMediaTypedDict, + GetOnDeckMetadata, + GetOnDeckMetadataTypedDict, + GetOnDeckPart, + GetOnDeckPartTypedDict, + GetOnDeckResponse, + GetOnDeckResponseBody, + GetOnDeckResponseBodyTypedDict, + GetOnDeckResponseTypedDict, + GetOnDeckStream, + GetOnDeckStreamTypedDict, +) +from .getpin import ( + GET_PIN_SERVERS, + GeoData, + GeoDataTypedDict, + GetPinAuthPinContainer, + GetPinAuthPinContainerTypedDict, + GetPinGlobals, + GetPinGlobalsTypedDict, + GetPinRequest, + GetPinRequestTypedDict, + GetPinResponse, + GetPinResponseTypedDict, +) +from .getplaylist import ( + GetPlaylistMediaContainer, + GetPlaylistMediaContainerTypedDict, + GetPlaylistMetadata, + GetPlaylistMetadataTypedDict, + GetPlaylistRequest, + GetPlaylistRequestTypedDict, + GetPlaylistResponse, + GetPlaylistResponseBody, + GetPlaylistResponseBodyTypedDict, + GetPlaylistResponseTypedDict, +) +from .getplaylistcontents import ( + GetPlaylistContentsCountry, + GetPlaylistContentsCountryTypedDict, + GetPlaylistContentsDirector, + GetPlaylistContentsDirectorTypedDict, + GetPlaylistContentsGenre, + GetPlaylistContentsGenreTypedDict, + GetPlaylistContentsMedia, + GetPlaylistContentsMediaContainer, + GetPlaylistContentsMediaContainerTypedDict, + GetPlaylistContentsMediaTypedDict, + GetPlaylistContentsMetadata, + GetPlaylistContentsMetadataTypedDict, + GetPlaylistContentsPart, + GetPlaylistContentsPartTypedDict, + GetPlaylistContentsQueryParamType, + GetPlaylistContentsRequest, + GetPlaylistContentsRequestTypedDict, + GetPlaylistContentsResponse, + GetPlaylistContentsResponseBody, + GetPlaylistContentsResponseBodyTypedDict, + GetPlaylistContentsResponseTypedDict, + GetPlaylistContentsRole, + GetPlaylistContentsRoleTypedDict, + GetPlaylistContentsWriter, + GetPlaylistContentsWriterTypedDict, +) +from .getplaylists import ( + GetPlaylistsMediaContainer, + GetPlaylistsMediaContainerTypedDict, + GetPlaylistsMetadata, + GetPlaylistsMetadataTypedDict, + GetPlaylistsRequest, + GetPlaylistsRequestTypedDict, + GetPlaylistsResponse, + GetPlaylistsResponseBody, + GetPlaylistsResponseBodyTypedDict, + GetPlaylistsResponseTypedDict, + PlaylistType, + QueryParamSmart, +) +from .getrecentlyadded import ( + Country, + CountryTypedDict, + Director, + DirectorTypedDict, + Genre, + GenreTypedDict, + GetRecentlyAddedMediaContainer, + GetRecentlyAddedMediaContainerTypedDict, + GetRecentlyAddedMetadata, + GetRecentlyAddedMetadataTypedDict, + GetRecentlyAddedRequest, + GetRecentlyAddedRequestTypedDict, + GetRecentlyAddedResponse, + GetRecentlyAddedResponseBody, + GetRecentlyAddedResponseBodyTypedDict, + GetRecentlyAddedResponseTypedDict, + Media, + MediaTypedDict, + Part, + PartTypedDict, + Role, + RoleTypedDict, + Writer, + WriterTypedDict, +) +from .getresizedphoto import ( + GetResizedPhotoRequest, + GetResizedPhotoRequestTypedDict, + GetResizedPhotoResponse, + GetResizedPhotoResponseTypedDict, + MinSize, + Upscale, +) +from .getresourcesstatistics import ( + GetResourcesStatisticsMediaContainer, + GetResourcesStatisticsMediaContainerTypedDict, + GetResourcesStatisticsRequest, + GetResourcesStatisticsRequestTypedDict, + GetResourcesStatisticsResponse, + GetResourcesStatisticsResponseBody, + GetResourcesStatisticsResponseBodyTypedDict, + GetResourcesStatisticsResponseTypedDict, + StatisticsResources, + StatisticsResourcesTypedDict, +) +from .getsearchresults import ( + GetSearchResultsCountry, + GetSearchResultsCountryTypedDict, + GetSearchResultsDirector, + GetSearchResultsDirectorTypedDict, + GetSearchResultsGenre, + GetSearchResultsGenreTypedDict, + GetSearchResultsMedia, + GetSearchResultsMediaContainer, + GetSearchResultsMediaContainerTypedDict, + GetSearchResultsMediaTypedDict, + GetSearchResultsMetadata, + GetSearchResultsMetadataTypedDict, + GetSearchResultsPart, + GetSearchResultsPartTypedDict, + GetSearchResultsRequest, + GetSearchResultsRequestTypedDict, + GetSearchResultsResponse, + GetSearchResultsResponseBody, + GetSearchResultsResponseBodyTypedDict, + GetSearchResultsResponseTypedDict, + GetSearchResultsRole, + GetSearchResultsRoleTypedDict, + GetSearchResultsWriter, + GetSearchResultsWriterTypedDict, + Provider, + ProviderTypedDict, +) +from .getserveractivities import ( + Activity, + ActivityTypedDict, + Context, + ContextTypedDict, + GetServerActivitiesMediaContainer, + GetServerActivitiesMediaContainerTypedDict, + GetServerActivitiesResponse, + GetServerActivitiesResponseBody, + GetServerActivitiesResponseBodyTypedDict, + GetServerActivitiesResponseTypedDict, +) +from .getservercapabilities import ( + Directory, + DirectoryTypedDict, + GetServerCapabilitiesResponse, + GetServerCapabilitiesResponseBody, + GetServerCapabilitiesResponseBodyTypedDict, + GetServerCapabilitiesResponseTypedDict, + MediaContainer, + MediaContainerTypedDict, +) +from .getserverlist import ( + GetServerListMediaContainer, + GetServerListMediaContainerTypedDict, + GetServerListResponse, + GetServerListResponseBody, + GetServerListResponseBodyTypedDict, + GetServerListResponseTypedDict, + GetServerListServer, + GetServerListServerTypedDict, +) +from .getserverpreferences import ( + GetServerPreferencesMediaContainer, + GetServerPreferencesMediaContainerTypedDict, + GetServerPreferencesResponse, + GetServerPreferencesResponseBody, + GetServerPreferencesResponseBodyTypedDict, + GetServerPreferencesResponseTypedDict, + Setting, + SettingTypedDict, +) +from .getsessionhistory import ( + GetSessionHistoryMediaContainer, + GetSessionHistoryMediaContainerTypedDict, + GetSessionHistoryMetadata, + GetSessionHistoryMetadataTypedDict, + GetSessionHistoryRequest, + GetSessionHistoryRequestTypedDict, + GetSessionHistoryResponse, + GetSessionHistoryResponseBody, + GetSessionHistoryResponseBodyTypedDict, + GetSessionHistoryResponseTypedDict, + QueryParamFilter, + QueryParamFilterTypedDict, +) +from .getsessions import ( + GetSessionsMedia, + GetSessionsMediaContainer, + GetSessionsMediaContainerTypedDict, + GetSessionsMediaTypedDict, + GetSessionsMetadata, + GetSessionsMetadataTypedDict, + GetSessionsPart, + GetSessionsPartTypedDict, + GetSessionsResponse, + GetSessionsResponseBody, + GetSessionsResponseBodyTypedDict, + GetSessionsResponseTypedDict, + GetSessionsStream, + GetSessionsStreamTypedDict, + GetSessionsUser, + GetSessionsUserTypedDict, + Player, + PlayerTypedDict, + Session, + SessionTypedDict, +) +from .getsourceconnectioninformation import ( + GetSourceConnectionInformationRequest, + GetSourceConnectionInformationRequestTypedDict, + GetSourceConnectionInformationResponse, + GetSourceConnectionInformationResponseTypedDict, +) +from .getstatistics import ( + Account, + AccountTypedDict, + GetStatisticsDevice, + GetStatisticsDeviceTypedDict, + GetStatisticsMediaContainer, + GetStatisticsMediaContainerTypedDict, + GetStatisticsRequest, + GetStatisticsRequestTypedDict, + GetStatisticsResponse, + GetStatisticsResponseBody, + GetStatisticsResponseBodyTypedDict, + GetStatisticsResponseTypedDict, + StatisticsMedia, + StatisticsMediaTypedDict, +) +from .gettimeline import ( + GetTimelineRequest, + GetTimelineRequestTypedDict, + GetTimelineResponse, + GetTimelineResponseTypedDict, + State, +) +from .gettokenbypinid import ( + GET_TOKEN_BY_PIN_ID_SERVERS, + GetTokenByPinIDAuthPinContainer, + GetTokenByPinIDAuthPinContainerTypedDict, + GetTokenByPinIDGeoData, + GetTokenByPinIDGeoDataTypedDict, + GetTokenByPinIDGlobals, + GetTokenByPinIDGlobalsTypedDict, + GetTokenByPinIDRequest, + GetTokenByPinIDRequestTypedDict, + GetTokenByPinIDResponse, + GetTokenByPinIDResponseTypedDict, +) +from .gettopwatchedcontent import ( + GetTopWatchedContentCountry, + GetTopWatchedContentCountryTypedDict, + GetTopWatchedContentGenre, + GetTopWatchedContentGenreTypedDict, + GetTopWatchedContentGuids, + GetTopWatchedContentGuidsTypedDict, + GetTopWatchedContentMediaContainer, + GetTopWatchedContentMediaContainerTypedDict, + GetTopWatchedContentMetadata, + GetTopWatchedContentMetadataTypedDict, + GetTopWatchedContentQueryParamType, + GetTopWatchedContentRequest, + GetTopWatchedContentRequestTypedDict, + GetTopWatchedContentResponse, + GetTopWatchedContentResponseBody, + GetTopWatchedContentResponseBodyTypedDict, + GetTopWatchedContentResponseTypedDict, + GetTopWatchedContentRole, + GetTopWatchedContentRoleTypedDict, + User, + UserTypedDict, +) +from .gettranscodesessions import ( + GetTranscodeSessionsMediaContainer, + GetTranscodeSessionsMediaContainerTypedDict, + GetTranscodeSessionsResponse, + GetTranscodeSessionsResponseBody, + GetTranscodeSessionsResponseBodyTypedDict, + GetTranscodeSessionsResponseTypedDict, + TranscodeSession, + TranscodeSessionTypedDict, +) +from .gettransienttoken import ( + GetTransientTokenQueryParamType, + GetTransientTokenRequest, + GetTransientTokenRequestTypedDict, + GetTransientTokenResponse, + GetTransientTokenResponseTypedDict, + Scope, +) +from .getupdatestatus import ( + GetUpdateStatusMediaContainer, + GetUpdateStatusMediaContainerTypedDict, + GetUpdateStatusResponse, + GetUpdateStatusResponseBody, + GetUpdateStatusResponseBodyTypedDict, + GetUpdateStatusResponseTypedDict, + Release, + ReleaseTypedDict, +) +from .getuserdetails import ( + AutoSelectSubtitle, + DefaultSubtitleAccessibility, + DefaultSubtitleForced, + Features, + GET_USER_DETAILS_SERVERS, + GetUserDetailsAuthenticationResponseStatus, + GetUserDetailsAuthenticationStatus, + GetUserDetailsFeatures, + GetUserDetailsRequest, + GetUserDetailsRequestTypedDict, + GetUserDetailsResponse, + GetUserDetailsResponseTypedDict, + GetUserDetailsStatus, + GetUserDetailsSubscription, + GetUserDetailsSubscriptionTypedDict, + GetUserDetailsUserPlexAccount, + GetUserDetailsUserPlexAccountTypedDict, + MailingListStatus, + MediaReviewsVisibility, + Services, + ServicesTypedDict, + Subscription, + SubscriptionTypedDict, + UserProfile, + UserProfileTypedDict, + WatchedIndicator, +) +from .getuserfriends import ( + Friend, + FriendTypedDict, + GET_USER_FRIENDS_SERVERS, + GetUserFriendsResponse, + GetUserFriendsResponseTypedDict, + SharedServers, + SharedServersTypedDict, + SharedSources, + SharedSourcesTypedDict, + Status, +) +from .logline import ( + Level, + LogLineRequest, + LogLineRequestTypedDict, + LogLineResponse, + LogLineResponseTypedDict, +) +from .logmultiline import LogMultiLineResponse, LogMultiLineResponseTypedDict +from .markplayed import ( + MarkPlayedRequest, + MarkPlayedRequestTypedDict, + MarkPlayedResponse, + MarkPlayedResponseTypedDict, +) +from .markunplayed import ( + MarkUnplayedRequest, + MarkUnplayedRequestTypedDict, + MarkUnplayedResponse, + MarkUnplayedResponseTypedDict, +) +from .performsearch import ( + PerformSearchRequest, + PerformSearchRequestTypedDict, + PerformSearchResponse, + PerformSearchResponseTypedDict, +) +from .performvoicesearch import ( + PerformVoiceSearchRequest, + PerformVoiceSearchRequestTypedDict, + PerformVoiceSearchResponse, + PerformVoiceSearchResponseTypedDict, +) +from .post_users_sign_in_data import ( + Billing, + BillingTypedDict, + InternalPaymentMethod, + InternalPaymentMethodTypedDict, + POST_USERS_SIGN_IN_DATA_SERVERS, + PastSubscription, + PastSubscriptionTypedDict, + PostUsersSignInDataAuthenticationFeatures, + PostUsersSignInDataAuthenticationResponseStatus, + PostUsersSignInDataAuthenticationStatus, + PostUsersSignInDataAuthenticationSubscription, + PostUsersSignInDataAuthenticationSubscriptionTypedDict, + PostUsersSignInDataAutoSelectSubtitle, + PostUsersSignInDataDefaultSubtitleAccessibility, + PostUsersSignInDataDefaultSubtitleForced, + PostUsersSignInDataFeatures, + PostUsersSignInDataGlobals, + PostUsersSignInDataGlobalsTypedDict, + PostUsersSignInDataMailingListStatus, + PostUsersSignInDataMediaReviewsVisibility, + PostUsersSignInDataRequest, + PostUsersSignInDataRequestBody, + PostUsersSignInDataRequestBodyTypedDict, + PostUsersSignInDataRequestTypedDict, + PostUsersSignInDataResponse, + PostUsersSignInDataResponseTypedDict, + PostUsersSignInDataServices, + PostUsersSignInDataServicesTypedDict, + PostUsersSignInDataState, + PostUsersSignInDataStatus, + PostUsersSignInDataSubscription, + PostUsersSignInDataSubscriptionTypedDict, + PostUsersSignInDataUserPlexAccount, + PostUsersSignInDataUserPlexAccountTypedDict, + PostUsersSignInDataUserProfile, + PostUsersSignInDataUserProfileTypedDict, + PostUsersSignInDataWatchedIndicator, + Trials, + TrialsTypedDict, +) +from .startalltasks import StartAllTasksResponse, StartAllTasksResponseTypedDict +from .starttask import ( + StartTaskRequest, + StartTaskRequestTypedDict, + StartTaskResponse, + StartTaskResponseTypedDict, + TaskName, +) +from .startuniversaltranscode import ( + StartUniversalTranscodeRequest, + StartUniversalTranscodeRequestTypedDict, + StartUniversalTranscodeResponse, + StartUniversalTranscodeResponseTypedDict, +) +from .stopalltasks import StopAllTasksResponse, StopAllTasksResponseTypedDict +from .stoptask import ( + PathParamTaskName, + StopTaskRequest, + StopTaskRequestTypedDict, + StopTaskResponse, + StopTaskResponseTypedDict, +) +from .stoptranscodesession import ( + StopTranscodeSessionRequest, + StopTranscodeSessionRequestTypedDict, + StopTranscodeSessionResponse, + StopTranscodeSessionResponseTypedDict, +) +from .updateplaylist import ( + UpdatePlaylistRequest, + UpdatePlaylistRequestTypedDict, + UpdatePlaylistResponse, + UpdatePlaylistResponseTypedDict, +) +from .updateplayprogress import ( + UpdatePlayProgressRequest, + UpdatePlayProgressRequestTypedDict, + UpdatePlayProgressResponse, + UpdatePlayProgressResponseTypedDict, +) +from .uploadplaylist import ( + QueryParamForce, + UploadPlaylistRequest, + UploadPlaylistRequestTypedDict, + UploadPlaylistResponse, + UploadPlaylistResponseTypedDict, +) + +__all__ = [ + "Account", + "AccountTypedDict", + "Activity", + "ActivityTypedDict", + "AddPlaylistContentsMediaContainer", + "AddPlaylistContentsMediaContainerTypedDict", + "AddPlaylistContentsMetadata", + "AddPlaylistContentsMetadataTypedDict", + "AddPlaylistContentsRequest", + "AddPlaylistContentsRequestTypedDict", + "AddPlaylistContentsResponse", + "AddPlaylistContentsResponseBody", + "AddPlaylistContentsResponseBodyTypedDict", + "AddPlaylistContentsResponseTypedDict", + "ApplyUpdatesRequest", + "ApplyUpdatesRequestTypedDict", + "ApplyUpdatesResponse", + "ApplyUpdatesResponseTypedDict", + "AutoSelectSubtitle", + "Billing", + "BillingTypedDict", + "ButlerTask", + "ButlerTaskTypedDict", + "ButlerTasks", + "ButlerTasksTypedDict", + "CancelServerActivitiesRequest", + "CancelServerActivitiesRequestTypedDict", + "CancelServerActivitiesResponse", + "CancelServerActivitiesResponseTypedDict", + "CheckForUpdatesRequest", + "CheckForUpdatesRequestTypedDict", + "CheckForUpdatesResponse", + "CheckForUpdatesResponseTypedDict", + "ClearPlaylistContentsRequest", + "ClearPlaylistContentsRequestTypedDict", + "ClearPlaylistContentsResponse", + "ClearPlaylistContentsResponseTypedDict", + "Connections", + "ConnectionsTypedDict", + "Context", + "ContextTypedDict", + "Country", + "CountryTypedDict", + "CreatePlaylistMediaContainer", + "CreatePlaylistMediaContainerTypedDict", + "CreatePlaylistMetadata", + "CreatePlaylistMetadataTypedDict", + "CreatePlaylistQueryParamType", + "CreatePlaylistRequest", + "CreatePlaylistRequestTypedDict", + "CreatePlaylistResponse", + "CreatePlaylistResponseBody", + "CreatePlaylistResponseBodyTypedDict", + "CreatePlaylistResponseTypedDict", + "DefaultSubtitleAccessibility", + "DefaultSubtitleForced", + "DeleteLibraryRequest", + "DeleteLibraryRequestTypedDict", + "DeleteLibraryResponse", + "DeleteLibraryResponseTypedDict", + "DeletePlaylistRequest", + "DeletePlaylistRequestTypedDict", + "DeletePlaylistResponse", + "DeletePlaylistResponseTypedDict", + "Device", + "DeviceTypedDict", + "Director", + "DirectorTypedDict", + "Directory", + "DirectoryTypedDict", + "Download", + "EnablePaperTrailResponse", + "EnablePaperTrailResponseTypedDict", + "Feature", + "FeatureTypedDict", + "Features", + "Field", + "FieldType", + "FieldTypeTypedDict", + "FieldTypedDict", + "Filter", + "Force", + "Friend", + "FriendTypedDict", + "GET_COMPANIONS_DATA_SERVERS", + "GET_GEO_DATA_SERVERS", + "GET_PIN_SERVERS", + "GET_SERVER_RESOURCES_SERVERS", + "GET_TOKEN_BY_PIN_ID_SERVERS", + "GET_USER_DETAILS_SERVERS", + "GET_USER_FRIENDS_SERVERS", + "GET_WATCH_LIST_SERVERS", + "Genre", + "GenreTypedDict", + "GeoData", + "GeoDataTypedDict", + "GetAllLibrariesDirectory", + "GetAllLibrariesDirectoryTypedDict", + "GetAllLibrariesMediaContainer", + "GetAllLibrariesMediaContainerTypedDict", + "GetAllLibrariesResponse", + "GetAllLibrariesResponseBody", + "GetAllLibrariesResponseBodyTypedDict", + "GetAllLibrariesResponseTypedDict", + "GetAvailableClientsMediaContainer", + "GetAvailableClientsMediaContainerTypedDict", + "GetAvailableClientsResponse", + "GetAvailableClientsResponseBody", + "GetAvailableClientsResponseBodyTypedDict", + "GetAvailableClientsResponseTypedDict", + "GetBandwidthStatisticsAccount", + "GetBandwidthStatisticsAccountTypedDict", + "GetBandwidthStatisticsDevice", + "GetBandwidthStatisticsDeviceTypedDict", + "GetBandwidthStatisticsMediaContainer", + "GetBandwidthStatisticsMediaContainerTypedDict", + "GetBandwidthStatisticsRequest", + "GetBandwidthStatisticsRequestTypedDict", + "GetBandwidthStatisticsResponse", + "GetBandwidthStatisticsResponseBody", + "GetBandwidthStatisticsResponseBodyTypedDict", + "GetBandwidthStatisticsResponseTypedDict", + "GetBannerImageRequest", + "GetBannerImageRequestTypedDict", + "GetBannerImageResponse", + "GetBannerImageResponseTypedDict", + "GetButlerTasksResponse", + "GetButlerTasksResponseBody", + "GetButlerTasksResponseBodyTypedDict", + "GetButlerTasksResponseTypedDict", + "GetCompanionsDataResponse", + "GetCompanionsDataResponseTypedDict", + "GetDevicesMediaContainer", + "GetDevicesMediaContainerTypedDict", + "GetDevicesResponse", + "GetDevicesResponseBody", + "GetDevicesResponseBodyTypedDict", + "GetDevicesResponseTypedDict", + "GetFileHashRequest", + "GetFileHashRequestTypedDict", + "GetFileHashResponse", + "GetFileHashResponseTypedDict", + "GetGeoDataGeoData", + "GetGeoDataGeoDataTypedDict", + "GetGeoDataResponse", + "GetGeoDataResponseTypedDict", + "GetGlobalHubsMediaContainer", + "GetGlobalHubsMediaContainerTypedDict", + "GetGlobalHubsMetadata", + "GetGlobalHubsMetadataTypedDict", + "GetGlobalHubsRequest", + "GetGlobalHubsRequestTypedDict", + "GetGlobalHubsResponse", + "GetGlobalHubsResponseBody", + "GetGlobalHubsResponseBodyTypedDict", + "GetGlobalHubsResponseTypedDict", + "GetHomeDataResponse", + "GetHomeDataResponseBody", + "GetHomeDataResponseBodyTypedDict", + "GetHomeDataResponseTypedDict", + "GetLibraryDetailsDirectory", + "GetLibraryDetailsDirectoryTypedDict", + "GetLibraryDetailsFilter", + "GetLibraryDetailsFilterTypedDict", + "GetLibraryDetailsMediaContainer", + "GetLibraryDetailsMediaContainerTypedDict", + "GetLibraryDetailsRequest", + "GetLibraryDetailsRequestTypedDict", + "GetLibraryDetailsResponse", + "GetLibraryDetailsResponseBody", + "GetLibraryDetailsResponseBodyTypedDict", + "GetLibraryDetailsResponseTypedDict", + "GetLibraryDetailsType", + "GetLibraryDetailsTypeTypedDict", + "GetLibraryHubsCountry", + "GetLibraryHubsCountryTypedDict", + "GetLibraryHubsDirector", + "GetLibraryHubsDirectorTypedDict", + "GetLibraryHubsGenre", + "GetLibraryHubsGenreTypedDict", + "GetLibraryHubsHub", + "GetLibraryHubsHubTypedDict", + "GetLibraryHubsMedia", + "GetLibraryHubsMediaContainer", + "GetLibraryHubsMediaContainerTypedDict", + "GetLibraryHubsMediaTypedDict", + "GetLibraryHubsMetadata", + "GetLibraryHubsMetadataTypedDict", + "GetLibraryHubsPart", + "GetLibraryHubsPartTypedDict", + "GetLibraryHubsRequest", + "GetLibraryHubsRequestTypedDict", + "GetLibraryHubsResponse", + "GetLibraryHubsResponseBody", + "GetLibraryHubsResponseBodyTypedDict", + "GetLibraryHubsResponseTypedDict", + "GetLibraryHubsRole", + "GetLibraryHubsRoleTypedDict", + "GetLibraryHubsWriter", + "GetLibraryHubsWriterTypedDict", + "GetLibraryItemsCountry", + "GetLibraryItemsCountryTypedDict", + "GetLibraryItemsDirector", + "GetLibraryItemsDirectorTypedDict", + "GetLibraryItemsGenre", + "GetLibraryItemsGenreTypedDict", + "GetLibraryItemsMedia", + "GetLibraryItemsMediaContainer", + "GetLibraryItemsMediaContainerTypedDict", + "GetLibraryItemsMediaTypedDict", + "GetLibraryItemsMetadata", + "GetLibraryItemsMetadataTypedDict", + "GetLibraryItemsPart", + "GetLibraryItemsPartTypedDict", + "GetLibraryItemsRequest", + "GetLibraryItemsRequestTypedDict", + "GetLibraryItemsResponse", + "GetLibraryItemsResponseBody", + "GetLibraryItemsResponseBodyTypedDict", + "GetLibraryItemsResponseTypedDict", + "GetLibraryItemsRole", + "GetLibraryItemsRoleTypedDict", + "GetLibraryItemsWriter", + "GetLibraryItemsWriterTypedDict", + "GetMediaProvidersDirectory", + "GetMediaProvidersDirectoryTypedDict", + "GetMediaProvidersMediaContainer", + "GetMediaProvidersMediaContainerTypedDict", + "GetMediaProvidersRequest", + "GetMediaProvidersRequestTypedDict", + "GetMediaProvidersResponse", + "GetMediaProvidersResponseBody", + "GetMediaProvidersResponseBodyTypedDict", + "GetMediaProvidersResponseTypedDict", + "GetMetaDataByRatingKeyCountry", + "GetMetaDataByRatingKeyCountryTypedDict", + "GetMetaDataByRatingKeyDirector", + "GetMetaDataByRatingKeyDirectorTypedDict", + "GetMetaDataByRatingKeyGenre", + "GetMetaDataByRatingKeyGenreTypedDict", + "GetMetaDataByRatingKeyMedia", + "GetMetaDataByRatingKeyMediaContainer", + "GetMetaDataByRatingKeyMediaContainerTypedDict", + "GetMetaDataByRatingKeyMediaTypedDict", + "GetMetaDataByRatingKeyMetadata", + "GetMetaDataByRatingKeyMetadataTypedDict", + "GetMetaDataByRatingKeyPart", + "GetMetaDataByRatingKeyPartTypedDict", + "GetMetaDataByRatingKeyRequest", + "GetMetaDataByRatingKeyRequestTypedDict", + "GetMetaDataByRatingKeyResponse", + "GetMetaDataByRatingKeyResponseBody", + "GetMetaDataByRatingKeyResponseBodyTypedDict", + "GetMetaDataByRatingKeyResponseTypedDict", + "GetMetaDataByRatingKeyRole", + "GetMetaDataByRatingKeyRoleTypedDict", + "GetMetaDataByRatingKeyWriter", + "GetMetaDataByRatingKeyWriterTypedDict", + "GetMetadataChildrenDirectory", + "GetMetadataChildrenDirectoryTypedDict", + "GetMetadataChildrenMediaContainer", + "GetMetadataChildrenMediaContainerTypedDict", + "GetMetadataChildrenMetadata", + "GetMetadataChildrenMetadataTypedDict", + "GetMetadataChildrenRequest", + "GetMetadataChildrenRequestTypedDict", + "GetMetadataChildrenResponse", + "GetMetadataChildrenResponseBody", + "GetMetadataChildrenResponseBodyTypedDict", + "GetMetadataChildrenResponseTypedDict", + "GetMyPlexAccountResponse", + "GetMyPlexAccountResponseBody", + "GetMyPlexAccountResponseBodyTypedDict", + "GetMyPlexAccountResponseTypedDict", + "GetOnDeckGuids", + "GetOnDeckGuidsTypedDict", + "GetOnDeckMedia", + "GetOnDeckMediaContainer", + "GetOnDeckMediaContainerTypedDict", + "GetOnDeckMediaTypedDict", + "GetOnDeckMetadata", + "GetOnDeckMetadataTypedDict", + "GetOnDeckPart", + "GetOnDeckPartTypedDict", + "GetOnDeckResponse", + "GetOnDeckResponseBody", + "GetOnDeckResponseBodyTypedDict", + "GetOnDeckResponseTypedDict", + "GetOnDeckStream", + "GetOnDeckStreamTypedDict", + "GetPinAuthPinContainer", + "GetPinAuthPinContainerTypedDict", + "GetPinGlobals", + "GetPinGlobalsTypedDict", + "GetPinRequest", + "GetPinRequestTypedDict", + "GetPinResponse", + "GetPinResponseTypedDict", + "GetPlaylistContentsCountry", + "GetPlaylistContentsCountryTypedDict", + "GetPlaylistContentsDirector", + "GetPlaylistContentsDirectorTypedDict", + "GetPlaylistContentsGenre", + "GetPlaylistContentsGenreTypedDict", + "GetPlaylistContentsMedia", + "GetPlaylistContentsMediaContainer", + "GetPlaylistContentsMediaContainerTypedDict", + "GetPlaylistContentsMediaTypedDict", + "GetPlaylistContentsMetadata", + "GetPlaylistContentsMetadataTypedDict", + "GetPlaylistContentsPart", + "GetPlaylistContentsPartTypedDict", + "GetPlaylistContentsQueryParamType", + "GetPlaylistContentsRequest", + "GetPlaylistContentsRequestTypedDict", + "GetPlaylistContentsResponse", + "GetPlaylistContentsResponseBody", + "GetPlaylistContentsResponseBodyTypedDict", + "GetPlaylistContentsResponseTypedDict", + "GetPlaylistContentsRole", + "GetPlaylistContentsRoleTypedDict", + "GetPlaylistContentsWriter", + "GetPlaylistContentsWriterTypedDict", + "GetPlaylistMediaContainer", + "GetPlaylistMediaContainerTypedDict", + "GetPlaylistMetadata", + "GetPlaylistMetadataTypedDict", + "GetPlaylistRequest", + "GetPlaylistRequestTypedDict", + "GetPlaylistResponse", + "GetPlaylistResponseBody", + "GetPlaylistResponseBodyTypedDict", + "GetPlaylistResponseTypedDict", + "GetPlaylistsMediaContainer", + "GetPlaylistsMediaContainerTypedDict", + "GetPlaylistsMetadata", + "GetPlaylistsMetadataTypedDict", + "GetPlaylistsRequest", + "GetPlaylistsRequestTypedDict", + "GetPlaylistsResponse", + "GetPlaylistsResponseBody", + "GetPlaylistsResponseBodyTypedDict", + "GetPlaylistsResponseTypedDict", + "GetRecentlyAddedMediaContainer", + "GetRecentlyAddedMediaContainerTypedDict", + "GetRecentlyAddedMetadata", + "GetRecentlyAddedMetadataTypedDict", + "GetRecentlyAddedRequest", + "GetRecentlyAddedRequestTypedDict", + "GetRecentlyAddedResponse", + "GetRecentlyAddedResponseBody", + "GetRecentlyAddedResponseBodyTypedDict", + "GetRecentlyAddedResponseTypedDict", + "GetRefreshLibraryMetadataRequest", + "GetRefreshLibraryMetadataRequestTypedDict", + "GetRefreshLibraryMetadataResponse", + "GetRefreshLibraryMetadataResponseTypedDict", + "GetResizedPhotoRequest", + "GetResizedPhotoRequestTypedDict", + "GetResizedPhotoResponse", + "GetResizedPhotoResponseTypedDict", + "GetResourcesStatisticsMediaContainer", + "GetResourcesStatisticsMediaContainerTypedDict", + "GetResourcesStatisticsRequest", + "GetResourcesStatisticsRequestTypedDict", + "GetResourcesStatisticsResponse", + "GetResourcesStatisticsResponseBody", + "GetResourcesStatisticsResponseBodyTypedDict", + "GetResourcesStatisticsResponseTypedDict", + "GetSearchLibraryMediaContainer", + "GetSearchLibraryMediaContainerTypedDict", + "GetSearchLibraryMetadata", + "GetSearchLibraryMetadataTypedDict", + "GetSearchLibraryRequest", + "GetSearchLibraryRequestTypedDict", + "GetSearchLibraryResponse", + "GetSearchLibraryResponseBody", + "GetSearchLibraryResponseBodyTypedDict", + "GetSearchLibraryResponseTypedDict", + "GetSearchResultsCountry", + "GetSearchResultsCountryTypedDict", + "GetSearchResultsDirector", + "GetSearchResultsDirectorTypedDict", + "GetSearchResultsGenre", + "GetSearchResultsGenreTypedDict", + "GetSearchResultsMedia", + "GetSearchResultsMediaContainer", + "GetSearchResultsMediaContainerTypedDict", + "GetSearchResultsMediaTypedDict", + "GetSearchResultsMetadata", + "GetSearchResultsMetadataTypedDict", + "GetSearchResultsPart", + "GetSearchResultsPartTypedDict", + "GetSearchResultsRequest", + "GetSearchResultsRequestTypedDict", + "GetSearchResultsResponse", + "GetSearchResultsResponseBody", + "GetSearchResultsResponseBodyTypedDict", + "GetSearchResultsResponseTypedDict", + "GetSearchResultsRole", + "GetSearchResultsRoleTypedDict", + "GetSearchResultsWriter", + "GetSearchResultsWriterTypedDict", + "GetServerActivitiesMediaContainer", + "GetServerActivitiesMediaContainerTypedDict", + "GetServerActivitiesResponse", + "GetServerActivitiesResponseBody", + "GetServerActivitiesResponseBodyTypedDict", + "GetServerActivitiesResponseTypedDict", + "GetServerCapabilitiesResponse", + "GetServerCapabilitiesResponseBody", + "GetServerCapabilitiesResponseBodyTypedDict", + "GetServerCapabilitiesResponseTypedDict", + "GetServerIdentityMediaContainer", + "GetServerIdentityMediaContainerTypedDict", + "GetServerIdentityResponse", + "GetServerIdentityResponseBody", + "GetServerIdentityResponseBodyTypedDict", + "GetServerIdentityResponseTypedDict", + "GetServerListMediaContainer", + "GetServerListMediaContainerTypedDict", + "GetServerListResponse", + "GetServerListResponseBody", + "GetServerListResponseBodyTypedDict", + "GetServerListResponseTypedDict", + "GetServerListServer", + "GetServerListServerTypedDict", + "GetServerPreferencesMediaContainer", + "GetServerPreferencesMediaContainerTypedDict", + "GetServerPreferencesResponse", + "GetServerPreferencesResponseBody", + "GetServerPreferencesResponseBodyTypedDict", + "GetServerPreferencesResponseTypedDict", + "GetServerResourcesGlobals", + "GetServerResourcesGlobalsTypedDict", + "GetServerResourcesRequest", + "GetServerResourcesRequestTypedDict", + "GetServerResourcesResponse", + "GetServerResourcesResponseTypedDict", + "GetSessionHistoryMediaContainer", + "GetSessionHistoryMediaContainerTypedDict", + "GetSessionHistoryMetadata", + "GetSessionHistoryMetadataTypedDict", + "GetSessionHistoryRequest", + "GetSessionHistoryRequestTypedDict", + "GetSessionHistoryResponse", + "GetSessionHistoryResponseBody", + "GetSessionHistoryResponseBodyTypedDict", + "GetSessionHistoryResponseTypedDict", + "GetSessionsMedia", + "GetSessionsMediaContainer", + "GetSessionsMediaContainerTypedDict", + "GetSessionsMediaTypedDict", + "GetSessionsMetadata", + "GetSessionsMetadataTypedDict", + "GetSessionsPart", + "GetSessionsPartTypedDict", + "GetSessionsResponse", + "GetSessionsResponseBody", + "GetSessionsResponseBodyTypedDict", + "GetSessionsResponseTypedDict", + "GetSessionsStream", + "GetSessionsStreamTypedDict", + "GetSessionsUser", + "GetSessionsUserTypedDict", + "GetSourceConnectionInformationRequest", + "GetSourceConnectionInformationRequestTypedDict", + "GetSourceConnectionInformationResponse", + "GetSourceConnectionInformationResponseTypedDict", + "GetStatisticsDevice", + "GetStatisticsDeviceTypedDict", + "GetStatisticsMediaContainer", + "GetStatisticsMediaContainerTypedDict", + "GetStatisticsRequest", + "GetStatisticsRequestTypedDict", + "GetStatisticsResponse", + "GetStatisticsResponseBody", + "GetStatisticsResponseBodyTypedDict", + "GetStatisticsResponseTypedDict", + "GetThumbImageRequest", + "GetThumbImageRequestTypedDict", + "GetThumbImageResponse", + "GetThumbImageResponseTypedDict", + "GetTimelineRequest", + "GetTimelineRequestTypedDict", + "GetTimelineResponse", + "GetTimelineResponseTypedDict", + "GetTokenByPinIDAuthPinContainer", + "GetTokenByPinIDAuthPinContainerTypedDict", + "GetTokenByPinIDGeoData", + "GetTokenByPinIDGeoDataTypedDict", + "GetTokenByPinIDGlobals", + "GetTokenByPinIDGlobalsTypedDict", + "GetTokenByPinIDRequest", + "GetTokenByPinIDRequestTypedDict", + "GetTokenByPinIDResponse", + "GetTokenByPinIDResponseTypedDict", + "GetTopWatchedContentCountry", + "GetTopWatchedContentCountryTypedDict", + "GetTopWatchedContentGenre", + "GetTopWatchedContentGenreTypedDict", + "GetTopWatchedContentGuids", + "GetTopWatchedContentGuidsTypedDict", + "GetTopWatchedContentMediaContainer", + "GetTopWatchedContentMediaContainerTypedDict", + "GetTopWatchedContentMetadata", + "GetTopWatchedContentMetadataTypedDict", + "GetTopWatchedContentQueryParamType", + "GetTopWatchedContentRequest", + "GetTopWatchedContentRequestTypedDict", + "GetTopWatchedContentResponse", + "GetTopWatchedContentResponseBody", + "GetTopWatchedContentResponseBodyTypedDict", + "GetTopWatchedContentResponseTypedDict", + "GetTopWatchedContentRole", + "GetTopWatchedContentRoleTypedDict", + "GetTranscodeSessionsMediaContainer", + "GetTranscodeSessionsMediaContainerTypedDict", + "GetTranscodeSessionsResponse", + "GetTranscodeSessionsResponseBody", + "GetTranscodeSessionsResponseBodyTypedDict", + "GetTranscodeSessionsResponseTypedDict", + "GetTransientTokenQueryParamType", + "GetTransientTokenRequest", + "GetTransientTokenRequestTypedDict", + "GetTransientTokenResponse", + "GetTransientTokenResponseTypedDict", + "GetUpdateStatusMediaContainer", + "GetUpdateStatusMediaContainerTypedDict", + "GetUpdateStatusResponse", + "GetUpdateStatusResponseBody", + "GetUpdateStatusResponseBodyTypedDict", + "GetUpdateStatusResponseTypedDict", + "GetUserDetailsAuthenticationResponseStatus", + "GetUserDetailsAuthenticationStatus", + "GetUserDetailsFeatures", + "GetUserDetailsRequest", + "GetUserDetailsRequestTypedDict", + "GetUserDetailsResponse", + "GetUserDetailsResponseTypedDict", + "GetUserDetailsStatus", + "GetUserDetailsSubscription", + "GetUserDetailsSubscriptionTypedDict", + "GetUserDetailsUserPlexAccount", + "GetUserDetailsUserPlexAccountTypedDict", + "GetUserFriendsResponse", + "GetUserFriendsResponseTypedDict", + "GetWatchListRequest", + "GetWatchListRequestTypedDict", + "GetWatchListResponse", + "GetWatchListResponseBody", + "GetWatchListResponseBodyTypedDict", + "GetWatchListResponseTypedDict", + "Guids", + "GuidsTypedDict", + "Hub", + "HubTypedDict", + "Image", + "ImageTypedDict", + "IncludeCollections", + "IncludeDetails", + "IncludeExternalMedia", + "IncludeGuids", + "IncludeHTTPS", + "IncludeIPv6", + "IncludeMeta", + "IncludeRelay", + "InternalPaymentMethod", + "InternalPaymentMethodTypedDict", + "Level", + "LibrarySectionID", + "LibrarySectionIDTypedDict", + "Libtype", + "Location", + "LocationTypedDict", + "LogLineRequest", + "LogLineRequestTypedDict", + "LogLineResponse", + "LogLineResponseTypedDict", + "LogMultiLineResponse", + "LogMultiLineResponseTypedDict", + "MailingListStatus", + "MarkPlayedRequest", + "MarkPlayedRequestTypedDict", + "MarkPlayedResponse", + "MarkPlayedResponseTypedDict", + "MarkUnplayedRequest", + "MarkUnplayedRequestTypedDict", + "MarkUnplayedResponse", + "MarkUnplayedResponseTypedDict", + "Media", + "MediaContainer", + "MediaContainerTypedDict", + "MediaProvider", + "MediaProviderTypedDict", + "MediaReviewsVisibility", + "MediaTypedDict", + "Metadata", + "MetadataTypedDict", + "MinSize", + "MyPlex", + "MyPlexTypedDict", + "OnlyTransient", + "Operator", + "OperatorTypedDict", + "POST_USERS_SIGN_IN_DATA_SERVERS", + "Part", + "PartTypedDict", + "PastSubscription", + "PastSubscriptionTypedDict", + "PathParamTaskName", + "PerformSearchRequest", + "PerformSearchRequestTypedDict", + "PerformSearchResponse", + "PerformSearchResponseTypedDict", + "PerformVoiceSearchRequest", + "PerformVoiceSearchRequestTypedDict", + "PerformVoiceSearchResponse", + "PerformVoiceSearchResponseTypedDict", + "Pivot", + "PivotTypedDict", + "Player", + "PlayerTypedDict", + "PlaylistType", + "PlexDevice", + "PlexDeviceTypedDict", + "PostUsersSignInDataAuthenticationFeatures", + "PostUsersSignInDataAuthenticationResponseStatus", + "PostUsersSignInDataAuthenticationStatus", + "PostUsersSignInDataAuthenticationSubscription", + "PostUsersSignInDataAuthenticationSubscriptionTypedDict", + "PostUsersSignInDataAutoSelectSubtitle", + "PostUsersSignInDataDefaultSubtitleAccessibility", + "PostUsersSignInDataDefaultSubtitleForced", + "PostUsersSignInDataFeatures", + "PostUsersSignInDataGlobals", + "PostUsersSignInDataGlobalsTypedDict", + "PostUsersSignInDataMailingListStatus", + "PostUsersSignInDataMediaReviewsVisibility", + "PostUsersSignInDataRequest", + "PostUsersSignInDataRequestBody", + "PostUsersSignInDataRequestBodyTypedDict", + "PostUsersSignInDataRequestTypedDict", + "PostUsersSignInDataResponse", + "PostUsersSignInDataResponseTypedDict", + "PostUsersSignInDataServices", + "PostUsersSignInDataServicesTypedDict", + "PostUsersSignInDataState", + "PostUsersSignInDataStatus", + "PostUsersSignInDataSubscription", + "PostUsersSignInDataSubscriptionTypedDict", + "PostUsersSignInDataUserPlexAccount", + "PostUsersSignInDataUserPlexAccountTypedDict", + "PostUsersSignInDataUserProfile", + "PostUsersSignInDataUserProfileTypedDict", + "PostUsersSignInDataWatchedIndicator", + "Producer", + "ProducerTypedDict", + "Provider", + "ProviderTypedDict", + "QueryParamFilter", + "QueryParamFilterTypedDict", + "QueryParamForce", + "QueryParamOnlyTransient", + "QueryParamSmart", + "QueryParamType", + "Ratings", + "RatingsTypedDict", + "Release", + "ReleaseTypedDict", + "ResponseBody", + "ResponseBodyTypedDict", + "Role", + "RoleTypedDict", + "Scope", + "Server", + "ServerTypedDict", + "Services", + "ServicesTypedDict", + "Session", + "SessionTypedDict", + "Setting", + "SettingTypedDict", + "SharedServers", + "SharedServersTypedDict", + "SharedSources", + "SharedSourcesTypedDict", + "Skip", + "Smart", + "Sort", + "SortTypedDict", + "StartAllTasksResponse", + "StartAllTasksResponseTypedDict", + "StartTaskRequest", + "StartTaskRequestTypedDict", + "StartTaskResponse", + "StartTaskResponseTypedDict", + "StartUniversalTranscodeRequest", + "StartUniversalTranscodeRequestTypedDict", + "StartUniversalTranscodeResponse", + "StartUniversalTranscodeResponseTypedDict", + "State", + "StatisticsBandwidth", + "StatisticsBandwidthTypedDict", + "StatisticsMedia", + "StatisticsMediaTypedDict", + "StatisticsResources", + "StatisticsResourcesTypedDict", + "Status", + "StopAllTasksResponse", + "StopAllTasksResponseTypedDict", + "StopTaskRequest", + "StopTaskRequestTypedDict", + "StopTaskResponse", + "StopTaskResponseTypedDict", + "StopTranscodeSessionRequest", + "StopTranscodeSessionRequestTypedDict", + "StopTranscodeSessionResponse", + "StopTranscodeSessionResponseTypedDict", + "Stream", + "StreamTypedDict", + "Subscription", + "SubscriptionTypedDict", + "Tag", + "TaskName", + "Tonight", + "TranscodeSession", + "TranscodeSessionTypedDict", + "Trials", + "TrialsTypedDict", + "Type", + "UpdatePlayProgressRequest", + "UpdatePlayProgressRequestTypedDict", + "UpdatePlayProgressResponse", + "UpdatePlayProgressResponseTypedDict", + "UpdatePlaylistRequest", + "UpdatePlaylistRequestTypedDict", + "UpdatePlaylistResponse", + "UpdatePlaylistResponseTypedDict", + "UploadPlaylistRequest", + "UploadPlaylistRequestTypedDict", + "UploadPlaylistResponse", + "UploadPlaylistResponseTypedDict", + "Upscale", + "User", + "UserProfile", + "UserProfileTypedDict", + "UserTypedDict", + "WatchedIndicator", + "Writer", + "WriterTypedDict", +] diff --git a/src/plex_api_client/models/operations/addplaylistcontents.py b/src/plex_api_client/models/operations/addplaylistcontents.py new file mode 100644 index 0000000..8f497c1 --- /dev/null +++ b/src/plex_api_client/models/operations/addplaylistcontents.py @@ -0,0 +1,146 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AddPlaylistContentsRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + uri: str + r"""the content URI for the playlist""" + play_queue_id: NotRequired[float] + r"""the play queue to add to a playlist""" + + +class AddPlaylistContentsRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + uri: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""the content URI for the playlist""" + + play_queue_id: Annotated[ + Optional[float], + pydantic.Field(alias="playQueueID"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""the play queue to add to a playlist""" + + +class AddPlaylistContentsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + summary: NotRequired[str] + smart: NotRequired[bool] + playlist_type: NotRequired[str] + composite: NotRequired[str] + duration: NotRequired[int] + leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + + +class AddPlaylistContentsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + summary: Optional[str] = None + + smart: Optional[bool] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + composite: Optional[str] = None + + duration: Optional[int] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + +class AddPlaylistContentsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + leaf_count_added: NotRequired[int] + leaf_count_requested: NotRequired[int] + metadata: NotRequired[List[AddPlaylistContentsMetadataTypedDict]] + + +class AddPlaylistContentsMediaContainer(BaseModel): + size: Optional[int] = None + + leaf_count_added: Annotated[ + Optional[int], pydantic.Field(alias="leafCountAdded") + ] = None + + leaf_count_requested: Annotated[ + Optional[int], pydantic.Field(alias="leafCountRequested") + ] = None + + metadata: Annotated[ + Optional[List[AddPlaylistContentsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class AddPlaylistContentsResponseBodyTypedDict(TypedDict): + r"""Playlist Updated""" + + media_container: NotRequired[AddPlaylistContentsMediaContainerTypedDict] + + +class AddPlaylistContentsResponseBody(BaseModel): + r"""Playlist Updated""" + + media_container: Annotated[ + Optional[AddPlaylistContentsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class AddPlaylistContentsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[AddPlaylistContentsResponseBodyTypedDict] + r"""Playlist Updated""" + + +class AddPlaylistContentsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[AddPlaylistContentsResponseBody] = None + r"""Playlist Updated""" diff --git a/src/plex_api_client/models/operations/applyupdates.py b/src/plex_api_client/models/operations/applyupdates.py new file mode 100644 index 0000000..87df070 --- /dev/null +++ b/src/plex_api_client/models/operations/applyupdates.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class Tonight(int, Enum): + r"""Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install""" + + ZERO = 0 + ONE = 1 + + +class Skip(int, Enum): + r"""Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.""" + + ZERO = 0 + ONE = 1 + + +class ApplyUpdatesRequestTypedDict(TypedDict): + tonight: NotRequired[Tonight] + r"""Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install""" + skip: NotRequired[Skip] + r"""Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.""" + + +class ApplyUpdatesRequest(BaseModel): + tonight: Annotated[ + Optional[Tonight], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install""" + + skip: Annotated[ + Optional[Skip], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.""" + + +class ApplyUpdatesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ApplyUpdatesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/cancelserveractivities.py b/src/plex_api_client/models/operations/cancelserveractivities.py new file mode 100644 index 0000000..b857041 --- /dev/null +++ b/src/plex_api_client/models/operations/cancelserveractivities.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class CancelServerActivitiesRequestTypedDict(TypedDict): + activity_uuid: str + r"""The UUID of the activity to cancel.""" + + +class CancelServerActivitiesRequest(BaseModel): + activity_uuid: Annotated[ + str, + pydantic.Field(alias="activityUUID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The UUID of the activity to cancel.""" + + +class CancelServerActivitiesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CancelServerActivitiesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/checkforupdates.py b/src/plex_api_client/models/operations/checkforupdates.py new file mode 100644 index 0000000..44da887 --- /dev/null +++ b/src/plex_api_client/models/operations/checkforupdates.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class Download(int, Enum): + r"""Indicate that you want to start download any updates found.""" + + ZERO = 0 + ONE = 1 + + +class CheckForUpdatesRequestTypedDict(TypedDict): + download: NotRequired[Download] + r"""Indicate that you want to start download any updates found.""" + + +class CheckForUpdatesRequest(BaseModel): + download: Annotated[ + Optional[Download], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Indicate that you want to start download any updates found.""" + + +class CheckForUpdatesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class CheckForUpdatesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/clearplaylistcontents.py b/src/plex_api_client/models/operations/clearplaylistcontents.py new file mode 100644 index 0000000..c045f54 --- /dev/null +++ b/src/plex_api_client/models/operations/clearplaylistcontents.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class ClearPlaylistContentsRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + + +class ClearPlaylistContentsRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + +class ClearPlaylistContentsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ClearPlaylistContentsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/createplaylist.py b/src/plex_api_client/models/operations/createplaylist.py new file mode 100644 index 0000000..527e302 --- /dev/null +++ b/src/plex_api_client/models/operations/createplaylist.py @@ -0,0 +1,175 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class CreatePlaylistQueryParamType(str, Enum): + r"""type of playlist to create""" + + AUDIO = "audio" + VIDEO = "video" + PHOTO = "photo" + + +class Smart(int, Enum): + r"""whether the playlist is smart or not""" + + ZERO = 0 + ONE = 1 + + +class CreatePlaylistRequestTypedDict(TypedDict): + title: str + r"""name of the playlist""" + type: CreatePlaylistQueryParamType + r"""type of playlist to create""" + smart: Smart + r"""whether the playlist is smart or not""" + uri: str + r"""the content URI for the playlist""" + play_queue_id: NotRequired[float] + r"""the play queue to copy to a playlist""" + + +class CreatePlaylistRequest(BaseModel): + title: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""name of the playlist""" + + type: Annotated[ + CreatePlaylistQueryParamType, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""type of playlist to create""" + + smart: Annotated[ + Smart, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""whether the playlist is smart or not""" + + uri: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""the content URI for the playlist""" + + play_queue_id: Annotated[ + Optional[float], + pydantic.Field(alias="playQueueID"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""the play queue to copy to a playlist""" + + +class CreatePlaylistMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + summary: NotRequired[str] + smart: NotRequired[bool] + playlist_type: NotRequired[str] + icon: NotRequired[str] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + composite: NotRequired[str] + duration: NotRequired[int] + + +class CreatePlaylistMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + summary: Optional[str] = None + + smart: Optional[bool] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + icon: Optional[str] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + composite: Optional[str] = None + + duration: Optional[int] = None + + +class CreatePlaylistMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + metadata: NotRequired[List[CreatePlaylistMetadataTypedDict]] + + +class CreatePlaylistMediaContainer(BaseModel): + size: Optional[int] = None + + metadata: Annotated[ + Optional[List[CreatePlaylistMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class CreatePlaylistResponseBodyTypedDict(TypedDict): + r"""returns all playlists""" + + media_container: NotRequired[CreatePlaylistMediaContainerTypedDict] + + +class CreatePlaylistResponseBody(BaseModel): + r"""returns all playlists""" + + media_container: Annotated[ + Optional[CreatePlaylistMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class CreatePlaylistResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[CreatePlaylistResponseBodyTypedDict] + r"""returns all playlists""" + + +class CreatePlaylistResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[CreatePlaylistResponseBody] = None + r"""returns all playlists""" diff --git a/src/plex_api_client/models/operations/deletelibrary.py b/src/plex_api_client/models/operations/deletelibrary.py new file mode 100644 index 0000000..cc1ebba --- /dev/null +++ b/src/plex_api_client/models/operations/deletelibrary.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class DeleteLibraryRequestTypedDict(TypedDict): + section_key: int + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + +class DeleteLibraryRequest(BaseModel): + section_key: Annotated[ + int, + pydantic.Field(alias="sectionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + +class DeleteLibraryResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeleteLibraryResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/deleteplaylist.py b/src/plex_api_client/models/operations/deleteplaylist.py new file mode 100644 index 0000000..481e4a2 --- /dev/null +++ b/src/plex_api_client/models/operations/deleteplaylist.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class DeletePlaylistRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + + +class DeletePlaylistRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + +class DeletePlaylistResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeletePlaylistResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/enablepapertrail.py b/src/plex_api_client/models/operations/enablepapertrail.py new file mode 100644 index 0000000..9a0b24b --- /dev/null +++ b/src/plex_api_client/models/operations/enablepapertrail.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from typing import TypedDict + + +class EnablePaperTrailResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class EnablePaperTrailResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/get_all_libraries.py b/src/plex_api_client/models/operations/get_all_libraries.py new file mode 100644 index 0000000..b654ce1 --- /dev/null +++ b/src/plex_api_client/models/operations/get_all_libraries.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class LocationTypedDict(TypedDict): + id: NotRequired[int] + path: NotRequired[str] + + +class Location(BaseModel): + id: Optional[int] = None + + path: Optional[str] = None + + +class GetAllLibrariesDirectoryTypedDict(TypedDict): + allow_sync: NotRequired[bool] + art: NotRequired[str] + composite: NotRequired[str] + filters: NotRequired[bool] + refreshing: NotRequired[bool] + thumb: NotRequired[str] + key: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + agent: NotRequired[str] + scanner: NotRequired[str] + language: NotRequired[str] + uuid: NotRequired[str] + updated_at: NotRequired[int] + r"""Unix epoch datetime""" + created_at: NotRequired[int] + r"""Unix epoch datetime""" + scanned_at: NotRequired[int] + r"""Unix epoch datetime""" + content: NotRequired[bool] + directory: NotRequired[bool] + content_changed_at: NotRequired[int] + hidden: NotRequired[int] + location: NotRequired[List[LocationTypedDict]] + + +class GetAllLibrariesDirectory(BaseModel): + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + art: Optional[str] = None + + composite: Optional[str] = None + + filters: Optional[bool] = None + + refreshing: Optional[bool] = None + + thumb: Optional[str] = None + + key: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + agent: Optional[str] = None + + scanner: Optional[str] = None + + language: Optional[str] = None + + uuid: Optional[str] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + r"""Unix epoch datetime""" + + created_at: Annotated[Optional[int], pydantic.Field(alias="createdAt")] = None + r"""Unix epoch datetime""" + + scanned_at: Annotated[Optional[int], pydantic.Field(alias="scannedAt")] = None + r"""Unix epoch datetime""" + + content: Optional[bool] = None + + directory: Optional[bool] = None + + content_changed_at: Annotated[ + Optional[int], pydantic.Field(alias="contentChangedAt") + ] = None + + hidden: Optional[int] = None + + location: Annotated[Optional[List[Location]], pydantic.Field(alias="Location")] = ( + None + ) + + +class GetAllLibrariesMediaContainerTypedDict(TypedDict): + size: int + allow_sync: bool + title1: str + directory: NotRequired[List[GetAllLibrariesDirectoryTypedDict]] + + +class GetAllLibrariesMediaContainer(BaseModel): + size: int + + allow_sync: Annotated[bool, pydantic.Field(alias="allowSync")] + + title1: str + + directory: Annotated[ + Optional[List[GetAllLibrariesDirectory]], pydantic.Field(alias="Directory") + ] = None + + +class GetAllLibrariesResponseBodyTypedDict(TypedDict): + r"""The libraries available on the Server""" + + media_container: NotRequired[GetAllLibrariesMediaContainerTypedDict] + + +class GetAllLibrariesResponseBody(BaseModel): + r"""The libraries available on the Server""" + + media_container: Annotated[ + Optional[GetAllLibrariesMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetAllLibrariesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetAllLibrariesResponseBodyTypedDict] + r"""The libraries available on the Server""" + + +class GetAllLibrariesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetAllLibrariesResponseBody] = None + r"""The libraries available on the Server""" diff --git a/src/plex_api_client/models/operations/get_banner_image.py b/src/plex_api_client/models/operations/get_banner_image.py new file mode 100644 index 0000000..593a92b --- /dev/null +++ b/src/plex_api_client/models/operations/get_banner_image.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import Dict, List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetBannerImageRequestTypedDict(TypedDict): + rating_key: int + r"""the id of the library item to return the children of.""" + width: int + height: int + min_size: int + upscale: int + x_plex_token: str + r"""Plex Authentication Token""" + + +class GetBannerImageRequest(BaseModel): + rating_key: Annotated[ + int, + pydantic.Field(alias="ratingKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the id of the library item to return the children of.""" + + width: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + height: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + min_size: Annotated[ + int, + pydantic.Field(alias="minSize"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + + upscale: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + +class GetBannerImageResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + headers: Dict[str, List[str]] + response_stream: NotRequired[httpx.Response] + r"""Successful response returning an image""" + + +class GetBannerImageResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + headers: Dict[str, List[str]] + + response_stream: Optional[httpx.Response] = None + r"""Successful response returning an image""" diff --git a/src/plex_api_client/models/operations/get_library_details.py b/src/plex_api_client/models/operations/get_library_details.py new file mode 100644 index 0000000..5822eba --- /dev/null +++ b/src/plex_api_client/models/operations/get_library_details.py @@ -0,0 +1,293 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class IncludeDetails(int, Enum): + r"""Whether or not to include details for a section (types, filters, and sorts). + Only exists for backwards compatibility, media providers other than the server libraries have it on always. + + """ + + ZERO = 0 + ONE = 1 + + +class GetLibraryDetailsRequestTypedDict(TypedDict): + section_key: int + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + include_details: NotRequired[IncludeDetails] + r"""Whether or not to include details for a section (types, filters, and sorts). + Only exists for backwards compatibility, media providers other than the server libraries have it on always. + + """ + + +class GetLibraryDetailsRequest(BaseModel): + section_key: Annotated[ + int, + pydantic.Field(alias="sectionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + include_details: Annotated[ + Optional[IncludeDetails], + pydantic.Field(alias="includeDetails"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = IncludeDetails.ZERO + r"""Whether or not to include details for a section (types, filters, and sorts). + Only exists for backwards compatibility, media providers other than the server libraries have it on always. + + """ + + +class GetLibraryDetailsDirectoryTypedDict(TypedDict): + key: NotRequired[str] + title: NotRequired[str] + secondary: NotRequired[bool] + prompt: NotRequired[str] + search: NotRequired[bool] + + +class GetLibraryDetailsDirectory(BaseModel): + key: Optional[str] = None + + title: Optional[str] = None + + secondary: Optional[bool] = None + + prompt: Optional[str] = None + + search: Optional[bool] = None + + +class GetLibraryDetailsFilterTypedDict(TypedDict): + filter_: NotRequired[str] + filter_type: NotRequired[str] + key: NotRequired[str] + title: NotRequired[str] + type: NotRequired[str] + + +class GetLibraryDetailsFilter(BaseModel): + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + filter_type: Annotated[Optional[str], pydantic.Field(alias="filterType")] = None + + key: Optional[str] = None + + title: Optional[str] = None + + type: Optional[str] = None + + +class SortTypedDict(TypedDict): + default: NotRequired[str] + default_direction: NotRequired[str] + desc_key: NotRequired[str] + first_character_key: NotRequired[str] + key: NotRequired[str] + title: NotRequired[str] + + +class Sort(BaseModel): + default: Optional[str] = None + + default_direction: Annotated[ + Optional[str], pydantic.Field(alias="defaultDirection") + ] = None + + desc_key: Annotated[Optional[str], pydantic.Field(alias="descKey")] = None + + first_character_key: Annotated[ + Optional[str], pydantic.Field(alias="firstCharacterKey") + ] = None + + key: Optional[str] = None + + title: Optional[str] = None + + +class FieldTypedDict(TypedDict): + key: NotRequired[str] + title: NotRequired[str] + type: NotRequired[str] + sub_type: NotRequired[str] + + +class Field(BaseModel): + key: Optional[str] = None + + title: Optional[str] = None + + type: Optional[str] = None + + sub_type: Annotated[Optional[str], pydantic.Field(alias="subType")] = None + + +class GetLibraryDetailsTypeTypedDict(TypedDict): + key: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + active: NotRequired[bool] + filter_: NotRequired[List[GetLibraryDetailsFilterTypedDict]] + sort: NotRequired[List[SortTypedDict]] + field: NotRequired[List[FieldTypedDict]] + + +class GetLibraryDetailsType(BaseModel): + key: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + active: Optional[bool] = None + + filter_: Annotated[ + Optional[List[GetLibraryDetailsFilter]], pydantic.Field(alias="Filter") + ] = None + + sort: Annotated[Optional[List[Sort]], pydantic.Field(alias="Sort")] = None + + field: Annotated[Optional[List[Field]], pydantic.Field(alias="Field")] = None + + +class OperatorTypedDict(TypedDict): + key: NotRequired[str] + title: NotRequired[str] + + +class Operator(BaseModel): + key: Optional[str] = None + + title: Optional[str] = None + + +class FieldTypeTypedDict(TypedDict): + type: NotRequired[str] + operator: NotRequired[List[OperatorTypedDict]] + + +class FieldType(BaseModel): + type: Optional[str] = None + + operator: Annotated[Optional[List[Operator]], pydantic.Field(alias="Operator")] = ( + None + ) + + +class GetLibraryDetailsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + art: NotRequired[str] + content: NotRequired[str] + identifier: NotRequired[str] + library_section_id: NotRequired[int] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + thumb: NotRequired[str] + title1: NotRequired[str] + view_group: NotRequired[str] + view_mode: NotRequired[int] + directory: NotRequired[List[GetLibraryDetailsDirectoryTypedDict]] + type: NotRequired[List[GetLibraryDetailsTypeTypedDict]] + field_type: NotRequired[List[FieldTypeTypedDict]] + + +class GetLibraryDetailsMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + art: Optional[str] = None + + content: Optional[str] = None + + identifier: Optional[str] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + thumb: Optional[str] = None + + title1: Optional[str] = None + + view_group: Annotated[Optional[str], pydantic.Field(alias="viewGroup")] = None + + view_mode: Annotated[Optional[int], pydantic.Field(alias="viewMode")] = None + + directory: Annotated[ + Optional[List[GetLibraryDetailsDirectory]], pydantic.Field(alias="Directory") + ] = None + + type: Annotated[ + Optional[List[GetLibraryDetailsType]], pydantic.Field(alias="Type") + ] = None + + field_type: Annotated[ + Optional[List[FieldType]], pydantic.Field(alias="FieldType") + ] = None + + +class GetLibraryDetailsResponseBodyTypedDict(TypedDict): + r"""The details of the library""" + + media_container: NotRequired[GetLibraryDetailsMediaContainerTypedDict] + + +class GetLibraryDetailsResponseBody(BaseModel): + r"""The details of the library""" + + media_container: Annotated[ + Optional[GetLibraryDetailsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetLibraryDetailsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetLibraryDetailsResponseBodyTypedDict] + r"""The details of the library""" + + +class GetLibraryDetailsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetLibraryDetailsResponseBody] = None + r"""The details of the library""" diff --git a/src/plex_api_client/models/operations/get_library_items.py b/src/plex_api_client/models/operations/get_library_items.py new file mode 100644 index 0000000..b6965d3 --- /dev/null +++ b/src/plex_api_client/models/operations/get_library_items.py @@ -0,0 +1,632 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict, Union +from typing_extensions import Annotated, NotRequired + + +class Tag(str, Enum): + r"""A key representing a specific tag within the section.""" + + ALL = "all" + UNWATCHED = "unwatched" + NEWEST = "newest" + RECENTLY_ADDED = "recentlyAdded" + RECENTLY_VIEWED = "recentlyViewed" + ON_DECK = "onDeck" + COLLECTION = "collection" + EDITION = "edition" + GENRE = "genre" + YEAR = "year" + DECADE = "decade" + DIRECTOR = "director" + ACTOR = "actor" + COUNTRY = "country" + CONTENT_RATING = "contentRating" + RATING = "rating" + RESOLUTION = "resolution" + FIRST_CHARACTER = "firstCharacter" + FOLDER = "folder" + + +class IncludeGuids(int, Enum): + r"""Adds the Guids object to the response""" + + ZERO = 0 + ONE = 1 + + +class IncludeMeta(int, Enum): + r"""Adds the Meta object to the response""" + + ZERO = 0 + ONE = 1 + + +class Type(int, Enum): + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + + +class GetLibraryItemsRequestTypedDict(TypedDict): + section_key: int + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + tag: Tag + r"""A key representing a specific tag within the section.""" + type: Type + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + include_guids: NotRequired[IncludeGuids] + r"""Adds the Guids object to the response + + """ + include_meta: NotRequired[IncludeMeta] + r"""Adds the Meta object to the response + + """ + x_plex_container_start: NotRequired[int] + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + x_plex_container_size: NotRequired[int] + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +class GetLibraryItemsRequest(BaseModel): + section_key: Annotated[ + int, + pydantic.Field(alias="sectionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + tag: Annotated[ + Tag, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""A key representing a specific tag within the section.""" + + type: Annotated[ + Type, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + include_guids: Annotated[ + Optional[IncludeGuids], + pydantic.Field(alias="includeGuids"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Adds the Guids object to the response + + """ + + include_meta: Annotated[ + Optional[IncludeMeta], + pydantic.Field(alias="includeMeta"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Adds the Meta object to the response + + """ + + x_plex_container_start: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Start"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + + x_plex_container_size: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Size"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +LibrarySectionIDTypedDict = Union[int, str] + + +LibrarySectionID = Union[int, str] + + +class GetLibraryItemsPartTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + duration: NotRequired[int] + file: NotRequired[str] + size: NotRequired[int] + container: NotRequired[str] + video_profile: NotRequired[str] + + +class GetLibraryItemsPart(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + duration: Optional[int] = None + + file: Optional[str] = None + + size: Optional[int] = None + + container: Optional[str] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + +class GetLibraryItemsMediaTypedDict(TypedDict): + id: NotRequired[int] + duration: NotRequired[int] + bitrate: NotRequired[int] + width: NotRequired[int] + height: NotRequired[int] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[int] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[str] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + video_profile: NotRequired[str] + part: NotRequired[List[GetLibraryItemsPartTypedDict]] + + +class GetLibraryItemsMedia(BaseModel): + id: Optional[int] = None + + duration: Optional[int] = None + + bitrate: Optional[int] = None + + width: Optional[int] = None + + height: Optional[int] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[str], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[ + Optional[List[GetLibraryItemsPart]], pydantic.Field(alias="Part") + ] = None + + +class GetLibraryItemsGenreTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryItemsGenre(BaseModel): + tag: Optional[str] = None + + +class GetLibraryItemsCountryTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryItemsCountry(BaseModel): + tag: Optional[str] = None + + +class GetLibraryItemsDirectorTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryItemsDirector(BaseModel): + tag: Optional[str] = None + + +class GetLibraryItemsWriterTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryItemsWriter(BaseModel): + tag: Optional[str] = None + + +class GetLibraryItemsRoleTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryItemsRole(BaseModel): + tag: Optional[str] = None + + +class GetLibraryItemsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + year: NotRequired[int] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[int] + originally_available_at: NotRequired[date] + added_at: NotRequired[int] + updated_at: NotRequired[int] + audience_rating_image: NotRequired[str] + chapter_source: NotRequired[str] + primary_extra_key: NotRequired[str] + rating_image: NotRequired[str] + grandparent_rating_key: NotRequired[str] + grandparent_guid: NotRequired[str] + grandparent_key: NotRequired[str] + grandparent_title: NotRequired[str] + grandparent_thumb: NotRequired[str] + grandparent_art: NotRequired[str] + grandparent_theme: NotRequired[str] + media: NotRequired[List[GetLibraryItemsMediaTypedDict]] + genre: NotRequired[List[GetLibraryItemsGenreTypedDict]] + country: NotRequired[List[GetLibraryItemsCountryTypedDict]] + director: NotRequired[List[GetLibraryItemsDirectorTypedDict]] + writer: NotRequired[List[GetLibraryItemsWriterTypedDict]] + role: NotRequired[List[GetLibraryItemsRoleTypedDict]] + title_sort: NotRequired[str] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + original_title: NotRequired[str] + view_offset: NotRequired[int] + skip_count: NotRequired[int] + index: NotRequired[int] + theme: NotRequired[str] + leaf_count: NotRequired[int] + viewed_leaf_count: NotRequired[int] + child_count: NotRequired[int] + has_premium_extras: NotRequired[str] + has_premium_primary_extra: NotRequired[str] + parent_rating_key: NotRequired[str] + parent_guid: NotRequired[str] + parent_studio: NotRequired[str] + parent_key: NotRequired[str] + parent_title: NotRequired[str] + parent_index: NotRequired[int] + parent_year: NotRequired[int] + parent_thumb: NotRequired[str] + parent_theme: NotRequired[str] + + +class GetLibraryItemsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[int] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + chapter_source: Annotated[Optional[str], pydantic.Field(alias="chapterSource")] = ( + None + ) + + primary_extra_key: Annotated[ + Optional[str], pydantic.Field(alias="primaryExtraKey") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + grandparent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentRatingKey") + ] = None + + grandparent_guid: Annotated[ + Optional[str], pydantic.Field(alias="grandparentGuid") + ] = None + + grandparent_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentKey") + ] = None + + grandparent_title: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTitle") + ] = None + + grandparent_thumb: Annotated[ + Optional[str], pydantic.Field(alias="grandparentThumb") + ] = None + + grandparent_art: Annotated[ + Optional[str], pydantic.Field(alias="grandparentArt") + ] = None + + grandparent_theme: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTheme") + ] = None + + media: Annotated[ + Optional[List[GetLibraryItemsMedia]], pydantic.Field(alias="Media") + ] = None + + genre: Annotated[ + Optional[List[GetLibraryItemsGenre]], pydantic.Field(alias="Genre") + ] = None + + country: Annotated[ + Optional[List[GetLibraryItemsCountry]], pydantic.Field(alias="Country") + ] = None + + director: Annotated[ + Optional[List[GetLibraryItemsDirector]], pydantic.Field(alias="Director") + ] = None + + writer: Annotated[ + Optional[List[GetLibraryItemsWriter]], pydantic.Field(alias="Writer") + ] = None + + role: Annotated[ + Optional[List[GetLibraryItemsRole]], pydantic.Field(alias="Role") + ] = None + + title_sort: Annotated[Optional[str], pydantic.Field(alias="titleSort")] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + original_title: Annotated[Optional[str], pydantic.Field(alias="originalTitle")] = ( + None + ) + + view_offset: Annotated[Optional[int], pydantic.Field(alias="viewOffset")] = None + + skip_count: Annotated[Optional[int], pydantic.Field(alias="skipCount")] = None + + index: Optional[int] = None + + theme: Optional[str] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + viewed_leaf_count: Annotated[ + Optional[int], pydantic.Field(alias="viewedLeafCount") + ] = None + + child_count: Annotated[Optional[int], pydantic.Field(alias="childCount")] = None + + has_premium_extras: Annotated[ + Optional[str], pydantic.Field(alias="hasPremiumExtras") + ] = None + + has_premium_primary_extra: Annotated[ + Optional[str], pydantic.Field(alias="hasPremiumPrimaryExtra") + ] = None + + parent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="parentRatingKey") + ] = None + + parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None + + parent_studio: Annotated[Optional[str], pydantic.Field(alias="parentStudio")] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + parent_theme: Annotated[Optional[str], pydantic.Field(alias="parentTheme")] = None + + +class GetLibraryItemsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + art: NotRequired[str] + identifier: NotRequired[str] + library_section_id: NotRequired[LibrarySectionIDTypedDict] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + thumb: NotRequired[str] + title1: NotRequired[str] + title2: NotRequired[str] + view_group: NotRequired[str] + view_mode: NotRequired[int] + mixed_parents: NotRequired[bool] + metadata: NotRequired[List[GetLibraryItemsMetadataTypedDict]] + + +class GetLibraryItemsMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + art: Optional[str] = None + + identifier: Optional[str] = None + + library_section_id: Annotated[ + Optional[LibrarySectionID], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + thumb: Optional[str] = None + + title1: Optional[str] = None + + title2: Optional[str] = None + + view_group: Annotated[Optional[str], pydantic.Field(alias="viewGroup")] = None + + view_mode: Annotated[Optional[int], pydantic.Field(alias="viewMode")] = None + + mixed_parents: Annotated[Optional[bool], pydantic.Field(alias="mixedParents")] = ( + None + ) + + metadata: Annotated[ + Optional[List[GetLibraryItemsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetLibraryItemsResponseBodyTypedDict(TypedDict): + r"""The contents of the library by section and tag""" + + media_container: NotRequired[GetLibraryItemsMediaContainerTypedDict] + + +class GetLibraryItemsResponseBody(BaseModel): + r"""The contents of the library by section and tag""" + + media_container: Annotated[ + Optional[GetLibraryItemsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetLibraryItemsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetLibraryItemsResponseBodyTypedDict] + r"""The contents of the library by section and tag""" + + +class GetLibraryItemsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetLibraryItemsResponseBody] = None + r"""The contents of the library by section and tag""" diff --git a/src/plex_api_client/models/operations/get_media_providers.py b/src/plex_api_client/models/operations/get_media_providers.py new file mode 100644 index 0000000..4f46316 --- /dev/null +++ b/src/plex_api_client/models/operations/get_media_providers.py @@ -0,0 +1,360 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMediaProvidersRequestTypedDict(TypedDict): + x_plex_token: str + r"""Plex Authentication Token""" + + +class GetMediaProvidersRequest(BaseModel): + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + +class PivotTypedDict(TypedDict): + id: NotRequired[str] + key: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + context: NotRequired[str] + symbol: NotRequired[str] + + +class Pivot(BaseModel): + id: Optional[str] = None + + key: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + context: Optional[str] = None + + symbol: Optional[str] = None + + +class GetMediaProvidersDirectoryTypedDict(TypedDict): + hub_key: NotRequired[str] + title: NotRequired[str] + agent: NotRequired[str] + language: NotRequired[str] + refreshing: NotRequired[bool] + scanner: NotRequired[str] + uuid: NotRequired[str] + id: NotRequired[str] + key: NotRequired[str] + type: NotRequired[str] + subtype: NotRequired[str] + updated_at: NotRequired[int] + scanned_at: NotRequired[int] + pivot: NotRequired[List[PivotTypedDict]] + + +class GetMediaProvidersDirectory(BaseModel): + hub_key: Annotated[Optional[str], pydantic.Field(alias="hubKey")] = None + + title: Optional[str] = None + + agent: Optional[str] = None + + language: Optional[str] = None + + refreshing: Optional[bool] = None + + scanner: Optional[str] = None + + uuid: Optional[str] = None + + id: Optional[str] = None + + key: Optional[str] = None + + type: Optional[str] = None + + subtype: Optional[str] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + scanned_at: Annotated[Optional[int], pydantic.Field(alias="scannedAt")] = None + + pivot: Annotated[Optional[List[Pivot]], pydantic.Field(alias="Pivot")] = None + + +class FeatureTypedDict(TypedDict): + key: NotRequired[str] + type: NotRequired[str] + directory: NotRequired[List[GetMediaProvidersDirectoryTypedDict]] + + +class Feature(BaseModel): + key: Optional[str] = None + + type: Optional[str] = None + + directory: Annotated[ + Optional[List[GetMediaProvidersDirectory]], pydantic.Field(alias="Directory") + ] = None + + +class MediaProviderTypedDict(TypedDict): + identifier: NotRequired[str] + title: NotRequired[str] + types: NotRequired[str] + protocols: NotRequired[str] + feature: NotRequired[List[FeatureTypedDict]] + + +class MediaProvider(BaseModel): + identifier: Optional[str] = None + + title: Optional[str] = None + + types: Optional[str] = None + + protocols: Optional[str] = None + + feature: Annotated[Optional[List[Feature]], pydantic.Field(alias="Feature")] = None + + +class GetMediaProvidersMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_camera_upload: NotRequired[bool] + allow_channel_access: NotRequired[bool] + allow_sharing: NotRequired[bool] + allow_sync: NotRequired[bool] + allow_tuners: NotRequired[bool] + background_processing: NotRequired[bool] + certificate: NotRequired[bool] + companion_proxy: NotRequired[bool] + country_code: NotRequired[str] + diagnostics: NotRequired[str] + event_stream: NotRequired[bool] + friendly_name: NotRequired[str] + livetv: NotRequired[int] + machine_identifier: NotRequired[str] + music_analysis: NotRequired[int] + my_plex: NotRequired[bool] + my_plex_mapping_state: NotRequired[str] + my_plex_signin_state: NotRequired[str] + my_plex_subscription: NotRequired[bool] + my_plex_username: NotRequired[str] + offline_transcode: NotRequired[int] + owner_features: NotRequired[str] + platform: NotRequired[str] + platform_version: NotRequired[str] + plugin_host: NotRequired[bool] + push_notifications: NotRequired[bool] + read_only_libraries: NotRequired[bool] + streaming_brain_abr_version: NotRequired[int] + streaming_brain_version: NotRequired[int] + sync: NotRequired[bool] + transcoder_active_video_sessions: NotRequired[int] + transcoder_audio: NotRequired[bool] + transcoder_lyrics: NotRequired[bool] + transcoder_subtitles: NotRequired[bool] + transcoder_video: NotRequired[bool] + transcoder_video_bitrates: NotRequired[str] + transcoder_video_qualities: NotRequired[str] + transcoder_video_resolutions: NotRequired[str] + updated_at: NotRequired[int] + updater: NotRequired[bool] + version: NotRequired[str] + voice_search: NotRequired[bool] + media_provider: NotRequired[List[MediaProviderTypedDict]] + + +class GetMediaProvidersMediaContainer(BaseModel): + size: Optional[int] = None + + allow_camera_upload: Annotated[ + Optional[bool], pydantic.Field(alias="allowCameraUpload") + ] = None + + allow_channel_access: Annotated[ + Optional[bool], pydantic.Field(alias="allowChannelAccess") + ] = None + + allow_sharing: Annotated[Optional[bool], pydantic.Field(alias="allowSharing")] = ( + None + ) + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + allow_tuners: Annotated[Optional[bool], pydantic.Field(alias="allowTuners")] = None + + background_processing: Annotated[ + Optional[bool], pydantic.Field(alias="backgroundProcessing") + ] = None + + certificate: Optional[bool] = None + + companion_proxy: Annotated[ + Optional[bool], pydantic.Field(alias="companionProxy") + ] = None + + country_code: Annotated[Optional[str], pydantic.Field(alias="countryCode")] = None + + diagnostics: Optional[str] = None + + event_stream: Annotated[Optional[bool], pydantic.Field(alias="eventStream")] = None + + friendly_name: Annotated[Optional[str], pydantic.Field(alias="friendlyName")] = None + + livetv: Optional[int] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + music_analysis: Annotated[Optional[int], pydantic.Field(alias="musicAnalysis")] = ( + None + ) + + my_plex: Annotated[Optional[bool], pydantic.Field(alias="myPlex")] = None + + my_plex_mapping_state: Annotated[ + Optional[str], pydantic.Field(alias="myPlexMappingState") + ] = None + + my_plex_signin_state: Annotated[ + Optional[str], pydantic.Field(alias="myPlexSigninState") + ] = None + + my_plex_subscription: Annotated[ + Optional[bool], pydantic.Field(alias="myPlexSubscription") + ] = None + + my_plex_username: Annotated[ + Optional[str], pydantic.Field(alias="myPlexUsername") + ] = None + + offline_transcode: Annotated[ + Optional[int], pydantic.Field(alias="offlineTranscode") + ] = None + + owner_features: Annotated[Optional[str], pydantic.Field(alias="ownerFeatures")] = ( + None + ) + + platform: Optional[str] = None + + platform_version: Annotated[ + Optional[str], pydantic.Field(alias="platformVersion") + ] = None + + plugin_host: Annotated[Optional[bool], pydantic.Field(alias="pluginHost")] = None + + push_notifications: Annotated[ + Optional[bool], pydantic.Field(alias="pushNotifications") + ] = None + + read_only_libraries: Annotated[ + Optional[bool], pydantic.Field(alias="readOnlyLibraries") + ] = None + + streaming_brain_abr_version: Annotated[ + Optional[int], pydantic.Field(alias="streamingBrainABRVersion") + ] = None + + streaming_brain_version: Annotated[ + Optional[int], pydantic.Field(alias="streamingBrainVersion") + ] = None + + sync: Optional[bool] = None + + transcoder_active_video_sessions: Annotated[ + Optional[int], pydantic.Field(alias="transcoderActiveVideoSessions") + ] = None + + transcoder_audio: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderAudio") + ] = None + + transcoder_lyrics: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderLyrics") + ] = None + + transcoder_subtitles: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderSubtitles") + ] = None + + transcoder_video: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderVideo") + ] = None + + transcoder_video_bitrates: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoBitrates") + ] = None + + transcoder_video_qualities: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoQualities") + ] = None + + transcoder_video_resolutions: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoResolutions") + ] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + updater: Optional[bool] = None + + version: Optional[str] = None + + voice_search: Annotated[Optional[bool], pydantic.Field(alias="voiceSearch")] = None + + media_provider: Annotated[ + Optional[List[MediaProvider]], pydantic.Field(alias="MediaProvider") + ] = None + + +class GetMediaProvidersResponseBodyTypedDict(TypedDict): + r"""Media providers and their features""" + + media_container: NotRequired[GetMediaProvidersMediaContainerTypedDict] + + +class GetMediaProvidersResponseBody(BaseModel): + r"""Media providers and their features""" + + media_container: Annotated[ + Optional[GetMediaProvidersMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetMediaProvidersResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetMediaProvidersResponseBodyTypedDict] + r"""Media providers and their features""" + + +class GetMediaProvidersResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetMediaProvidersResponseBody] = None + r"""Media providers and their features""" diff --git a/src/plex_api_client/models/operations/get_meta_data_by_rating_key.py b/src/plex_api_client/models/operations/get_meta_data_by_rating_key.py new file mode 100644 index 0000000..048025f --- /dev/null +++ b/src/plex_api_client/models/operations/get_meta_data_by_rating_key.py @@ -0,0 +1,598 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMetaDataByRatingKeyRequestTypedDict(TypedDict): + rating_key: int + r"""the id of the library item to return the children of.""" + + +class GetMetaDataByRatingKeyRequest(BaseModel): + rating_key: Annotated[ + int, + pydantic.Field(alias="ratingKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the id of the library item to return the children of.""" + + +class StreamTypedDict(TypedDict): + id: NotRequired[int] + stream_type: NotRequired[int] + default: NotRequired[bool] + codec: NotRequired[str] + index: NotRequired[int] + bitrate: NotRequired[int] + bit_depth: NotRequired[int] + chroma_location: NotRequired[str] + chroma_subsampling: NotRequired[str] + coded_height: NotRequired[int] + coded_width: NotRequired[int] + color_primaries: NotRequired[str] + color_range: NotRequired[str] + color_space: NotRequired[str] + color_trc: NotRequired[str] + frame_rate: NotRequired[int] + has_scaling_matrix: NotRequired[bool] + height: NotRequired[int] + level: NotRequired[int] + profile: NotRequired[str] + ref_frames: NotRequired[int] + scan_type: NotRequired[str] + stream_identifier: NotRequired[str] + width: NotRequired[int] + display_title: NotRequired[str] + extended_display_title: NotRequired[str] + selected: NotRequired[bool] + channels: NotRequired[int] + language: NotRequired[str] + language_tag: NotRequired[str] + language_code: NotRequired[str] + sampling_rate: NotRequired[int] + + +class Stream(BaseModel): + id: Optional[int] = None + + stream_type: Annotated[Optional[int], pydantic.Field(alias="streamType")] = None + + default: Optional[bool] = None + + codec: Optional[str] = None + + index: Optional[int] = None + + bitrate: Optional[int] = None + + bit_depth: Annotated[Optional[int], pydantic.Field(alias="bitDepth")] = None + + chroma_location: Annotated[ + Optional[str], pydantic.Field(alias="chromaLocation") + ] = None + + chroma_subsampling: Annotated[ + Optional[str], pydantic.Field(alias="chromaSubsampling") + ] = None + + coded_height: Annotated[Optional[int], pydantic.Field(alias="codedHeight")] = None + + coded_width: Annotated[Optional[int], pydantic.Field(alias="codedWidth")] = None + + color_primaries: Annotated[ + Optional[str], pydantic.Field(alias="colorPrimaries") + ] = None + + color_range: Annotated[Optional[str], pydantic.Field(alias="colorRange")] = None + + color_space: Annotated[Optional[str], pydantic.Field(alias="colorSpace")] = None + + color_trc: Annotated[Optional[str], pydantic.Field(alias="colorTrc")] = None + + frame_rate: Annotated[Optional[int], pydantic.Field(alias="frameRate")] = None + + has_scaling_matrix: Annotated[ + Optional[bool], pydantic.Field(alias="hasScalingMatrix") + ] = None + + height: Optional[int] = None + + level: Optional[int] = None + + profile: Optional[str] = None + + ref_frames: Annotated[Optional[int], pydantic.Field(alias="refFrames")] = None + + scan_type: Annotated[Optional[str], pydantic.Field(alias="scanType")] = None + + stream_identifier: Annotated[ + Optional[str], pydantic.Field(alias="streamIdentifier") + ] = None + + width: Optional[int] = None + + display_title: Annotated[Optional[str], pydantic.Field(alias="displayTitle")] = None + + extended_display_title: Annotated[ + Optional[str], pydantic.Field(alias="extendedDisplayTitle") + ] = None + + selected: Optional[bool] = None + + channels: Optional[int] = None + + language: Optional[str] = None + + language_tag: Annotated[Optional[str], pydantic.Field(alias="languageTag")] = None + + language_code: Annotated[Optional[str], pydantic.Field(alias="languageCode")] = None + + sampling_rate: Annotated[Optional[int], pydantic.Field(alias="samplingRate")] = None + + +class GetMetaDataByRatingKeyPartTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + duration: NotRequired[int] + file: NotRequired[str] + size: NotRequired[int] + audio_profile: NotRequired[str] + container: NotRequired[str] + has64bit_offsets: NotRequired[bool] + optimized_for_streaming: NotRequired[bool] + video_profile: NotRequired[str] + stream: NotRequired[List[StreamTypedDict]] + + +class GetMetaDataByRatingKeyPart(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + duration: Optional[int] = None + + file: Optional[str] = None + + size: Optional[int] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + container: Optional[str] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + optimized_for_streaming: Annotated[ + Optional[bool], pydantic.Field(alias="optimizedForStreaming") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + stream: Annotated[Optional[List[Stream]], pydantic.Field(alias="Stream")] = None + + +class GetMetaDataByRatingKeyMediaTypedDict(TypedDict): + id: NotRequired[int] + duration: NotRequired[int] + bitrate: NotRequired[int] + width: NotRequired[int] + height: NotRequired[int] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[int] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[str] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + optimized_for_streaming: NotRequired[int] + audio_profile: NotRequired[str] + has64bit_offsets: NotRequired[bool] + video_profile: NotRequired[str] + part: NotRequired[List[GetMetaDataByRatingKeyPartTypedDict]] + + +class GetMetaDataByRatingKeyMedia(BaseModel): + id: Optional[int] = None + + duration: Optional[int] = None + + bitrate: Optional[int] = None + + width: Optional[int] = None + + height: Optional[int] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[str], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + optimized_for_streaming: Annotated[ + Optional[int], pydantic.Field(alias="optimizedForStreaming") + ] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[ + Optional[List[GetMetaDataByRatingKeyPart]], pydantic.Field(alias="Part") + ] = None + + +class GetMetaDataByRatingKeyGenreTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + + +class GetMetaDataByRatingKeyGenre(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + +class GetMetaDataByRatingKeyCountryTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + + +class GetMetaDataByRatingKeyCountry(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + +class GuidsTypedDict(TypedDict): + id: NotRequired[str] + + +class Guids(BaseModel): + id: Optional[str] = None + + +class RatingsTypedDict(TypedDict): + image: NotRequired[str] + value: NotRequired[float] + type: NotRequired[str] + + +class Ratings(BaseModel): + image: Optional[str] = None + + value: Optional[float] = None + + type: Optional[str] = None + + +class GetMetaDataByRatingKeyDirectorTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + tag_key: NotRequired[str] + thumb: NotRequired[str] + + +class GetMetaDataByRatingKeyDirector(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + tag_key: Annotated[Optional[str], pydantic.Field(alias="tagKey")] = None + + thumb: Optional[str] = None + + +class GetMetaDataByRatingKeyWriterTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + tag_key: NotRequired[str] + thumb: NotRequired[str] + + +class GetMetaDataByRatingKeyWriter(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + tag_key: Annotated[Optional[str], pydantic.Field(alias="tagKey")] = None + + thumb: Optional[str] = None + + +class GetMetaDataByRatingKeyRoleTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + tag_key: NotRequired[str] + role: NotRequired[str] + thumb: NotRequired[str] + + +class GetMetaDataByRatingKeyRole(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + tag_key: Annotated[Optional[str], pydantic.Field(alias="tagKey")] = None + + role: Optional[str] = None + + thumb: Optional[str] = None + + +class ProducerTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + tag_key: NotRequired[str] + thumb: NotRequired[str] + + +class Producer(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + tag_key: Annotated[Optional[str], pydantic.Field(alias="tagKey")] = None + + thumb: Optional[str] = None + + +class GetMetaDataByRatingKeyMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + library_section_title: NotRequired[str] + library_section_id: NotRequired[int] + library_section_key: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + year: NotRequired[int] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[int] + originally_available_at: NotRequired[date] + added_at: NotRequired[int] + updated_at: NotRequired[int] + audience_rating_image: NotRequired[str] + has_premium_primary_extra: NotRequired[str] + rating_image: NotRequired[str] + media: NotRequired[List[GetMetaDataByRatingKeyMediaTypedDict]] + genre: NotRequired[List[GetMetaDataByRatingKeyGenreTypedDict]] + country: NotRequired[List[GetMetaDataByRatingKeyCountryTypedDict]] + guids: NotRequired[List[GuidsTypedDict]] + ratings: NotRequired[List[RatingsTypedDict]] + director: NotRequired[List[GetMetaDataByRatingKeyDirectorTypedDict]] + writer: NotRequired[List[GetMetaDataByRatingKeyWriterTypedDict]] + role: NotRequired[List[GetMetaDataByRatingKeyRoleTypedDict]] + producer: NotRequired[List[ProducerTypedDict]] + + +class GetMetaDataByRatingKeyMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[int] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + has_premium_primary_extra: Annotated[ + Optional[str], pydantic.Field(alias="hasPremiumPrimaryExtra") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + media: Annotated[ + Optional[List[GetMetaDataByRatingKeyMedia]], pydantic.Field(alias="Media") + ] = None + + genre: Annotated[ + Optional[List[GetMetaDataByRatingKeyGenre]], pydantic.Field(alias="Genre") + ] = None + + country: Annotated[ + Optional[List[GetMetaDataByRatingKeyCountry]], pydantic.Field(alias="Country") + ] = None + + guids: Annotated[Optional[List[Guids]], pydantic.Field(alias="Guid")] = None + + ratings: Annotated[Optional[List[Ratings]], pydantic.Field(alias="Rating")] = None + + director: Annotated[ + Optional[List[GetMetaDataByRatingKeyDirector]], pydantic.Field(alias="Director") + ] = None + + writer: Annotated[ + Optional[List[GetMetaDataByRatingKeyWriter]], pydantic.Field(alias="Writer") + ] = None + + role: Annotated[ + Optional[List[GetMetaDataByRatingKeyRole]], pydantic.Field(alias="Role") + ] = None + + producer: Annotated[Optional[List[Producer]], pydantic.Field(alias="Producer")] = ( + None + ) + + +class GetMetaDataByRatingKeyMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + library_section_id: NotRequired[int] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + metadata: NotRequired[List[GetMetaDataByRatingKeyMetadataTypedDict]] + + +class GetMetaDataByRatingKeyMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + metadata: Annotated[ + Optional[List[GetMetaDataByRatingKeyMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetMetaDataByRatingKeyResponseBodyTypedDict(TypedDict): + r"""The metadata of the library item.""" + + media_container: NotRequired[GetMetaDataByRatingKeyMediaContainerTypedDict] + + +class GetMetaDataByRatingKeyResponseBody(BaseModel): + r"""The metadata of the library item.""" + + media_container: Annotated[ + Optional[GetMetaDataByRatingKeyMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetMetaDataByRatingKeyResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetMetaDataByRatingKeyResponseBodyTypedDict] + r"""The metadata of the library item.""" + + +class GetMetaDataByRatingKeyResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetMetaDataByRatingKeyResponseBody] = None + r"""The metadata of the library item.""" diff --git a/src/plex_api_client/models/operations/get_refresh_library_metadata.py b/src/plex_api_client/models/operations/get_refresh_library_metadata.py new file mode 100644 index 0000000..45c2873 --- /dev/null +++ b/src/plex_api_client/models/operations/get_refresh_library_metadata.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class Force(int, Enum): + r"""Force the refresh even if the library is already being refreshed.""" + + ZERO = 0 + ONE = 1 + + +class GetRefreshLibraryMetadataRequestTypedDict(TypedDict): + section_key: int + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + force: NotRequired[Force] + r"""Force the refresh even if the library is already being refreshed.""" + + +class GetRefreshLibraryMetadataRequest(BaseModel): + section_key: Annotated[ + int, + pydantic.Field(alias="sectionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + force: Annotated[ + Optional[Force], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Force the refresh even if the library is already being refreshed.""" + + +class GetRefreshLibraryMetadataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetRefreshLibraryMetadataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/get_search_library.py b/src/plex_api_client/models/operations/get_search_library.py new file mode 100644 index 0000000..d04b7d5 --- /dev/null +++ b/src/plex_api_client/models/operations/get_search_library.py @@ -0,0 +1,224 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class QueryParamType(int, Enum): + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + + +class GetSearchLibraryRequestTypedDict(TypedDict): + section_key: int + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + type: QueryParamType + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + +class GetSearchLibraryRequest(BaseModel): + section_key: Annotated[ + int, + pydantic.Field(alias="sectionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The unique key of the Plex library. + Note: This is unique in the context of the Plex server. + + """ + + type: Annotated[ + QueryParamType, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + +class GetSearchLibraryMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + parent_rating_key: NotRequired[str] + guid: NotRequired[str] + parent_guid: NotRequired[str] + parent_studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + parent_key: NotRequired[str] + parent_title: NotRequired[str] + summary: NotRequired[str] + index: NotRequired[int] + parent_index: NotRequired[int] + parent_year: NotRequired[int] + thumb: NotRequired[str] + art: NotRequired[str] + parent_thumb: NotRequired[str] + parent_theme: NotRequired[str] + added_at: NotRequired[int] + updated_at: NotRequired[int] + + +class GetSearchLibraryMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + parent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="parentRatingKey") + ] = None + + guid: Optional[str] = None + + parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None + + parent_studio: Annotated[Optional[str], pydantic.Field(alias="parentStudio")] = None + + type: Optional[str] = None + + title: Optional[str] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + summary: Optional[str] = None + + index: Optional[int] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + parent_theme: Annotated[Optional[str], pydantic.Field(alias="parentTheme")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + +class GetSearchLibraryMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + art: NotRequired[str] + identifier: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + nocache: NotRequired[bool] + thumb: NotRequired[str] + title1: NotRequired[str] + title2: NotRequired[str] + view_group: NotRequired[str] + view_mode: NotRequired[int] + metadata: NotRequired[List[GetSearchLibraryMetadataTypedDict]] + + +class GetSearchLibraryMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + art: Optional[str] = None + + identifier: Optional[str] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + nocache: Optional[bool] = None + + thumb: Optional[str] = None + + title1: Optional[str] = None + + title2: Optional[str] = None + + view_group: Annotated[Optional[str], pydantic.Field(alias="viewGroup")] = None + + view_mode: Annotated[Optional[int], pydantic.Field(alias="viewMode")] = None + + metadata: Annotated[ + Optional[List[GetSearchLibraryMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetSearchLibraryResponseBodyTypedDict(TypedDict): + r"""The contents of the library by section and type""" + + media_container: NotRequired[GetSearchLibraryMediaContainerTypedDict] + + +class GetSearchLibraryResponseBody(BaseModel): + r"""The contents of the library by section and type""" + + media_container: Annotated[ + Optional[GetSearchLibraryMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetSearchLibraryResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetSearchLibraryResponseBodyTypedDict] + r"""The contents of the library by section and type""" + + +class GetSearchLibraryResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetSearchLibraryResponseBody] = None + r"""The contents of the library by section and type""" diff --git a/src/plex_api_client/models/operations/get_server_identity.py b/src/plex_api_client/models/operations/get_server_identity.py new file mode 100644 index 0000000..8063a98 --- /dev/null +++ b/src/plex_api_client/models/operations/get_server_identity.py @@ -0,0 +1,67 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerIdentityMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + claimed: NotRequired[bool] + machine_identifier: NotRequired[str] + version: NotRequired[str] + + +class GetServerIdentityMediaContainer(BaseModel): + size: Optional[float] = None + + claimed: Optional[bool] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + version: Optional[str] = None + + +class GetServerIdentityResponseBodyTypedDict(TypedDict): + r"""The Server Identity information""" + + media_container: NotRequired[GetServerIdentityMediaContainerTypedDict] + + +class GetServerIdentityResponseBody(BaseModel): + r"""The Server Identity information""" + + media_container: Annotated[ + Optional[GetServerIdentityMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetServerIdentityResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetServerIdentityResponseBodyTypedDict] + r"""The Server Identity information""" + + +class GetServerIdentityResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetServerIdentityResponseBody] = None + r"""The Server Identity information""" diff --git a/src/plex_api_client/models/operations/get_server_resources.py b/src/plex_api_client/models/operations/get_server_resources.py new file mode 100644 index 0000000..6bbe0ba --- /dev/null +++ b/src/plex_api_client/models/operations/get_server_resources.py @@ -0,0 +1,298 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +import httpx +from plex_api_client.types import BaseModel, Nullable, UNSET_SENTINEL +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_SERVER_RESOURCES_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class GetServerResourcesGlobalsTypedDict(TypedDict): + x_plex_client_identifier: 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): + x_plex_client_identifier: 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""" + + ZERO = 0 + ONE = 1 + + +class IncludeRelay(int, Enum): + r"""Include Relay addresses in the results + E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + + """ + + ZERO = 0 + ONE = 1 + + +class IncludeIPv6(int, Enum): + r"""Include IPv6 entries in the results""" + + ZERO = 0 + ONE = 1 + + +class GetServerResourcesRequestTypedDict(TypedDict): + x_plex_token: str + r"""Plex Authentication Token""" + x_plex_client_identifier: 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) + + """ + include_https: NotRequired[IncludeHTTPS] + r"""Include Https entries in the results""" + include_relay: NotRequired[IncludeRelay] + r"""Include Relay addresses in the results + E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + + """ + include_i_pv6: NotRequired[IncludeIPv6] + r"""Include IPv6 entries in the results""" + + +class GetServerResourcesRequest(BaseModel): + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + x_plex_client_identifier: 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) + + """ + + include_https: Annotated[ + Optional[IncludeHTTPS], + pydantic.Field(alias="includeHttps"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = IncludeHTTPS.ZERO + r"""Include Https entries in the results""" + + include_relay: Annotated[ + Optional[IncludeRelay], + pydantic.Field(alias="includeRelay"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = IncludeRelay.ZERO + r"""Include Relay addresses in the results + E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + + """ + + include_i_pv6: Annotated[ + Optional[IncludeIPv6], + pydantic.Field(alias="includeIPv6"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = IncludeIPv6.ZERO + r"""Include IPv6 entries in the results""" + + +class ConnectionsTypedDict(TypedDict): + protocol: str + address: str + port: float + uri: str + local: bool + relay: bool + i_pv6: bool + + +class Connections(BaseModel): + protocol: str + + address: str + + port: float + + uri: str + + local: bool + + relay: bool + + i_pv6: Annotated[bool, pydantic.Field(alias="IPv6")] + + +class PlexDeviceTypedDict(TypedDict): + name: str + product: str + product_version: str + platform: Nullable[str] + platform_version: Nullable[str] + device: Nullable[str] + client_identifier: str + created_at: datetime + last_seen_at: datetime + provides: str + owner_id: Nullable[int] + r"""ownerId is null when the device is owned by the token used to send the request""" + source_title: Nullable[str] + public_address: str + access_token: str + owned: bool + home: bool + synced: bool + relay: bool + presence: bool + https_required: bool + public_address_matches: bool + dns_rebinding_protection: bool + nat_loopback_supported: bool + connections: List[ConnectionsTypedDict] + + +class PlexDevice(BaseModel): + name: str + + product: str + + product_version: Annotated[str, pydantic.Field(alias="productVersion")] + + platform: Nullable[str] + + platform_version: Annotated[Nullable[str], pydantic.Field(alias="platformVersion")] + + device: Nullable[str] + + client_identifier: Annotated[str, pydantic.Field(alias="clientIdentifier")] + + created_at: Annotated[datetime, pydantic.Field(alias="createdAt")] + + last_seen_at: Annotated[datetime, pydantic.Field(alias="lastSeenAt")] + + provides: str + + owner_id: Annotated[Nullable[int], pydantic.Field(alias="ownerId")] + r"""ownerId is null when the device is owned by the token used to send the request""" + + source_title: Annotated[Nullable[str], pydantic.Field(alias="sourceTitle")] + + public_address: Annotated[str, pydantic.Field(alias="publicAddress")] + + access_token: Annotated[str, pydantic.Field(alias="accessToken")] + + owned: bool + + home: bool + + synced: bool + + relay: bool + + presence: bool + + https_required: Annotated[bool, pydantic.Field(alias="httpsRequired")] + + public_address_matches: Annotated[ + bool, pydantic.Field(alias="publicAddressMatches") + ] + + dns_rebinding_protection: Annotated[ + bool, pydantic.Field(alias="dnsRebindingProtection") + ] + + nat_loopback_supported: Annotated[ + bool, pydantic.Field(alias="natLoopbackSupported") + ] + + connections: List[Connections] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = [ + "platform", + "platformVersion", + "device", + "ownerId", + "sourceTitle", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetServerResourcesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + plex_devices: NotRequired[List[PlexDeviceTypedDict]] + r"""List of Plex Devices. This includes Plex hosted servers and clients""" + + +class GetServerResourcesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + plex_devices: Optional[List[PlexDevice]] = None + r"""List of Plex Devices. This includes Plex hosted servers and clients""" diff --git a/src/plex_api_client/models/operations/get_thumb_image.py b/src/plex_api_client/models/operations/get_thumb_image.py new file mode 100644 index 0000000..9102a38 --- /dev/null +++ b/src/plex_api_client/models/operations/get_thumb_image.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import Dict, List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetThumbImageRequestTypedDict(TypedDict): + rating_key: int + r"""the id of the library item to return the children of.""" + width: int + height: int + min_size: int + upscale: int + x_plex_token: str + r"""Plex Authentication Token""" + + +class GetThumbImageRequest(BaseModel): + rating_key: Annotated[ + int, + pydantic.Field(alias="ratingKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the id of the library item to return the children of.""" + + width: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + height: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + min_size: Annotated[ + int, + pydantic.Field(alias="minSize"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + + upscale: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + +class GetThumbImageResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + headers: Dict[str, List[str]] + response_stream: NotRequired[httpx.Response] + r"""Successful response returning an image""" + + +class GetThumbImageResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + headers: Dict[str, List[str]] + + response_stream: Optional[httpx.Response] = None + r"""Successful response returning an image""" diff --git a/src/plex_api_client/models/operations/get_watch_list.py b/src/plex_api_client/models/operations/get_watch_list.py new file mode 100644 index 0000000..a164069 --- /dev/null +++ b/src/plex_api_client/models/operations/get_watch_list.py @@ -0,0 +1,377 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_WATCH_LIST_SERVERS = [ + "https://metadata.provider.plex.tv", + r"""The plex metadata provider server""", +] + + +class Filter(str, Enum): + r"""Filter""" + + ALL = "all" + AVAILABLE = "available" + RELEASED = "released" + + +class Libtype(str, Enum): + r"""The type of library to filter. Can be \"movie\" or \"show\", or all if not present.""" + + MOVIE = "movie" + SHOW = "show" + + +class IncludeCollections(int, Enum): + r"""include collections in the results""" + + ONE = 1 + ZERO = 0 + + +class IncludeExternalMedia(int, Enum): + r"""include external media in the results""" + + ONE = 1 + ZERO = 0 + + +class GetWatchListRequestTypedDict(TypedDict): + filter_: Filter + r"""Filter""" + x_plex_token: str + r"""Plex Authentication Token""" + sort: NotRequired[str] + r"""In the format \"field:dir\". Available fields are \"watchlistedAt\" (Added At), + \"titleSort\" (Title), \"originallyAvailableAt\" (Release Date), or \"rating\" (Critic Rating). + \"dir\" can be \"asc\" or \"desc\" + + """ + libtype: NotRequired[Libtype] + r"""The type of library to filter. Can be \"movie\" or \"show\", or all if not present. + + """ + maxresults: NotRequired[int] + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + + """ + include_collections: NotRequired[IncludeCollections] + r"""include collections in the results + + """ + include_external_media: NotRequired[IncludeExternalMedia] + r"""include external media in the results + + """ + x_plex_container_start: NotRequired[int] + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + x_plex_container_size: NotRequired[int] + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +class GetWatchListRequest(BaseModel): + filter_: Annotated[ + Filter, + pydantic.Field(alias="filter"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Filter""" + + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + sort: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""In the format \"field:dir\". Available fields are \"watchlistedAt\" (Added At), + \"titleSort\" (Title), \"originallyAvailableAt\" (Release Date), or \"rating\" (Critic Rating). + \"dir\" can be \"asc\" or \"desc\" + + """ + + libtype: Annotated[ + Optional[Libtype], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The type of library to filter. Can be \"movie\" or \"show\", or all if not present. + + """ + + maxresults: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + + """ + + include_collections: Annotated[ + Optional[IncludeCollections], + pydantic.Field(alias="includeCollections"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""include collections in the results + + """ + + include_external_media: Annotated[ + Optional[IncludeExternalMedia], + pydantic.Field(alias="includeExternalMedia"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""include external media in the results + + """ + + x_plex_container_start: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Start"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + + x_plex_container_size: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Size"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +class ImageTypedDict(TypedDict): + alt: NotRequired[str] + type: NotRequired[str] + url: NotRequired[str] + + +class Image(BaseModel): + alt: Optional[str] = None + + type: Optional[str] = None + + url: Optional[str] = None + + +class MetadataTypedDict(TypedDict): + art: NotRequired[str] + guid: NotRequired[str] + key: NotRequired[str] + rating_key: NotRequired[str] + studio: NotRequired[str] + tagline: NotRequired[str] + type: NotRequired[str] + thumb: NotRequired[str] + added_at: NotRequired[int] + duration: NotRequired[int] + public_pages_url: NotRequired[str] + slug: NotRequired[str] + user_state: NotRequired[bool] + title: NotRequired[str] + content_rating: NotRequired[str] + originally_available_at: NotRequired[date] + year: NotRequired[int] + image: NotRequired[List[ImageTypedDict]] + banner: NotRequired[str] + rating: NotRequired[float] + expires_at: NotRequired[int] + original_title: NotRequired[str] + audience_rating: NotRequired[float] + audience_rating_image: NotRequired[str] + rating_image: NotRequired[str] + imdb_rating_count: NotRequired[int] + subtype: NotRequired[str] + theme: NotRequired[str] + leaf_count: NotRequired[int] + child_count: NotRequired[int] + is_continuing_series: NotRequired[bool] + skip_children: NotRequired[bool] + availability_id: NotRequired[str] + streaming_media_id: NotRequired[str] + playable_key: NotRequired[str] + + +class Metadata(BaseModel): + art: Optional[str] = None + + guid: Optional[str] = None + + key: Optional[str] = None + + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + studio: Optional[str] = None + + tagline: Optional[str] = None + + type: Optional[str] = None + + thumb: Optional[str] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + duration: Optional[int] = None + + public_pages_url: Annotated[ + Optional[str], pydantic.Field(alias="publicPagesURL") + ] = None + + slug: Optional[str] = None + + user_state: Annotated[Optional[bool], pydantic.Field(alias="userState")] = None + + title: Optional[str] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + year: Optional[int] = None + + image: Annotated[Optional[List[Image]], pydantic.Field(alias="Image")] = None + + banner: Optional[str] = None + + rating: Optional[float] = None + + expires_at: Annotated[Optional[int], pydantic.Field(alias="expiresAt")] = None + + original_title: Annotated[Optional[str], pydantic.Field(alias="originalTitle")] = ( + None + ) + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + imdb_rating_count: Annotated[ + Optional[int], pydantic.Field(alias="imdbRatingCount") + ] = None + + subtype: Optional[str] = None + + theme: Optional[str] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + child_count: Annotated[Optional[int], pydantic.Field(alias="childCount")] = None + + is_continuing_series: Annotated[ + Optional[bool], pydantic.Field(alias="isContinuingSeries") + ] = None + + skip_children: Annotated[Optional[bool], pydantic.Field(alias="skipChildren")] = ( + None + ) + + availability_id: Annotated[ + Optional[str], pydantic.Field(alias="availabilityId") + ] = None + + streaming_media_id: Annotated[ + Optional[str], pydantic.Field(alias="streamingMediaId") + ] = None + + playable_key: Annotated[Optional[str], pydantic.Field(alias="playableKey")] = None + + +class GetWatchListResponseBodyTypedDict(TypedDict): + r"""Watchlist Data""" + + library_section_id: NotRequired[str] + library_section_title: NotRequired[str] + offset: NotRequired[int] + total_size: NotRequired[int] + identifier: NotRequired[str] + size: NotRequired[int] + metadata: NotRequired[List[MetadataTypedDict]] + + +class GetWatchListResponseBody(BaseModel): + r"""Watchlist Data""" + + library_section_id: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + offset: Optional[int] = None + + total_size: Annotated[Optional[int], pydantic.Field(alias="totalSize")] = None + + identifier: Optional[str] = None + + size: Optional[int] = None + + metadata: Annotated[Optional[List[Metadata]], pydantic.Field(alias="Metadata")] = ( + None + ) + + +class GetWatchListResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetWatchListResponseBodyTypedDict] + r"""Watchlist Data""" + + +class GetWatchListResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetWatchListResponseBody] = None + r"""Watchlist Data""" diff --git a/src/plex_api_client/models/operations/getavailableclients.py b/src/plex_api_client/models/operations/getavailableclients.py new file mode 100644 index 0000000..934ce04 --- /dev/null +++ b/src/plex_api_client/models/operations/getavailableclients.py @@ -0,0 +1,103 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ServerTypedDict(TypedDict): + name: NotRequired[str] + host: NotRequired[str] + address: NotRequired[str] + port: NotRequired[float] + machine_identifier: NotRequired[str] + version: NotRequired[str] + protocol: NotRequired[str] + product: NotRequired[str] + device_class: NotRequired[str] + protocol_version: NotRequired[float] + protocol_capabilities: NotRequired[str] + + +class Server(BaseModel): + name: Optional[str] = None + + host: Optional[str] = None + + address: Optional[str] = None + + port: Optional[float] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + version: Optional[str] = None + + protocol: Optional[str] = None + + product: Optional[str] = None + + device_class: Annotated[Optional[str], pydantic.Field(alias="deviceClass")] = None + + protocol_version: Annotated[ + Optional[float], pydantic.Field(alias="protocolVersion") + ] = None + + protocol_capabilities: Annotated[ + Optional[str], pydantic.Field(alias="protocolCapabilities") + ] = None + + +class GetAvailableClientsMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + server: NotRequired[List[ServerTypedDict]] + + +class GetAvailableClientsMediaContainer(BaseModel): + size: Optional[float] = None + + server: Annotated[Optional[List[Server]], pydantic.Field(alias="Server")] = None + + +class GetAvailableClientsResponseBodyTypedDict(TypedDict): + r"""Available Clients""" + + media_container: NotRequired[GetAvailableClientsMediaContainerTypedDict] + + +class GetAvailableClientsResponseBody(BaseModel): + r"""Available Clients""" + + media_container: Annotated[ + Optional[GetAvailableClientsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetAvailableClientsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetAvailableClientsResponseBodyTypedDict] + r"""Available Clients""" + + +class GetAvailableClientsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetAvailableClientsResponseBody] = None + r"""Available Clients""" diff --git a/src/plex_api_client/models/operations/getbandwidthstatistics.py b/src/plex_api_client/models/operations/getbandwidthstatistics.py new file mode 100644 index 0000000..51894de --- /dev/null +++ b/src/plex_api_client/models/operations/getbandwidthstatistics.py @@ -0,0 +1,172 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetBandwidthStatisticsRequestTypedDict(TypedDict): + timespan: NotRequired[int] + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class GetBandwidthStatisticsRequest(BaseModel): + timespan: Annotated[ + Optional[int], + pydantic.Field(alias="Timespan"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class GetBandwidthStatisticsDeviceTypedDict(TypedDict): + id: NotRequired[int] + name: NotRequired[str] + platform: NotRequired[str] + client_identifier: NotRequired[str] + created_at: NotRequired[int] + + +class GetBandwidthStatisticsDevice(BaseModel): + id: Optional[int] = None + + name: Optional[str] = None + + platform: Optional[str] = None + + client_identifier: Annotated[ + Optional[str], pydantic.Field(alias="clientIdentifier") + ] = None + + created_at: Annotated[Optional[int], pydantic.Field(alias="createdAt")] = None + + +class GetBandwidthStatisticsAccountTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + name: NotRequired[str] + default_audio_language: NotRequired[str] + auto_select_audio: NotRequired[bool] + default_subtitle_language: NotRequired[str] + subtitle_mode: NotRequired[int] + thumb: NotRequired[str] + + +class GetBandwidthStatisticsAccount(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + name: Optional[str] = None + + default_audio_language: Annotated[ + Optional[str], pydantic.Field(alias="defaultAudioLanguage") + ] = None + + auto_select_audio: Annotated[ + Optional[bool], pydantic.Field(alias="autoSelectAudio") + ] = None + + default_subtitle_language: Annotated[ + Optional[str], pydantic.Field(alias="defaultSubtitleLanguage") + ] = None + + subtitle_mode: Annotated[Optional[int], pydantic.Field(alias="subtitleMode")] = None + + thumb: Optional[str] = None + + +class StatisticsBandwidthTypedDict(TypedDict): + account_id: NotRequired[int] + device_id: NotRequired[int] + timespan: NotRequired[int] + at: NotRequired[int] + lan: NotRequired[bool] + bytes: NotRequired[int] + + +class StatisticsBandwidth(BaseModel): + account_id: Annotated[Optional[int], pydantic.Field(alias="accountID")] = None + + device_id: Annotated[Optional[int], pydantic.Field(alias="deviceID")] = None + + timespan: Optional[int] = None + + at: Optional[int] = None + + lan: Optional[bool] = None + + bytes: Optional[int] = None + + +class GetBandwidthStatisticsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + device: NotRequired[List[GetBandwidthStatisticsDeviceTypedDict]] + account: NotRequired[List[GetBandwidthStatisticsAccountTypedDict]] + statistics_bandwidth: NotRequired[List[StatisticsBandwidthTypedDict]] + + +class GetBandwidthStatisticsMediaContainer(BaseModel): + size: Optional[int] = None + + device: Annotated[ + Optional[List[GetBandwidthStatisticsDevice]], pydantic.Field(alias="Device") + ] = None + + account: Annotated[ + Optional[List[GetBandwidthStatisticsAccount]], pydantic.Field(alias="Account") + ] = None + + statistics_bandwidth: Annotated[ + Optional[List[StatisticsBandwidth]], pydantic.Field(alias="StatisticsBandwidth") + ] = None + + +class GetBandwidthStatisticsResponseBodyTypedDict(TypedDict): + r"""Bandwidth Statistics""" + + media_container: NotRequired[GetBandwidthStatisticsMediaContainerTypedDict] + + +class GetBandwidthStatisticsResponseBody(BaseModel): + r"""Bandwidth Statistics""" + + media_container: Annotated[ + Optional[GetBandwidthStatisticsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetBandwidthStatisticsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetBandwidthStatisticsResponseBodyTypedDict] + r"""Bandwidth Statistics""" + + +class GetBandwidthStatisticsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetBandwidthStatisticsResponseBody] = None + r"""Bandwidth Statistics""" diff --git a/src/plex_api_client/models/operations/getbutlertasks.py b/src/plex_api_client/models/operations/getbutlertasks.py new file mode 100644 index 0000000..b70840b --- /dev/null +++ b/src/plex_api_client/models/operations/getbutlertasks.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ButlerTaskTypedDict(TypedDict): + name: NotRequired[str] + interval: NotRequired[float] + schedule_randomized: NotRequired[bool] + enabled: NotRequired[bool] + title: NotRequired[str] + description: NotRequired[str] + + +class ButlerTask(BaseModel): + name: Optional[str] = None + + interval: Optional[float] = None + + schedule_randomized: Annotated[ + Optional[bool], pydantic.Field(alias="scheduleRandomized") + ] = None + + enabled: Optional[bool] = None + + title: Optional[str] = None + + description: Optional[str] = None + + +class ButlerTasksTypedDict(TypedDict): + butler_task: NotRequired[List[ButlerTaskTypedDict]] + + +class ButlerTasks(BaseModel): + butler_task: Annotated[ + Optional[List[ButlerTask]], pydantic.Field(alias="ButlerTask") + ] = None + + +class GetButlerTasksResponseBodyTypedDict(TypedDict): + r"""All butler tasks""" + + butler_tasks: NotRequired[ButlerTasksTypedDict] + + +class GetButlerTasksResponseBody(BaseModel): + r"""All butler tasks""" + + butler_tasks: Annotated[ + Optional[ButlerTasks], pydantic.Field(alias="ButlerTasks") + ] = None + + +class GetButlerTasksResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetButlerTasksResponseBodyTypedDict] + r"""All butler tasks""" + + +class GetButlerTasksResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetButlerTasksResponseBody] = None + r"""All butler tasks""" diff --git a/src/plex_api_client/models/operations/getcompanionsdata.py b/src/plex_api_client/models/operations/getcompanionsdata.py new file mode 100644 index 0000000..fa3e227 --- /dev/null +++ b/src/plex_api_client/models/operations/getcompanionsdata.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_COMPANIONS_DATA_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class ResponseBodyTypedDict(TypedDict): + identifier: str + base_url: str + title: str + link_url: str + provides: str + token: str + r"""The plex authtoken used to identify with""" + + +class ResponseBody(BaseModel): + identifier: str + + base_url: Annotated[str, pydantic.Field(alias="baseURL")] + + title: str + + link_url: Annotated[str, pydantic.Field(alias="linkURL")] + + provides: str + + token: str + r"""The plex authtoken used to identify with""" + + +class GetCompanionsDataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + response_bodies: NotRequired[List[ResponseBodyTypedDict]] + r"""Companions Data""" + + +class GetCompanionsDataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + response_bodies: Optional[List[ResponseBody]] = None + r"""Companions Data""" diff --git a/src/plex_api_client/models/operations/getdevices.py b/src/plex_api_client/models/operations/getdevices.py new file mode 100644 index 0000000..bd15ef5 --- /dev/null +++ b/src/plex_api_client/models/operations/getdevices.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class DeviceTypedDict(TypedDict): + id: NotRequired[float] + name: NotRequired[str] + platform: NotRequired[str] + client_identifier: NotRequired[str] + created_at: NotRequired[float] + + +class Device(BaseModel): + id: Optional[float] = None + + name: Optional[str] = None + + platform: Optional[str] = None + + client_identifier: Annotated[ + Optional[str], pydantic.Field(alias="clientIdentifier") + ] = None + + created_at: Annotated[Optional[float], pydantic.Field(alias="createdAt")] = None + + +class GetDevicesMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + identifier: NotRequired[str] + device: NotRequired[List[DeviceTypedDict]] + + +class GetDevicesMediaContainer(BaseModel): + size: Optional[float] = None + + identifier: Optional[str] = None + + device: Annotated[Optional[List[Device]], pydantic.Field(alias="Device")] = None + + +class GetDevicesResponseBodyTypedDict(TypedDict): + r"""Devices""" + + media_container: NotRequired[GetDevicesMediaContainerTypedDict] + + +class GetDevicesResponseBody(BaseModel): + r"""Devices""" + + media_container: Annotated[ + Optional[GetDevicesMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetDevicesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetDevicesResponseBodyTypedDict] + r"""Devices""" + + +class GetDevicesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetDevicesResponseBody] = None + r"""Devices""" diff --git a/src/plex_api_client/models/operations/getfilehash.py b/src/plex_api_client/models/operations/getfilehash.py new file mode 100644 index 0000000..8b7016d --- /dev/null +++ b/src/plex_api_client/models/operations/getfilehash.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetFileHashRequestTypedDict(TypedDict): + url: str + r"""This is the path to the local file, must be prefixed by `file://`""" + type: NotRequired[float] + r"""Item type""" + + +class GetFileHashRequest(BaseModel): + url: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""This is the path to the local file, must be prefixed by `file://`""" + + type: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Item type""" + + +class GetFileHashResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetFileHashResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/getgeodata.py b/src/plex_api_client/models/operations/getgeodata.py new file mode 100644 index 0000000..1f612b9 --- /dev/null +++ b/src/plex_api_client/models/operations/getgeodata.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from typing import Optional, TypedDict +from typing_extensions import NotRequired + +GET_GEO_DATA_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class GetGeoDataGeoDataTypedDict(TypedDict): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + continent_code: str + r"""The continent code where the country is located.""" + country: str + r"""The official name of the country.""" + city: str + r"""The name of the city.""" + time_zone: str + r"""The time zone of the country.""" + postal_code: int + r"""The postal code of the location.""" + subdivisions: str + r"""The name of the primary administrative subdivision.""" + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + european_union_member: NotRequired[bool] + r"""Indicates if the country is a member of the European Union.""" + in_privacy_restricted_country: NotRequired[bool] + r"""Indicates if the country has privacy restrictions.""" + in_privacy_restricted_region: NotRequired[bool] + r"""Indicates if the region has privacy restrictions.""" + + +class GetGeoDataGeoData(BaseModel): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + + continent_code: str + r"""The continent code where the country is located.""" + + country: str + r"""The official name of the country.""" + + city: str + r"""The name of the city.""" + + time_zone: str + r"""The time zone of the country.""" + + postal_code: int + r"""The postal code of the location.""" + + subdivisions: str + r"""The name of the primary administrative subdivision.""" + + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + + european_union_member: Optional[bool] = False + r"""Indicates if the country is a member of the European Union.""" + + in_privacy_restricted_country: Optional[bool] = False + r"""Indicates if the country has privacy restrictions.""" + + in_privacy_restricted_region: Optional[bool] = False + r"""Indicates if the region has privacy restrictions.""" + + +class GetGeoDataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + geo_data: NotRequired[GetGeoDataGeoDataTypedDict] + r"""Gets the geo location data of the user""" + + +class GetGeoDataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + geo_data: Optional[GetGeoDataGeoData] = None + r"""Gets the geo location data of the user""" diff --git a/src/plex_api_client/models/operations/getglobalhubs.py b/src/plex_api_client/models/operations/getglobalhubs.py new file mode 100644 index 0000000..7893fc7 --- /dev/null +++ b/src/plex_api_client/models/operations/getglobalhubs.py @@ -0,0 +1,195 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class OnlyTransient(int, Enum): + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + ZERO = 0 + ONE = 1 + + +class GetGlobalHubsRequestTypedDict(TypedDict): + count: NotRequired[float] + r"""The number of items to return with each hub.""" + only_transient: NotRequired[OnlyTransient] + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + +class GetGlobalHubsRequest(BaseModel): + count: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The number of items to return with each hub.""" + + only_transient: Annotated[ + Optional[OnlyTransient], + pydantic.Field(alias="onlyTransient"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + +class GetGlobalHubsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + title_sort: NotRequired[str] + summary: NotRequired[str] + smart: NotRequired[bool] + playlist_type: NotRequired[str] + composite: NotRequired[str] + icon: NotRequired[str] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + duration: NotRequired[int] + leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + + +class GetGlobalHubsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + title_sort: Annotated[Optional[str], pydantic.Field(alias="titleSort")] = None + + summary: Optional[str] = None + + smart: Optional[bool] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + composite: Optional[str] = None + + icon: Optional[str] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + duration: Optional[int] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + +class HubTypedDict(TypedDict): + hub_key: NotRequired[str] + key: NotRequired[str] + title: NotRequired[str] + type: NotRequired[str] + hub_identifier: NotRequired[str] + context: NotRequired[str] + size: NotRequired[int] + more: NotRequired[bool] + style: NotRequired[str] + promoted: NotRequired[bool] + metadata: NotRequired[List[GetGlobalHubsMetadataTypedDict]] + + +class Hub(BaseModel): + hub_key: Annotated[Optional[str], pydantic.Field(alias="hubKey")] = None + + key: Optional[str] = None + + title: Optional[str] = None + + type: Optional[str] = None + + hub_identifier: Annotated[Optional[str], pydantic.Field(alias="hubIdentifier")] = ( + None + ) + + context: Optional[str] = None + + size: Optional[int] = None + + more: Optional[bool] = None + + style: Optional[str] = None + + promoted: Optional[bool] = None + + metadata: Annotated[ + Optional[List[GetGlobalHubsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetGlobalHubsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + hub: NotRequired[List[HubTypedDict]] + + +class GetGlobalHubsMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + hub: Annotated[Optional[List[Hub]], pydantic.Field(alias="Hub")] = None + + +class GetGlobalHubsResponseBodyTypedDict(TypedDict): + r"""returns global hubs""" + + media_container: NotRequired[GetGlobalHubsMediaContainerTypedDict] + + +class GetGlobalHubsResponseBody(BaseModel): + r"""returns global hubs""" + + media_container: Annotated[ + Optional[GetGlobalHubsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetGlobalHubsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetGlobalHubsResponseBodyTypedDict] + r"""returns global hubs""" + + +class GetGlobalHubsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetGlobalHubsResponseBody] = None + r"""returns global hubs""" diff --git a/src/plex_api_client/models/operations/gethomedata.py b/src/plex_api_client/models/operations/gethomedata.py new file mode 100644 index 0000000..3622364 --- /dev/null +++ b/src/plex_api_client/models/operations/gethomedata.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetHomeDataResponseBodyTypedDict(TypedDict): + r"""Home Data""" + + id: NotRequired[float] + name: NotRequired[str] + guest_user_id: NotRequired[float] + guest_user_uuid: NotRequired[str] + guest_enabled: NotRequired[bool] + subscription: NotRequired[bool] + + +class GetHomeDataResponseBody(BaseModel): + r"""Home Data""" + + id: Optional[float] = None + + name: Optional[str] = None + + guest_user_id: Annotated[Optional[float], pydantic.Field(alias="guestUserID")] = ( + None + ) + + guest_user_uuid: Annotated[Optional[str], pydantic.Field(alias="guestUserUUID")] = ( + None + ) + + guest_enabled: Annotated[Optional[bool], pydantic.Field(alias="guestEnabled")] = ( + None + ) + + subscription: Optional[bool] = None + + +class GetHomeDataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetHomeDataResponseBodyTypedDict] + r"""Home Data""" + + +class GetHomeDataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetHomeDataResponseBody] = None + r"""Home Data""" diff --git a/src/plex_api_client/models/operations/getlibraryhubs.py b/src/plex_api_client/models/operations/getlibraryhubs.py new file mode 100644 index 0000000..7512301 --- /dev/null +++ b/src/plex_api_client/models/operations/getlibraryhubs.py @@ -0,0 +1,453 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class QueryParamOnlyTransient(int, Enum): + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + ZERO = 0 + ONE = 1 + + +class GetLibraryHubsRequestTypedDict(TypedDict): + section_id: float + r"""the Id of the library to query""" + count: NotRequired[float] + r"""The number of items to return with each hub.""" + only_transient: NotRequired[QueryParamOnlyTransient] + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + +class GetLibraryHubsRequest(BaseModel): + section_id: Annotated[ + float, + pydantic.Field(alias="sectionId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the Id of the library to query""" + + count: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The number of items to return with each hub.""" + + only_transient: Annotated[ + Optional[QueryParamOnlyTransient], + pydantic.Field(alias="onlyTransient"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).""" + + +class GetLibraryHubsPartTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + duration: NotRequired[int] + file: NotRequired[str] + size: NotRequired[int] + audio_profile: NotRequired[str] + container: NotRequired[str] + has64bit_offsets: NotRequired[bool] + optimized_for_streaming: NotRequired[bool] + video_profile: NotRequired[str] + + +class GetLibraryHubsPart(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + duration: Optional[int] = None + + file: Optional[str] = None + + size: Optional[int] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + container: Optional[str] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + optimized_for_streaming: Annotated[ + Optional[bool], pydantic.Field(alias="optimizedForStreaming") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + +class GetLibraryHubsMediaTypedDict(TypedDict): + id: NotRequired[int] + duration: NotRequired[int] + bitrate: NotRequired[int] + width: NotRequired[int] + height: NotRequired[int] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[int] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[str] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + optimized_for_streaming: NotRequired[int] + audio_profile: NotRequired[str] + has64bit_offsets: NotRequired[bool] + video_profile: NotRequired[str] + part: NotRequired[List[GetLibraryHubsPartTypedDict]] + + +class GetLibraryHubsMedia(BaseModel): + id: Optional[int] = None + + duration: Optional[int] = None + + bitrate: Optional[int] = None + + width: Optional[int] = None + + height: Optional[int] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[str], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + optimized_for_streaming: Annotated[ + Optional[int], pydantic.Field(alias="optimizedForStreaming") + ] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[ + Optional[List[GetLibraryHubsPart]], pydantic.Field(alias="Part") + ] = None + + +class GetLibraryHubsGenreTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryHubsGenre(BaseModel): + tag: Optional[str] = None + + +class GetLibraryHubsCountryTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryHubsCountry(BaseModel): + tag: Optional[str] = None + + +class GetLibraryHubsDirectorTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryHubsDirector(BaseModel): + tag: Optional[str] = None + + +class GetLibraryHubsRoleTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryHubsRole(BaseModel): + tag: Optional[str] = None + + +class GetLibraryHubsWriterTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetLibraryHubsWriter(BaseModel): + tag: Optional[str] = None + + +class GetLibraryHubsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + library_section_title: NotRequired[str] + library_section_id: NotRequired[int] + library_section_key: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + year: NotRequired[int] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[int] + originally_available_at: NotRequired[date] + added_at: NotRequired[int] + updated_at: NotRequired[int] + audience_rating_image: NotRequired[str] + primary_extra_key: NotRequired[str] + rating_image: NotRequired[str] + media: NotRequired[List[GetLibraryHubsMediaTypedDict]] + genre: NotRequired[List[GetLibraryHubsGenreTypedDict]] + country: NotRequired[List[GetLibraryHubsCountryTypedDict]] + director: NotRequired[List[GetLibraryHubsDirectorTypedDict]] + role: NotRequired[List[GetLibraryHubsRoleTypedDict]] + writer: NotRequired[List[GetLibraryHubsWriterTypedDict]] + skip_count: NotRequired[int] + chapter_source: NotRequired[str] + + +class GetLibraryHubsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + year: Optional[int] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + primary_extra_key: Annotated[ + Optional[str], pydantic.Field(alias="primaryExtraKey") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + media: Annotated[ + Optional[List[GetLibraryHubsMedia]], pydantic.Field(alias="Media") + ] = None + + genre: Annotated[ + Optional[List[GetLibraryHubsGenre]], pydantic.Field(alias="Genre") + ] = None + + country: Annotated[ + Optional[List[GetLibraryHubsCountry]], pydantic.Field(alias="Country") + ] = None + + director: Annotated[ + Optional[List[GetLibraryHubsDirector]], pydantic.Field(alias="Director") + ] = None + + role: Annotated[ + Optional[List[GetLibraryHubsRole]], pydantic.Field(alias="Role") + ] = None + + writer: Annotated[ + Optional[List[GetLibraryHubsWriter]], pydantic.Field(alias="Writer") + ] = None + + skip_count: Annotated[Optional[int], pydantic.Field(alias="skipCount")] = None + + chapter_source: Annotated[Optional[str], pydantic.Field(alias="chapterSource")] = ( + None + ) + + +class GetLibraryHubsHubTypedDict(TypedDict): + key: NotRequired[str] + title: NotRequired[str] + type: NotRequired[str] + hub_identifier: NotRequired[str] + context: NotRequired[str] + size: NotRequired[int] + more: NotRequired[bool] + style: NotRequired[str] + hub_key: NotRequired[str] + metadata: NotRequired[List[GetLibraryHubsMetadataTypedDict]] + promoted: NotRequired[bool] + random: NotRequired[bool] + + +class GetLibraryHubsHub(BaseModel): + key: Optional[str] = None + + title: Optional[str] = None + + type: Optional[str] = None + + hub_identifier: Annotated[Optional[str], pydantic.Field(alias="hubIdentifier")] = ( + None + ) + + context: Optional[str] = None + + size: Optional[int] = None + + more: Optional[bool] = None + + style: Optional[str] = None + + hub_key: Annotated[Optional[str], pydantic.Field(alias="hubKey")] = None + + metadata: Annotated[ + Optional[List[GetLibraryHubsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + promoted: Optional[bool] = None + + random: Optional[bool] = None + + +class GetLibraryHubsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + library_section_id: NotRequired[int] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + hub: NotRequired[List[GetLibraryHubsHubTypedDict]] + + +class GetLibraryHubsMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + hub: Annotated[Optional[List[GetLibraryHubsHub]], pydantic.Field(alias="Hub")] = ( + None + ) + + +class GetLibraryHubsResponseBodyTypedDict(TypedDict): + r"""The hubs specific to the library""" + + media_container: NotRequired[GetLibraryHubsMediaContainerTypedDict] + + +class GetLibraryHubsResponseBody(BaseModel): + r"""The hubs specific to the library""" + + media_container: Annotated[ + Optional[GetLibraryHubsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetLibraryHubsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetLibraryHubsResponseBodyTypedDict] + r"""The hubs specific to the library""" + + +class GetLibraryHubsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetLibraryHubsResponseBody] = None + r"""The hubs specific to the library""" diff --git a/src/plex_api_client/models/operations/getmetadatachildren.py b/src/plex_api_client/models/operations/getmetadatachildren.py new file mode 100644 index 0000000..ed0b59f --- /dev/null +++ b/src/plex_api_client/models/operations/getmetadatachildren.py @@ -0,0 +1,278 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetMetadataChildrenRequestTypedDict(TypedDict): + rating_key: float + r"""the id of the library item to return the children of.""" + include_elements: NotRequired[str] + r"""Adds additional elements to the response. Supported types are (Stream) + + """ + + +class GetMetadataChildrenRequest(BaseModel): + rating_key: Annotated[ + float, + pydantic.Field(alias="ratingKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the id of the library item to return the children of.""" + + include_elements: Annotated[ + Optional[str], + pydantic.Field(alias="includeElements"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Adds additional elements to the response. Supported types are (Stream) + + """ + + +class GetMetadataChildrenDirectoryTypedDict(TypedDict): + leaf_count: NotRequired[int] + thumb: NotRequired[str] + viewed_leaf_count: NotRequired[int] + key: NotRequired[str] + title: NotRequired[str] + + +class GetMetadataChildrenDirectory(BaseModel): + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + thumb: Optional[str] = None + + viewed_leaf_count: Annotated[ + Optional[int], pydantic.Field(alias="viewedLeafCount") + ] = None + + key: Optional[str] = None + + title: Optional[str] = None + + +class GetMetadataChildrenMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + parent_rating_key: NotRequired[str] + guid: NotRequired[str] + parent_guid: NotRequired[str] + parent_studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + parent_key: NotRequired[str] + parent_title: NotRequired[str] + summary: NotRequired[str] + index: NotRequired[int] + parent_index: NotRequired[int] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + parent_year: NotRequired[int] + thumb: NotRequired[str] + art: NotRequired[str] + parent_thumb: NotRequired[str] + parent_theme: NotRequired[str] + leaf_count: NotRequired[int] + viewed_leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + user_rating: NotRequired[int] + skip_count: NotRequired[int] + last_rated_at: NotRequired[int] + + +class GetMetadataChildrenMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + parent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="parentRatingKey") + ] = None + + guid: Optional[str] = None + + parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None + + parent_studio: Annotated[Optional[str], pydantic.Field(alias="parentStudio")] = None + + type: Optional[str] = None + + title: Optional[str] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + summary: Optional[str] = None + + index: Optional[int] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + parent_theme: Annotated[Optional[str], pydantic.Field(alias="parentTheme")] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + viewed_leaf_count: Annotated[ + Optional[int], pydantic.Field(alias="viewedLeafCount") + ] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + user_rating: Annotated[Optional[int], pydantic.Field(alias="userRating")] = None + + skip_count: Annotated[Optional[int], pydantic.Field(alias="skipCount")] = None + + last_rated_at: Annotated[Optional[int], pydantic.Field(alias="lastRatedAt")] = None + + +class GetMetadataChildrenMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + art: NotRequired[str] + identifier: NotRequired[str] + key: NotRequired[str] + library_section_id: NotRequired[int] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + nocache: NotRequired[bool] + parent_index: NotRequired[int] + parent_title: NotRequired[str] + parent_year: NotRequired[int] + summary: NotRequired[str] + theme: NotRequired[str] + thumb: NotRequired[str] + title1: NotRequired[str] + title2: NotRequired[str] + view_group: NotRequired[str] + view_mode: NotRequired[int] + directory: NotRequired[List[GetMetadataChildrenDirectoryTypedDict]] + metadata: NotRequired[List[GetMetadataChildrenMetadataTypedDict]] + + +class GetMetadataChildrenMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + art: Optional[str] = None + + identifier: Optional[str] = None + + key: Optional[str] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + nocache: Optional[bool] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None + + summary: Optional[str] = None + + theme: Optional[str] = None + + thumb: Optional[str] = None + + title1: Optional[str] = None + + title2: Optional[str] = None + + view_group: Annotated[Optional[str], pydantic.Field(alias="viewGroup")] = None + + view_mode: Annotated[Optional[int], pydantic.Field(alias="viewMode")] = None + + directory: Annotated[ + Optional[List[GetMetadataChildrenDirectory]], pydantic.Field(alias="Directory") + ] = None + + metadata: Annotated[ + Optional[List[GetMetadataChildrenMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetMetadataChildrenResponseBodyTypedDict(TypedDict): + r"""The children of the library item.""" + + media_container: NotRequired[GetMetadataChildrenMediaContainerTypedDict] + + +class GetMetadataChildrenResponseBody(BaseModel): + r"""The children of the library item.""" + + media_container: Annotated[ + Optional[GetMetadataChildrenMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetMetadataChildrenResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetMetadataChildrenResponseBodyTypedDict] + r"""The children of the library item.""" + + +class GetMetadataChildrenResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetMetadataChildrenResponseBody] = None + r"""The children of the library item.""" diff --git a/src/plex_api_client/models/operations/getmyplexaccount.py b/src/plex_api_client/models/operations/getmyplexaccount.py new file mode 100644 index 0000000..04c48f6 --- /dev/null +++ b/src/plex_api_client/models/operations/getmyplexaccount.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class MyPlexTypedDict(TypedDict): + auth_token: NotRequired[str] + username: NotRequired[str] + mapping_state: NotRequired[str] + mapping_error: NotRequired[str] + sign_in_state: NotRequired[str] + public_address: NotRequired[str] + public_port: NotRequired[float] + private_address: NotRequired[str] + private_port: NotRequired[float] + subscription_features: NotRequired[str] + subscription_active: NotRequired[bool] + subscription_state: NotRequired[str] + + +class MyPlex(BaseModel): + auth_token: Annotated[Optional[str], pydantic.Field(alias="authToken")] = None + + username: Optional[str] = None + + mapping_state: Annotated[Optional[str], pydantic.Field(alias="mappingState")] = None + + mapping_error: Annotated[Optional[str], pydantic.Field(alias="mappingError")] = None + + sign_in_state: Annotated[Optional[str], pydantic.Field(alias="signInState")] = None + + public_address: Annotated[Optional[str], pydantic.Field(alias="publicAddress")] = ( + None + ) + + public_port: Annotated[Optional[float], pydantic.Field(alias="publicPort")] = None + + private_address: Annotated[ + Optional[str], pydantic.Field(alias="privateAddress") + ] = None + + private_port: Annotated[Optional[float], pydantic.Field(alias="privatePort")] = None + + subscription_features: Annotated[ + Optional[str], pydantic.Field(alias="subscriptionFeatures") + ] = None + + subscription_active: Annotated[ + Optional[bool], pydantic.Field(alias="subscriptionActive") + ] = None + + subscription_state: Annotated[ + Optional[str], pydantic.Field(alias="subscriptionState") + ] = None + + +class GetMyPlexAccountResponseBodyTypedDict(TypedDict): + r"""MyPlex Account""" + + my_plex: NotRequired[MyPlexTypedDict] + + +class GetMyPlexAccountResponseBody(BaseModel): + r"""MyPlex Account""" + + my_plex: Annotated[Optional[MyPlex], pydantic.Field(alias="MyPlex")] = None + + +class GetMyPlexAccountResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetMyPlexAccountResponseBodyTypedDict] + r"""MyPlex Account""" + + +class GetMyPlexAccountResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetMyPlexAccountResponseBody] = None + r"""MyPlex Account""" diff --git a/src/plex_api_client/models/operations/getondeck.py b/src/plex_api_client/models/operations/getondeck.py new file mode 100644 index 0000000..7ca3e8f --- /dev/null +++ b/src/plex_api_client/models/operations/getondeck.py @@ -0,0 +1,407 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetOnDeckStreamTypedDict(TypedDict): + id: NotRequired[float] + stream_type: NotRequired[float] + default: NotRequired[bool] + codec: NotRequired[str] + index: NotRequired[float] + bitrate: NotRequired[float] + language: NotRequired[str] + language_tag: NotRequired[str] + language_code: NotRequired[str] + bit_depth: NotRequired[float] + chroma_location: NotRequired[str] + chroma_subsampling: NotRequired[str] + coded_height: NotRequired[float] + coded_width: NotRequired[float] + color_range: NotRequired[str] + frame_rate: NotRequired[float] + height: NotRequired[float] + level: NotRequired[float] + profile: NotRequired[str] + ref_frames: NotRequired[float] + width: NotRequired[float] + display_title: NotRequired[str] + extended_display_title: NotRequired[str] + + +class GetOnDeckStream(BaseModel): + id: Optional[float] = None + + stream_type: Annotated[Optional[float], pydantic.Field(alias="streamType")] = None + + default: Optional[bool] = None + + codec: Optional[str] = None + + index: Optional[float] = None + + bitrate: Optional[float] = None + + language: Optional[str] = None + + language_tag: Annotated[Optional[str], pydantic.Field(alias="languageTag")] = None + + language_code: Annotated[Optional[str], pydantic.Field(alias="languageCode")] = None + + bit_depth: Annotated[Optional[float], pydantic.Field(alias="bitDepth")] = None + + chroma_location: Annotated[ + Optional[str], pydantic.Field(alias="chromaLocation") + ] = None + + chroma_subsampling: Annotated[ + Optional[str], pydantic.Field(alias="chromaSubsampling") + ] = None + + coded_height: Annotated[Optional[float], pydantic.Field(alias="codedHeight")] = None + + coded_width: Annotated[Optional[float], pydantic.Field(alias="codedWidth")] = None + + color_range: Annotated[Optional[str], pydantic.Field(alias="colorRange")] = None + + frame_rate: Annotated[Optional[float], pydantic.Field(alias="frameRate")] = None + + height: Optional[float] = None + + level: Optional[float] = None + + profile: Optional[str] = None + + ref_frames: Annotated[Optional[float], pydantic.Field(alias="refFrames")] = None + + width: Optional[float] = None + + display_title: Annotated[Optional[str], pydantic.Field(alias="displayTitle")] = None + + extended_display_title: Annotated[ + Optional[str], pydantic.Field(alias="extendedDisplayTitle") + ] = None + + +class GetOnDeckPartTypedDict(TypedDict): + id: NotRequired[float] + key: NotRequired[str] + duration: NotRequired[float] + file: NotRequired[str] + size: NotRequired[float] + audio_profile: NotRequired[str] + container: NotRequired[str] + video_profile: NotRequired[str] + stream: NotRequired[List[GetOnDeckStreamTypedDict]] + + +class GetOnDeckPart(BaseModel): + id: Optional[float] = None + + key: Optional[str] = None + + duration: Optional[float] = None + + file: Optional[str] = None + + size: Optional[float] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + container: Optional[str] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + stream: Annotated[ + Optional[List[GetOnDeckStream]], pydantic.Field(alias="Stream") + ] = None + + +class GetOnDeckMediaTypedDict(TypedDict): + id: NotRequired[float] + duration: NotRequired[float] + bitrate: NotRequired[float] + width: NotRequired[float] + height: NotRequired[float] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[float] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[str] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + audio_profile: NotRequired[str] + video_profile: NotRequired[str] + part: NotRequired[List[GetOnDeckPartTypedDict]] + + +class GetOnDeckMedia(BaseModel): + id: Optional[float] = None + + duration: Optional[float] = None + + bitrate: Optional[float] = None + + width: Optional[float] = None + + height: Optional[float] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[ + Optional[float], pydantic.Field(alias="audioChannels") + ] = None + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[str], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[Optional[List[GetOnDeckPart]], pydantic.Field(alias="Part")] = None + + +class GetOnDeckGuidsTypedDict(TypedDict): + id: NotRequired[str] + + +class GetOnDeckGuids(BaseModel): + id: Optional[str] = None + + +class GetOnDeckMetadataTypedDict(TypedDict): + allow_sync: NotRequired[bool] + library_section_id: NotRequired[float] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + rating_key: NotRequired[float] + key: NotRequired[str] + parent_rating_key: NotRequired[float] + grandparent_rating_key: NotRequired[float] + guid: NotRequired[str] + parent_guid: NotRequired[str] + grandparent_guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + grandparent_key: NotRequired[str] + parent_key: NotRequired[str] + library_section_key: NotRequired[str] + grandparent_title: NotRequired[str] + parent_title: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + index: NotRequired[float] + parent_index: NotRequired[float] + last_viewed_at: NotRequired[float] + year: NotRequired[float] + thumb: NotRequired[str] + art: NotRequired[str] + parent_thumb: NotRequired[str] + grandparent_thumb: NotRequired[str] + grandparent_art: NotRequired[str] + grandparent_theme: NotRequired[str] + duration: NotRequired[float] + originally_available_at: NotRequired[datetime] + added_at: NotRequired[float] + updated_at: NotRequired[float] + media: NotRequired[List[GetOnDeckMediaTypedDict]] + guids: NotRequired[List[GetOnDeckGuidsTypedDict]] + + +class GetOnDeckMetadata(BaseModel): + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + library_section_id: Annotated[ + Optional[float], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + rating_key: Annotated[Optional[float], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + parent_rating_key: Annotated[ + Optional[float], pydantic.Field(alias="parentRatingKey") + ] = None + + grandparent_rating_key: Annotated[ + Optional[float], pydantic.Field(alias="grandparentRatingKey") + ] = None + + guid: Optional[str] = None + + parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None + + grandparent_guid: Annotated[ + Optional[str], pydantic.Field(alias="grandparentGuid") + ] = None + + type: Optional[str] = None + + title: Optional[str] = None + + grandparent_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentKey") + ] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + grandparent_title: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTitle") + ] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + index: Optional[float] = None + + parent_index: Annotated[Optional[float], pydantic.Field(alias="parentIndex")] = None + + last_viewed_at: Annotated[Optional[float], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + year: Optional[float] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + grandparent_thumb: Annotated[ + Optional[str], pydantic.Field(alias="grandparentThumb") + ] = None + + grandparent_art: Annotated[ + Optional[str], pydantic.Field(alias="grandparentArt") + ] = None + + grandparent_theme: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTheme") + ] = None + + duration: Optional[float] = None + + originally_available_at: Annotated[ + Optional[datetime], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[float], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[float], pydantic.Field(alias="updatedAt")] = None + + media: Annotated[Optional[List[GetOnDeckMedia]], pydantic.Field(alias="Media")] = ( + None + ) + + guids: Annotated[Optional[List[GetOnDeckGuids]], pydantic.Field(alias="Guid")] = ( + None + ) + + +class GetOnDeckMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[float] + mixed_parents: NotRequired[bool] + metadata: NotRequired[List[GetOnDeckMetadataTypedDict]] + + +class GetOnDeckMediaContainer(BaseModel): + size: Optional[float] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[float], pydantic.Field(alias="mediaTagVersion") + ] = None + + mixed_parents: Annotated[Optional[bool], pydantic.Field(alias="mixedParents")] = ( + None + ) + + metadata: Annotated[ + Optional[List[GetOnDeckMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetOnDeckResponseBodyTypedDict(TypedDict): + r"""The on Deck content""" + + media_container: NotRequired[GetOnDeckMediaContainerTypedDict] + + +class GetOnDeckResponseBody(BaseModel): + r"""The on Deck content""" + + media_container: Annotated[ + Optional[GetOnDeckMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetOnDeckResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetOnDeckResponseBodyTypedDict] + r"""The on Deck content""" + + +class GetOnDeckResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetOnDeckResponseBody] = None + r"""The on Deck content""" diff --git a/src/plex_api_client/models/operations/getpin.py b/src/plex_api_client/models/operations/getpin.py new file mode 100644 index 0000000..6c206bc --- /dev/null +++ b/src/plex_api_client/models/operations/getpin.py @@ -0,0 +1,262 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from plex_api_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Any, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_PIN_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class GetPinGlobalsTypedDict(TypedDict): + x_plex_client_identifier: 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 GetPinGlobals(BaseModel): + x_plex_client_identifier: 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 GetPinRequestTypedDict(TypedDict): + strong: NotRequired[bool] + r"""Determines the kind of code returned by the API call + Strong codes are used for Pin authentication flows + Non-Strong codes are used for `Plex.tv/link` + + """ + x_plex_client_identifier: 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) + + """ + x_plex_product: NotRequired[str] + + +class GetPinRequest(BaseModel): + strong: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Determines the kind of code returned by the API call + Strong codes are used for Pin authentication flows + Non-Strong codes are used for `Plex.tv/link` + + """ + + x_plex_client_identifier: 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) + + """ + + x_plex_product: Annotated[ + Optional[str], + pydantic.Field(alias="X-Plex-Product"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + +class GeoDataTypedDict(TypedDict): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + continent_code: str + r"""The continent code where the country is located.""" + country: str + r"""The official name of the country.""" + city: str + r"""The name of the city.""" + time_zone: str + r"""The time zone of the country.""" + postal_code: int + r"""The postal code of the location.""" + subdivisions: str + r"""The name of the primary administrative subdivision.""" + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + european_union_member: NotRequired[bool] + r"""Indicates if the country is a member of the European Union.""" + in_privacy_restricted_country: NotRequired[bool] + r"""Indicates if the country has privacy restrictions.""" + in_privacy_restricted_region: NotRequired[bool] + r"""Indicates if the region has privacy restrictions.""" + + +class GeoData(BaseModel): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + + continent_code: str + r"""The continent code where the country is located.""" + + country: str + r"""The official name of the country.""" + + city: str + r"""The name of the city.""" + + time_zone: str + r"""The time zone of the country.""" + + postal_code: int + r"""The postal code of the location.""" + + subdivisions: str + r"""The name of the primary administrative subdivision.""" + + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + + european_union_member: Optional[bool] = False + r"""Indicates if the country is a member of the European Union.""" + + in_privacy_restricted_country: Optional[bool] = False + r"""Indicates if the country has privacy restrictions.""" + + in_privacy_restricted_region: Optional[bool] = False + r"""Indicates if the region has privacy restrictions.""" + + +class GetPinAuthPinContainerTypedDict(TypedDict): + r"""Requests a new pin id used in the authentication flow""" + + id: int + code: str + product: str + qr: str + client_identifier: str + r"""The X-Client-Identifier used in the request""" + location: GeoDataTypedDict + r"""Geo location data""" + created_at: datetime + expires_at: datetime + trusted: NotRequired[bool] + expires_in: NotRequired[int] + r"""The number of seconds this pin expires, by default 900 seconds""" + auth_token: NotRequired[Nullable[Any]] + new_registration: NotRequired[Nullable[Any]] + + +class GetPinAuthPinContainer(BaseModel): + r"""Requests a new pin id used in the authentication flow""" + + id: int + + code: str + + product: str + + qr: str + + client_identifier: Annotated[str, pydantic.Field(alias="clientIdentifier")] + r"""The X-Client-Identifier used in the request""" + + location: GeoData + r"""Geo location data""" + + created_at: Annotated[datetime, pydantic.Field(alias="createdAt")] + + expires_at: Annotated[datetime, pydantic.Field(alias="expiresAt")] + + trusted: Optional[bool] = False + + expires_in: Annotated[Optional[int], pydantic.Field(alias="expiresIn")] = 900 + r"""The number of seconds this pin expires, by default 900 seconds""" + + auth_token: Annotated[OptionalNullable[Any], pydantic.Field(alias="authToken")] = ( + UNSET + ) + + new_registration: Annotated[ + OptionalNullable[Any], pydantic.Field(alias="newRegistration") + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["trusted", "expiresIn", "authToken", "newRegistration"] + nullable_fields = ["authToken", "newRegistration"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetPinResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + auth_pin_container: NotRequired[GetPinAuthPinContainerTypedDict] + r"""Requests a new pin id used in the authentication flow""" + + +class GetPinResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + auth_pin_container: Optional[GetPinAuthPinContainer] = None + r"""Requests a new pin id used in the authentication flow""" diff --git a/src/plex_api_client/models/operations/getplaylist.py b/src/plex_api_client/models/operations/getplaylist.py new file mode 100644 index 0000000..ab9e2b1 --- /dev/null +++ b/src/plex_api_client/models/operations/getplaylist.py @@ -0,0 +1,125 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPlaylistRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + + +class GetPlaylistRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + +class GetPlaylistMetadataTypedDict(TypedDict): + content: NotRequired[str] + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + summary: NotRequired[str] + smart: NotRequired[bool] + playlist_type: NotRequired[str] + composite: NotRequired[str] + icon: NotRequired[str] + duration: NotRequired[int] + leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + + +class GetPlaylistMetadata(BaseModel): + content: Optional[str] = None + + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + summary: Optional[str] = None + + smart: Optional[bool] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + composite: Optional[str] = None + + icon: Optional[str] = None + + duration: Optional[int] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + +class GetPlaylistMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + metadata: NotRequired[List[GetPlaylistMetadataTypedDict]] + + +class GetPlaylistMediaContainer(BaseModel): + size: Optional[int] = None + + metadata: Annotated[ + Optional[List[GetPlaylistMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetPlaylistResponseBodyTypedDict(TypedDict): + r"""The playlist""" + + media_container: NotRequired[GetPlaylistMediaContainerTypedDict] + + +class GetPlaylistResponseBody(BaseModel): + r"""The playlist""" + + media_container: Annotated[ + Optional[GetPlaylistMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetPlaylistResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetPlaylistResponseBodyTypedDict] + r"""The playlist""" + + +class GetPlaylistResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetPlaylistResponseBody] = None + r"""The playlist""" diff --git a/src/plex_api_client/models/operations/getplaylistcontents.py b/src/plex_api_client/models/operations/getplaylistcontents.py new file mode 100644 index 0000000..55f7879 --- /dev/null +++ b/src/plex_api_client/models/operations/getplaylistcontents.py @@ -0,0 +1,415 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetPlaylistContentsQueryParamType(int, Enum): + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + + +class GetPlaylistContentsRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + type: GetPlaylistContentsQueryParamType + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + +class GetPlaylistContentsRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + type: Annotated[ + GetPlaylistContentsQueryParamType, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + +class GetPlaylistContentsPartTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + duration: NotRequired[int] + file: NotRequired[str] + size: NotRequired[int] + audio_profile: NotRequired[str] + container: NotRequired[str] + has64bit_offsets: NotRequired[bool] + optimized_for_streaming: NotRequired[bool] + video_profile: NotRequired[str] + + +class GetPlaylistContentsPart(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + duration: Optional[int] = None + + file: Optional[str] = None + + size: Optional[int] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + container: Optional[str] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + optimized_for_streaming: Annotated[ + Optional[bool], pydantic.Field(alias="optimizedForStreaming") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + +class GetPlaylistContentsMediaTypedDict(TypedDict): + id: NotRequired[int] + duration: NotRequired[int] + bitrate: NotRequired[int] + width: NotRequired[int] + height: NotRequired[int] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[int] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[str] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + optimized_for_streaming: NotRequired[int] + audio_profile: NotRequired[str] + has64bit_offsets: NotRequired[bool] + video_profile: NotRequired[str] + part: NotRequired[List[GetPlaylistContentsPartTypedDict]] + + +class GetPlaylistContentsMedia(BaseModel): + id: Optional[int] = None + + duration: Optional[int] = None + + bitrate: Optional[int] = None + + width: Optional[int] = None + + height: Optional[int] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[str], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + optimized_for_streaming: Annotated[ + Optional[int], pydantic.Field(alias="optimizedForStreaming") + ] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[ + Optional[List[GetPlaylistContentsPart]], pydantic.Field(alias="Part") + ] = None + + +class GetPlaylistContentsGenreTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetPlaylistContentsGenre(BaseModel): + tag: Optional[str] = None + + +class GetPlaylistContentsCountryTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetPlaylistContentsCountry(BaseModel): + tag: Optional[str] = None + + +class GetPlaylistContentsDirectorTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetPlaylistContentsDirector(BaseModel): + tag: Optional[str] = None + + +class GetPlaylistContentsWriterTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetPlaylistContentsWriter(BaseModel): + tag: Optional[str] = None + + +class GetPlaylistContentsRoleTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetPlaylistContentsRole(BaseModel): + tag: Optional[str] = None + + +class GetPlaylistContentsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + title_sort: NotRequired[str] + library_section_title: NotRequired[str] + library_section_id: NotRequired[int] + library_section_key: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + year: NotRequired[int] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[int] + originally_available_at: NotRequired[date] + added_at: NotRequired[int] + updated_at: NotRequired[int] + audience_rating_image: NotRequired[str] + has_premium_extras: NotRequired[str] + has_premium_primary_extra: NotRequired[str] + rating_image: NotRequired[str] + media: NotRequired[List[GetPlaylistContentsMediaTypedDict]] + genre: NotRequired[List[GetPlaylistContentsGenreTypedDict]] + country: NotRequired[List[GetPlaylistContentsCountryTypedDict]] + director: NotRequired[List[GetPlaylistContentsDirectorTypedDict]] + writer: NotRequired[List[GetPlaylistContentsWriterTypedDict]] + role: NotRequired[List[GetPlaylistContentsRoleTypedDict]] + + +class GetPlaylistContentsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + title_sort: Annotated[Optional[str], pydantic.Field(alias="titleSort")] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[int] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + has_premium_extras: Annotated[ + Optional[str], pydantic.Field(alias="hasPremiumExtras") + ] = None + + has_premium_primary_extra: Annotated[ + Optional[str], pydantic.Field(alias="hasPremiumPrimaryExtra") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + media: Annotated[ + Optional[List[GetPlaylistContentsMedia]], pydantic.Field(alias="Media") + ] = None + + genre: Annotated[ + Optional[List[GetPlaylistContentsGenre]], pydantic.Field(alias="Genre") + ] = None + + country: Annotated[ + Optional[List[GetPlaylistContentsCountry]], pydantic.Field(alias="Country") + ] = None + + director: Annotated[ + Optional[List[GetPlaylistContentsDirector]], pydantic.Field(alias="Director") + ] = None + + writer: Annotated[ + Optional[List[GetPlaylistContentsWriter]], pydantic.Field(alias="Writer") + ] = None + + role: Annotated[ + Optional[List[GetPlaylistContentsRole]], pydantic.Field(alias="Role") + ] = None + + +class GetPlaylistContentsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + composite: NotRequired[str] + duration: NotRequired[int] + leaf_count: NotRequired[int] + playlist_type: NotRequired[str] + rating_key: NotRequired[str] + smart: NotRequired[bool] + title: NotRequired[str] + metadata: NotRequired[List[GetPlaylistContentsMetadataTypedDict]] + + +class GetPlaylistContentsMediaContainer(BaseModel): + size: Optional[int] = None + + composite: Optional[str] = None + + duration: Optional[int] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + smart: Optional[bool] = None + + title: Optional[str] = None + + metadata: Annotated[ + Optional[List[GetPlaylistContentsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetPlaylistContentsResponseBodyTypedDict(TypedDict): + r"""The playlist contents""" + + media_container: NotRequired[GetPlaylistContentsMediaContainerTypedDict] + + +class GetPlaylistContentsResponseBody(BaseModel): + r"""The playlist contents""" + + media_container: Annotated[ + Optional[GetPlaylistContentsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetPlaylistContentsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetPlaylistContentsResponseBodyTypedDict] + r"""The playlist contents""" + + +class GetPlaylistContentsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetPlaylistContentsResponseBody] = None + r"""The playlist contents""" diff --git a/src/plex_api_client/models/operations/getplaylists.py b/src/plex_api_client/models/operations/getplaylists.py new file mode 100644 index 0000000..9a040a4 --- /dev/null +++ b/src/plex_api_client/models/operations/getplaylists.py @@ -0,0 +1,154 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PlaylistType(str, Enum): + r"""limit to a type of playlist.""" + + AUDIO = "audio" + VIDEO = "video" + PHOTO = "photo" + + +class QueryParamSmart(int, Enum): + r"""type of playlists to return (default is all).""" + + ZERO = 0 + ONE = 1 + + +class GetPlaylistsRequestTypedDict(TypedDict): + playlist_type: NotRequired[PlaylistType] + r"""limit to a type of playlist.""" + smart: NotRequired[QueryParamSmart] + r"""type of playlists to return (default is all).""" + + +class GetPlaylistsRequest(BaseModel): + playlist_type: Annotated[ + Optional[PlaylistType], + pydantic.Field(alias="playlistType"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""limit to a type of playlist.""" + + smart: Annotated[ + Optional[QueryParamSmart], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""type of playlists to return (default is all).""" + + +class GetPlaylistsMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + summary: NotRequired[str] + smart: NotRequired[bool] + playlist_type: NotRequired[str] + composite: NotRequired[str] + icon: NotRequired[str] + view_count: NotRequired[int] + last_viewed_at: NotRequired[int] + duration: NotRequired[int] + leaf_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + + +class GetPlaylistsMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + summary: Optional[str] = None + + smart: Optional[bool] = None + + playlist_type: Annotated[Optional[str], pydantic.Field(alias="playlistType")] = None + + composite: Optional[str] = None + + icon: Optional[str] = None + + view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None + + last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( + None + ) + + duration: Optional[int] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + +class GetPlaylistsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + metadata: NotRequired[List[GetPlaylistsMetadataTypedDict]] + + +class GetPlaylistsMediaContainer(BaseModel): + size: Optional[int] = None + + metadata: Annotated[ + Optional[List[GetPlaylistsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetPlaylistsResponseBodyTypedDict(TypedDict): + r"""returns all playlists""" + + media_container: NotRequired[GetPlaylistsMediaContainerTypedDict] + + +class GetPlaylistsResponseBody(BaseModel): + r"""returns all playlists""" + + media_container: Annotated[ + Optional[GetPlaylistsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetPlaylistsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetPlaylistsResponseBodyTypedDict] + r"""returns all playlists""" + + +class GetPlaylistsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetPlaylistsResponseBody] = None + r"""returns all playlists""" diff --git a/src/plex_api_client/models/operations/getrecentlyadded.py b/src/plex_api_client/models/operations/getrecentlyadded.py new file mode 100644 index 0000000..075373d --- /dev/null +++ b/src/plex_api_client/models/operations/getrecentlyadded.py @@ -0,0 +1,387 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetRecentlyAddedRequestTypedDict(TypedDict): + x_plex_container_start: NotRequired[int] + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + x_plex_container_size: NotRequired[int] + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +class GetRecentlyAddedRequest(BaseModel): + x_plex_container_start: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Start"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + + """ + + x_plex_container_size: Annotated[ + Optional[int], + pydantic.Field(alias="X-Plex-Container-Size"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + + """ + + +class PartTypedDict(TypedDict): + id: NotRequired[float] + key: NotRequired[str] + duration: NotRequired[float] + file: NotRequired[str] + size: NotRequired[float] + container: NotRequired[str] + has64bit_offsets: NotRequired[bool] + has_thumbnail: NotRequired[float] + optimized_for_streaming: NotRequired[bool] + video_profile: NotRequired[str] + + +class Part(BaseModel): + id: Optional[float] = None + + key: Optional[str] = None + + duration: Optional[float] = None + + file: Optional[str] = None + + size: Optional[float] = None + + container: Optional[str] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + has_thumbnail: Annotated[Optional[float], pydantic.Field(alias="hasThumbnail")] = ( + None + ) + + optimized_for_streaming: Annotated[ + Optional[bool], pydantic.Field(alias="optimizedForStreaming") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + +class MediaTypedDict(TypedDict): + id: NotRequired[float] + duration: NotRequired[float] + bitrate: NotRequired[float] + width: NotRequired[float] + height: NotRequired[float] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[float] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[float] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + optimized_for_streaming: NotRequired[float] + has64bit_offsets: NotRequired[bool] + video_profile: NotRequired[str] + part: NotRequired[List[PartTypedDict]] + + +class Media(BaseModel): + id: Optional[float] = None + + duration: Optional[float] = None + + bitrate: Optional[float] = None + + width: Optional[float] = None + + height: Optional[float] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[ + Optional[float], pydantic.Field(alias="audioChannels") + ] = None + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[float], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + optimized_for_streaming: Annotated[ + Optional[float], pydantic.Field(alias="optimizedForStreaming") + ] = None + + has64bit_offsets: Annotated[ + Optional[bool], pydantic.Field(alias="has64bitOffsets") + ] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[Optional[List[Part]], pydantic.Field(alias="Part")] = None + + +class GenreTypedDict(TypedDict): + tag: NotRequired[str] + + +class Genre(BaseModel): + tag: Optional[str] = None + + +class DirectorTypedDict(TypedDict): + tag: NotRequired[str] + + +class Director(BaseModel): + tag: Optional[str] = None + + +class WriterTypedDict(TypedDict): + tag: NotRequired[str] + + +class Writer(BaseModel): + tag: Optional[str] = None + + +class CountryTypedDict(TypedDict): + tag: NotRequired[str] + + +class Country(BaseModel): + tag: Optional[str] = None + + +class RoleTypedDict(TypedDict): + tag: NotRequired[str] + + +class Role(BaseModel): + tag: Optional[str] = None + + +class GetRecentlyAddedMetadataTypedDict(TypedDict): + allow_sync: NotRequired[bool] + library_section_id: NotRequired[float] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + rating_key: NotRequired[float] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + year: NotRequired[float] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[float] + originally_available_at: NotRequired[datetime] + added_at: NotRequired[float] + updated_at: NotRequired[float] + audience_rating_image: NotRequired[str] + chapter_source: NotRequired[str] + primary_extra_key: NotRequired[str] + rating_image: NotRequired[str] + media: NotRequired[List[MediaTypedDict]] + genre: NotRequired[List[GenreTypedDict]] + director: NotRequired[List[DirectorTypedDict]] + writer: NotRequired[List[WriterTypedDict]] + country: NotRequired[List[CountryTypedDict]] + role: NotRequired[List[RoleTypedDict]] + + +class GetRecentlyAddedMetadata(BaseModel): + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + library_section_id: Annotated[ + Optional[float], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + rating_key: Annotated[Optional[float], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[float] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[float] = None + + originally_available_at: Annotated[ + Optional[datetime], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[float], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[float], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + chapter_source: Annotated[Optional[str], pydantic.Field(alias="chapterSource")] = ( + None + ) + + primary_extra_key: Annotated[ + Optional[str], pydantic.Field(alias="primaryExtraKey") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + media: Annotated[Optional[List[Media]], pydantic.Field(alias="Media")] = None + + genre: Annotated[Optional[List[Genre]], pydantic.Field(alias="Genre")] = None + + director: Annotated[Optional[List[Director]], pydantic.Field(alias="Director")] = ( + None + ) + + writer: Annotated[Optional[List[Writer]], pydantic.Field(alias="Writer")] = None + + country: Annotated[Optional[List[Country]], pydantic.Field(alias="Country")] = None + + role: Annotated[Optional[List[Role]], pydantic.Field(alias="Role")] = None + + +class GetRecentlyAddedMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[float] + mixed_parents: NotRequired[bool] + metadata: NotRequired[List[GetRecentlyAddedMetadataTypedDict]] + + +class GetRecentlyAddedMediaContainer(BaseModel): + size: Optional[float] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[float], pydantic.Field(alias="mediaTagVersion") + ] = None + + mixed_parents: Annotated[Optional[bool], pydantic.Field(alias="mixedParents")] = ( + None + ) + + metadata: Annotated[ + Optional[List[GetRecentlyAddedMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetRecentlyAddedResponseBodyTypedDict(TypedDict): + r"""The recently added content""" + + media_container: NotRequired[GetRecentlyAddedMediaContainerTypedDict] + + +class GetRecentlyAddedResponseBody(BaseModel): + r"""The recently added content""" + + media_container: Annotated[ + Optional[GetRecentlyAddedMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetRecentlyAddedResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetRecentlyAddedResponseBodyTypedDict] + r"""The recently added content""" + + +class GetRecentlyAddedResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetRecentlyAddedResponseBody] = None + r"""The recently added content""" diff --git a/src/plex_api_client/models/operations/getresizedphoto.py b/src/plex_api_client/models/operations/getresizedphoto.py new file mode 100644 index 0000000..a9d4694 --- /dev/null +++ b/src/plex_api_client/models/operations/getresizedphoto.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class MinSize(int, Enum): + r"""images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.""" + + ZERO = 0 + ONE = 1 + + +class Upscale(int, Enum): + r"""allow images to be resized beyond native dimensions.""" + + ZERO = 0 + ONE = 1 + + +class GetResizedPhotoRequestTypedDict(TypedDict): + width: float + r"""The width for the resized photo""" + height: float + r"""The height for the resized photo""" + blur: float + r"""The width for the resized photo""" + min_size: MinSize + r"""images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.""" + upscale: Upscale + r"""allow images to be resized beyond native dimensions.""" + url: str + r"""path to image within Plex""" + opacity: int + r"""The opacity for the resized photo""" + + +class GetResizedPhotoRequest(BaseModel): + width: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The width for the resized photo""" + + height: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The height for the resized photo""" + + blur: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The width for the resized photo""" + + min_size: Annotated[ + MinSize, + pydantic.Field(alias="minSize"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.""" + + upscale: Annotated[ + Upscale, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""allow images to be resized beyond native dimensions.""" + + url: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""path to image within Plex""" + + opacity: Annotated[ + int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] = 100 + r"""The opacity for the resized photo""" + + +class GetResizedPhotoResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetResizedPhotoResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/getresourcesstatistics.py b/src/plex_api_client/models/operations/getresourcesstatistics.py new file mode 100644 index 0000000..96c3820 --- /dev/null +++ b/src/plex_api_client/models/operations/getresourcesstatistics.py @@ -0,0 +1,113 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetResourcesStatisticsRequestTypedDict(TypedDict): + timespan: NotRequired[int] + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class GetResourcesStatisticsRequest(BaseModel): + timespan: Annotated[ + Optional[int], + pydantic.Field(alias="Timespan"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class StatisticsResourcesTypedDict(TypedDict): + timespan: NotRequired[int] + at: NotRequired[int] + host_cpu_utilization: NotRequired[float] + process_cpu_utilization: NotRequired[float] + host_memory_utilization: NotRequired[float] + process_memory_utilization: NotRequired[float] + + +class StatisticsResources(BaseModel): + timespan: Optional[int] = None + + at: Optional[int] = None + + host_cpu_utilization: Annotated[ + Optional[float], pydantic.Field(alias="hostCpuUtilization") + ] = None + + process_cpu_utilization: Annotated[ + Optional[float], pydantic.Field(alias="processCpuUtilization") + ] = None + + host_memory_utilization: Annotated[ + Optional[float], pydantic.Field(alias="hostMemoryUtilization") + ] = None + + process_memory_utilization: Annotated[ + Optional[float], pydantic.Field(alias="processMemoryUtilization") + ] = None + + +class GetResourcesStatisticsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + statistics_resources: NotRequired[List[StatisticsResourcesTypedDict]] + + +class GetResourcesStatisticsMediaContainer(BaseModel): + size: Optional[int] = None + + statistics_resources: Annotated[ + Optional[List[StatisticsResources]], pydantic.Field(alias="StatisticsResources") + ] = None + + +class GetResourcesStatisticsResponseBodyTypedDict(TypedDict): + r"""Resource Statistics""" + + media_container: NotRequired[GetResourcesStatisticsMediaContainerTypedDict] + + +class GetResourcesStatisticsResponseBody(BaseModel): + r"""Resource Statistics""" + + media_container: Annotated[ + Optional[GetResourcesStatisticsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetResourcesStatisticsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetResourcesStatisticsResponseBodyTypedDict] + r"""Resource Statistics""" + + +class GetResourcesStatisticsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetResourcesStatisticsResponseBody] = None + r"""Resource Statistics""" diff --git a/src/plex_api_client/models/operations/getsearchresults.py b/src/plex_api_client/models/operations/getsearchresults.py new file mode 100644 index 0000000..f1b46e7 --- /dev/null +++ b/src/plex_api_client/models/operations/getsearchresults.py @@ -0,0 +1,370 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSearchResultsRequestTypedDict(TypedDict): + query: str + r"""The search query string to use""" + + +class GetSearchResultsRequest(BaseModel): + query: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The search query string to use""" + + +class GetSearchResultsPartTypedDict(TypedDict): + id: NotRequired[float] + key: NotRequired[str] + duration: NotRequired[float] + file: NotRequired[str] + size: NotRequired[float] + audio_profile: NotRequired[str] + container: NotRequired[str] + video_profile: NotRequired[str] + + +class GetSearchResultsPart(BaseModel): + id: Optional[float] = None + + key: Optional[str] = None + + duration: Optional[float] = None + + file: Optional[str] = None + + size: Optional[float] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + container: Optional[str] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + +class GetSearchResultsMediaTypedDict(TypedDict): + id: NotRequired[float] + duration: NotRequired[float] + bitrate: NotRequired[float] + width: NotRequired[float] + height: NotRequired[float] + aspect_ratio: NotRequired[float] + audio_channels: NotRequired[float] + audio_codec: NotRequired[str] + video_codec: NotRequired[str] + video_resolution: NotRequired[float] + container: NotRequired[str] + video_frame_rate: NotRequired[str] + audio_profile: NotRequired[str] + video_profile: NotRequired[str] + part: NotRequired[List[GetSearchResultsPartTypedDict]] + + +class GetSearchResultsMedia(BaseModel): + id: Optional[float] = None + + duration: Optional[float] = None + + bitrate: Optional[float] = None + + width: Optional[float] = None + + height: Optional[float] = None + + aspect_ratio: Annotated[Optional[float], pydantic.Field(alias="aspectRatio")] = None + + audio_channels: Annotated[ + Optional[float], pydantic.Field(alias="audioChannels") + ] = None + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + video_resolution: Annotated[ + Optional[float], pydantic.Field(alias="videoResolution") + ] = None + + container: Optional[str] = None + + video_frame_rate: Annotated[ + Optional[str], pydantic.Field(alias="videoFrameRate") + ] = None + + audio_profile: Annotated[Optional[str], pydantic.Field(alias="audioProfile")] = None + + video_profile: Annotated[Optional[str], pydantic.Field(alias="videoProfile")] = None + + part: Annotated[ + Optional[List[GetSearchResultsPart]], pydantic.Field(alias="Part") + ] = None + + +class GetSearchResultsGenreTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetSearchResultsGenre(BaseModel): + tag: Optional[str] = None + + +class GetSearchResultsDirectorTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetSearchResultsDirector(BaseModel): + tag: Optional[str] = None + + +class GetSearchResultsWriterTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetSearchResultsWriter(BaseModel): + tag: Optional[str] = None + + +class GetSearchResultsCountryTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetSearchResultsCountry(BaseModel): + tag: Optional[str] = None + + +class GetSearchResultsRoleTypedDict(TypedDict): + tag: NotRequired[str] + + +class GetSearchResultsRole(BaseModel): + tag: Optional[str] = None + + +class GetSearchResultsMetadataTypedDict(TypedDict): + allow_sync: NotRequired[bool] + library_section_id: NotRequired[float] + library_section_title: NotRequired[str] + library_section_uuid: NotRequired[str] + personal: NotRequired[bool] + source_title: NotRequired[str] + rating_key: NotRequired[float] + key: NotRequired[str] + guid: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + rating: NotRequired[float] + audience_rating: NotRequired[float] + year: NotRequired[float] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[float] + originally_available_at: NotRequired[datetime] + added_at: NotRequired[float] + updated_at: NotRequired[float] + audience_rating_image: NotRequired[str] + chapter_source: NotRequired[str] + primary_extra_key: NotRequired[str] + rating_image: NotRequired[str] + media: NotRequired[List[GetSearchResultsMediaTypedDict]] + genre: NotRequired[List[GetSearchResultsGenreTypedDict]] + director: NotRequired[List[GetSearchResultsDirectorTypedDict]] + writer: NotRequired[List[GetSearchResultsWriterTypedDict]] + country: NotRequired[List[GetSearchResultsCountryTypedDict]] + role: NotRequired[List[GetSearchResultsRoleTypedDict]] + + +class GetSearchResultsMetadata(BaseModel): + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + library_section_id: Annotated[ + Optional[float], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_uuid: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionUUID") + ] = None + + personal: Optional[bool] = None + + source_title: Annotated[Optional[str], pydantic.Field(alias="sourceTitle")] = None + + rating_key: Annotated[Optional[float], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + rating: Optional[float] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[float] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[float] = None + + originally_available_at: Annotated[ + Optional[datetime], pydantic.Field(alias="originallyAvailableAt") + ] = None + + added_at: Annotated[Optional[float], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[float], pydantic.Field(alias="updatedAt")] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + chapter_source: Annotated[Optional[str], pydantic.Field(alias="chapterSource")] = ( + None + ) + + primary_extra_key: Annotated[ + Optional[str], pydantic.Field(alias="primaryExtraKey") + ] = None + + rating_image: Annotated[Optional[str], pydantic.Field(alias="ratingImage")] = None + + media: Annotated[ + Optional[List[GetSearchResultsMedia]], pydantic.Field(alias="Media") + ] = None + + genre: Annotated[ + Optional[List[GetSearchResultsGenre]], pydantic.Field(alias="Genre") + ] = None + + director: Annotated[ + Optional[List[GetSearchResultsDirector]], pydantic.Field(alias="Director") + ] = None + + writer: Annotated[ + Optional[List[GetSearchResultsWriter]], pydantic.Field(alias="Writer") + ] = None + + country: Annotated[ + Optional[List[GetSearchResultsCountry]], pydantic.Field(alias="Country") + ] = None + + role: Annotated[ + Optional[List[GetSearchResultsRole]], pydantic.Field(alias="Role") + ] = None + + +class ProviderTypedDict(TypedDict): + key: NotRequired[str] + title: NotRequired[str] + type: NotRequired[str] + + +class Provider(BaseModel): + key: Optional[str] = None + + title: Optional[str] = None + + type: Optional[str] = None + + +class GetSearchResultsMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + identifier: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[float] + metadata: NotRequired[List[GetSearchResultsMetadataTypedDict]] + provider: NotRequired[List[ProviderTypedDict]] + + +class GetSearchResultsMediaContainer(BaseModel): + size: Optional[float] = None + + identifier: Optional[str] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[float], pydantic.Field(alias="mediaTagVersion") + ] = None + + metadata: Annotated[ + Optional[List[GetSearchResultsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + provider: Annotated[Optional[List[Provider]], pydantic.Field(alias="Provider")] = ( + None + ) + + +class GetSearchResultsResponseBodyTypedDict(TypedDict): + r"""Search Results""" + + media_container: NotRequired[GetSearchResultsMediaContainerTypedDict] + + +class GetSearchResultsResponseBody(BaseModel): + r"""Search Results""" + + media_container: Annotated[ + Optional[GetSearchResultsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetSearchResultsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetSearchResultsResponseBodyTypedDict] + r"""Search Results""" + + +class GetSearchResultsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetSearchResultsResponseBody] = None + r"""Search Results""" diff --git a/src/plex_api_client/models/operations/getserveractivities.py b/src/plex_api_client/models/operations/getserveractivities.py new file mode 100644 index 0000000..7213cad --- /dev/null +++ b/src/plex_api_client/models/operations/getserveractivities.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ContextTypedDict(TypedDict): + library_section_id: NotRequired[str] + + +class Context(BaseModel): + library_section_id: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionID") + ] = None + + +class ActivityTypedDict(TypedDict): + uuid: NotRequired[str] + type: NotRequired[str] + cancellable: NotRequired[bool] + user_id: NotRequired[float] + title: NotRequired[str] + subtitle: NotRequired[str] + progress: NotRequired[float] + context: NotRequired[ContextTypedDict] + + +class Activity(BaseModel): + uuid: Optional[str] = None + + type: Optional[str] = None + + cancellable: Optional[bool] = None + + user_id: Annotated[Optional[float], pydantic.Field(alias="userID")] = None + + title: Optional[str] = None + + subtitle: Optional[str] = None + + progress: Optional[float] = None + + context: Annotated[Optional[Context], pydantic.Field(alias="Context")] = None + + +class GetServerActivitiesMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + activity: NotRequired[List[ActivityTypedDict]] + + +class GetServerActivitiesMediaContainer(BaseModel): + size: Optional[float] = None + + activity: Annotated[Optional[List[Activity]], pydantic.Field(alias="Activity")] = ( + None + ) + + +class GetServerActivitiesResponseBodyTypedDict(TypedDict): + r"""The Server Activities""" + + media_container: NotRequired[GetServerActivitiesMediaContainerTypedDict] + + +class GetServerActivitiesResponseBody(BaseModel): + r"""The Server Activities""" + + media_container: Annotated[ + Optional[GetServerActivitiesMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetServerActivitiesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetServerActivitiesResponseBodyTypedDict] + r"""The Server Activities""" + + +class GetServerActivitiesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetServerActivitiesResponseBody] = None + r"""The Server Activities""" diff --git a/src/plex_api_client/models/operations/getservercapabilities.py b/src/plex_api_client/models/operations/getservercapabilities.py new file mode 100644 index 0000000..726886c --- /dev/null +++ b/src/plex_api_client/models/operations/getservercapabilities.py @@ -0,0 +1,283 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class DirectoryTypedDict(TypedDict): + count: NotRequired[float] + key: NotRequired[str] + title: NotRequired[str] + + +class Directory(BaseModel): + count: Optional[float] = None + + key: Optional[str] = None + + title: Optional[str] = None + + +class MediaContainerTypedDict(TypedDict): + size: NotRequired[float] + allow_camera_upload: NotRequired[bool] + allow_channel_access: NotRequired[bool] + allow_media_deletion: NotRequired[bool] + allow_sharing: NotRequired[bool] + allow_sync: NotRequired[bool] + allow_tuners: NotRequired[bool] + background_processing: NotRequired[bool] + certificate: NotRequired[bool] + companion_proxy: NotRequired[bool] + country_code: NotRequired[str] + diagnostics: NotRequired[str] + event_stream: NotRequired[bool] + friendly_name: NotRequired[str] + hub_search: NotRequired[bool] + item_clusters: NotRequired[bool] + livetv: NotRequired[float] + machine_identifier: NotRequired[str] + media_providers: NotRequired[bool] + multiuser: NotRequired[bool] + music_analysis: NotRequired[float] + my_plex: NotRequired[bool] + my_plex_mapping_state: NotRequired[str] + my_plex_signin_state: NotRequired[str] + my_plex_subscription: NotRequired[bool] + my_plex_username: NotRequired[str] + offline_transcode: NotRequired[float] + owner_features: NotRequired[str] + photo_auto_tag: NotRequired[bool] + platform: NotRequired[str] + platform_version: NotRequired[str] + plugin_host: NotRequired[bool] + push_notifications: NotRequired[bool] + read_only_libraries: NotRequired[bool] + streaming_brain_abr_version: NotRequired[float] + streaming_brain_version: NotRequired[float] + sync: NotRequired[bool] + transcoder_active_video_sessions: NotRequired[float] + transcoder_audio: NotRequired[bool] + transcoder_lyrics: NotRequired[bool] + transcoder_photo: NotRequired[bool] + transcoder_subtitles: NotRequired[bool] + transcoder_video: NotRequired[bool] + transcoder_video_bitrates: NotRequired[str] + transcoder_video_qualities: NotRequired[str] + transcoder_video_resolutions: NotRequired[str] + updated_at: NotRequired[float] + updater: NotRequired[bool] + version: NotRequired[str] + voice_search: NotRequired[bool] + directory: NotRequired[List[DirectoryTypedDict]] + + +class MediaContainer(BaseModel): + size: Optional[float] = None + + allow_camera_upload: Annotated[ + Optional[bool], pydantic.Field(alias="allowCameraUpload") + ] = None + + allow_channel_access: Annotated[ + Optional[bool], pydantic.Field(alias="allowChannelAccess") + ] = None + + allow_media_deletion: Annotated[ + Optional[bool], pydantic.Field(alias="allowMediaDeletion") + ] = None + + allow_sharing: Annotated[Optional[bool], pydantic.Field(alias="allowSharing")] = ( + None + ) + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + allow_tuners: Annotated[Optional[bool], pydantic.Field(alias="allowTuners")] = None + + background_processing: Annotated[ + Optional[bool], pydantic.Field(alias="backgroundProcessing") + ] = None + + certificate: Optional[bool] = None + + companion_proxy: Annotated[ + Optional[bool], pydantic.Field(alias="companionProxy") + ] = None + + country_code: Annotated[Optional[str], pydantic.Field(alias="countryCode")] = None + + diagnostics: Optional[str] = None + + event_stream: Annotated[Optional[bool], pydantic.Field(alias="eventStream")] = None + + friendly_name: Annotated[Optional[str], pydantic.Field(alias="friendlyName")] = None + + hub_search: Annotated[Optional[bool], pydantic.Field(alias="hubSearch")] = None + + item_clusters: Annotated[Optional[bool], pydantic.Field(alias="itemClusters")] = ( + None + ) + + livetv: Optional[float] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + media_providers: Annotated[ + Optional[bool], pydantic.Field(alias="mediaProviders") + ] = None + + multiuser: Optional[bool] = None + + music_analysis: Annotated[ + Optional[float], pydantic.Field(alias="musicAnalysis") + ] = None + + my_plex: Annotated[Optional[bool], pydantic.Field(alias="myPlex")] = None + + my_plex_mapping_state: Annotated[ + Optional[str], pydantic.Field(alias="myPlexMappingState") + ] = None + + my_plex_signin_state: Annotated[ + Optional[str], pydantic.Field(alias="myPlexSigninState") + ] = None + + my_plex_subscription: Annotated[ + Optional[bool], pydantic.Field(alias="myPlexSubscription") + ] = None + + my_plex_username: Annotated[ + Optional[str], pydantic.Field(alias="myPlexUsername") + ] = None + + offline_transcode: Annotated[ + Optional[float], pydantic.Field(alias="offlineTranscode") + ] = None + + owner_features: Annotated[Optional[str], pydantic.Field(alias="ownerFeatures")] = ( + None + ) + + photo_auto_tag: Annotated[Optional[bool], pydantic.Field(alias="photoAutoTag")] = ( + None + ) + + platform: Optional[str] = None + + platform_version: Annotated[ + Optional[str], pydantic.Field(alias="platformVersion") + ] = None + + plugin_host: Annotated[Optional[bool], pydantic.Field(alias="pluginHost")] = None + + push_notifications: Annotated[ + Optional[bool], pydantic.Field(alias="pushNotifications") + ] = None + + read_only_libraries: Annotated[ + Optional[bool], pydantic.Field(alias="readOnlyLibraries") + ] = None + + streaming_brain_abr_version: Annotated[ + Optional[float], pydantic.Field(alias="streamingBrainABRVersion") + ] = None + + streaming_brain_version: Annotated[ + Optional[float], pydantic.Field(alias="streamingBrainVersion") + ] = None + + sync: Optional[bool] = None + + transcoder_active_video_sessions: Annotated[ + Optional[float], pydantic.Field(alias="transcoderActiveVideoSessions") + ] = None + + transcoder_audio: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderAudio") + ] = None + + transcoder_lyrics: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderLyrics") + ] = None + + transcoder_photo: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderPhoto") + ] = None + + transcoder_subtitles: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderSubtitles") + ] = None + + transcoder_video: Annotated[ + Optional[bool], pydantic.Field(alias="transcoderVideo") + ] = None + + transcoder_video_bitrates: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoBitrates") + ] = None + + transcoder_video_qualities: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoQualities") + ] = None + + transcoder_video_resolutions: Annotated[ + Optional[str], pydantic.Field(alias="transcoderVideoResolutions") + ] = None + + updated_at: Annotated[Optional[float], pydantic.Field(alias="updatedAt")] = None + + updater: Optional[bool] = None + + version: Optional[str] = None + + voice_search: Annotated[Optional[bool], pydantic.Field(alias="voiceSearch")] = None + + directory: Annotated[ + Optional[List[Directory]], pydantic.Field(alias="Directory") + ] = None + + +class GetServerCapabilitiesResponseBodyTypedDict(TypedDict): + r"""The Server Capabilities""" + + media_container: NotRequired[MediaContainerTypedDict] + + +class GetServerCapabilitiesResponseBody(BaseModel): + r"""The Server Capabilities""" + + media_container: Annotated[ + Optional[MediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetServerCapabilitiesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetServerCapabilitiesResponseBodyTypedDict] + r"""The Server Capabilities""" + + +class GetServerCapabilitiesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetServerCapabilitiesResponseBody] = None + r"""The Server Capabilities""" diff --git a/src/plex_api_client/models/operations/getserverlist.py b/src/plex_api_client/models/operations/getserverlist.py new file mode 100644 index 0000000..1064095 --- /dev/null +++ b/src/plex_api_client/models/operations/getserverlist.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetServerListServerTypedDict(TypedDict): + name: NotRequired[str] + host: NotRequired[str] + address: NotRequired[str] + port: NotRequired[float] + machine_identifier: NotRequired[str] + version: NotRequired[str] + + +class GetServerListServer(BaseModel): + name: Optional[str] = None + + host: Optional[str] = None + + address: Optional[str] = None + + port: Optional[float] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + version: Optional[str] = None + + +class GetServerListMediaContainerTypedDict(TypedDict): + size: NotRequired[float] + server: NotRequired[List[GetServerListServerTypedDict]] + + +class GetServerListMediaContainer(BaseModel): + size: Optional[float] = None + + server: Annotated[ + Optional[List[GetServerListServer]], pydantic.Field(alias="Server") + ] = None + + +class GetServerListResponseBodyTypedDict(TypedDict): + r"""List of Servers""" + + media_container: NotRequired[GetServerListMediaContainerTypedDict] + + +class GetServerListResponseBody(BaseModel): + r"""List of Servers""" + + media_container: Annotated[ + Optional[GetServerListMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetServerListResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetServerListResponseBodyTypedDict] + r"""List of Servers""" + + +class GetServerListResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetServerListResponseBody] = None + r"""List of Servers""" diff --git a/src/plex_api_client/models/operations/getserverpreferences.py b/src/plex_api_client/models/operations/getserverpreferences.py new file mode 100644 index 0000000..07f0e79 --- /dev/null +++ b/src/plex_api_client/models/operations/getserverpreferences.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class SettingTypedDict(TypedDict): + id: NotRequired[str] + label: NotRequired[str] + summary: NotRequired[str] + type: NotRequired[str] + default: NotRequired[bool] + value: NotRequired[bool] + hidden: NotRequired[bool] + advanced: NotRequired[bool] + group: NotRequired[str] + enum_values: NotRequired[str] + + +class Setting(BaseModel): + id: Optional[str] = None + + label: Optional[str] = None + + summary: Optional[str] = None + + type: Optional[str] = None + + default: Optional[bool] = None + + value: Optional[bool] = None + + hidden: Optional[bool] = None + + advanced: Optional[bool] = None + + group: Optional[str] = None + + enum_values: Annotated[Optional[str], pydantic.Field(alias="enumValues")] = None + + +class GetServerPreferencesMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + setting: NotRequired[List[SettingTypedDict]] + + +class GetServerPreferencesMediaContainer(BaseModel): + size: Optional[int] = None + + setting: Annotated[Optional[List[Setting]], pydantic.Field(alias="Setting")] = None + + +class GetServerPreferencesResponseBodyTypedDict(TypedDict): + r"""Server Preferences""" + + media_container: NotRequired[GetServerPreferencesMediaContainerTypedDict] + + +class GetServerPreferencesResponseBody(BaseModel): + r"""Server Preferences""" + + media_container: Annotated[ + Optional[GetServerPreferencesMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetServerPreferencesResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetServerPreferencesResponseBodyTypedDict] + r"""Server Preferences""" + + +class GetServerPreferencesResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetServerPreferencesResponseBody] = None + r"""Server Preferences""" diff --git a/src/plex_api_client/models/operations/getsessionhistory.py b/src/plex_api_client/models/operations/getsessionhistory.py new file mode 100644 index 0000000..87175ee --- /dev/null +++ b/src/plex_api_client/models/operations/getsessionhistory.py @@ -0,0 +1,209 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class QueryParamFilterTypedDict(TypedDict): + r"""Filters content by field and direction/equality + (Unknown if viewedAt is the only supported column) + + """ + + +class QueryParamFilter(BaseModel): + r"""Filters content by field and direction/equality + (Unknown if viewedAt is the only supported column) + + """ + + +class GetSessionHistoryRequestTypedDict(TypedDict): + sort: NotRequired[str] + r"""Sorts the results by the specified field followed by the direction (asc, desc) + + """ + account_id: NotRequired[int] + r"""Filter results by those that are related to a specific users id + + """ + filter_: NotRequired[QueryParamFilterTypedDict] + r"""Filters content by field and direction/equality + (Unknown if viewedAt is the only supported column) + + """ + library_section_id: NotRequired[int] + r"""Filters the results based on the id of a valid library section + + """ + + +class GetSessionHistoryRequest(BaseModel): + sort: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sorts the results by the specified field followed by the direction (asc, desc) + + """ + + account_id: Annotated[ + Optional[int], + pydantic.Field(alias="accountId"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter results by those that are related to a specific users id + + """ + + filter_: Annotated[ + Optional[QueryParamFilter], + pydantic.Field(alias="filter"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters content by field and direction/equality + (Unknown if viewedAt is the only supported column) + + """ + + library_section_id: Annotated[ + Optional[int], + pydantic.Field(alias="librarySectionID"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters the results based on the id of a valid library section + + """ + + +class GetSessionHistoryMetadataTypedDict(TypedDict): + history_key: NotRequired[str] + key: NotRequired[str] + rating_key: NotRequired[str] + library_section_id: NotRequired[str] + parent_key: NotRequired[str] + grandparent_key: NotRequired[str] + title: NotRequired[str] + grandparent_title: NotRequired[str] + type: NotRequired[str] + thumb: NotRequired[str] + parent_thumb: NotRequired[str] + grandparent_thumb: NotRequired[str] + grandparent_art: NotRequired[str] + index: NotRequired[int] + parent_index: NotRequired[int] + originally_available_at: NotRequired[date] + viewed_at: NotRequired[int] + account_id: NotRequired[int] + device_id: NotRequired[int] + + +class GetSessionHistoryMetadata(BaseModel): + history_key: Annotated[Optional[str], pydantic.Field(alias="historyKey")] = None + + key: Optional[str] = None + + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + library_section_id: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionID") + ] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + grandparent_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentKey") + ] = None + + title: Optional[str] = None + + grandparent_title: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTitle") + ] = None + + type: Optional[str] = None + + thumb: Optional[str] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + grandparent_thumb: Annotated[ + Optional[str], pydantic.Field(alias="grandparentThumb") + ] = None + + grandparent_art: Annotated[ + Optional[str], pydantic.Field(alias="grandparentArt") + ] = None + + index: Optional[int] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + viewed_at: Annotated[Optional[int], pydantic.Field(alias="viewedAt")] = None + + account_id: Annotated[Optional[int], pydantic.Field(alias="accountID")] = None + + device_id: Annotated[Optional[int], pydantic.Field(alias="deviceID")] = None + + +class GetSessionHistoryMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + metadata: NotRequired[List[GetSessionHistoryMetadataTypedDict]] + + +class GetSessionHistoryMediaContainer(BaseModel): + size: Optional[int] = None + + metadata: Annotated[ + Optional[List[GetSessionHistoryMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetSessionHistoryResponseBodyTypedDict(TypedDict): + r"""List of Plex Sessions""" + + media_container: NotRequired[GetSessionHistoryMediaContainerTypedDict] + + +class GetSessionHistoryResponseBody(BaseModel): + r"""List of Plex Sessions""" + + media_container: Annotated[ + Optional[GetSessionHistoryMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetSessionHistoryResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetSessionHistoryResponseBodyTypedDict] + r"""List of Plex Sessions""" + + +class GetSessionHistoryResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetSessionHistoryResponseBody] = None + r"""List of Plex Sessions""" diff --git a/src/plex_api_client/models/operations/getsessions.py b/src/plex_api_client/models/operations/getsessions.py new file mode 100644 index 0000000..70c4a7e --- /dev/null +++ b/src/plex_api_client/models/operations/getsessions.py @@ -0,0 +1,423 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetSessionsStreamTypedDict(TypedDict): + album_gain: NotRequired[str] + album_peak: NotRequired[str] + album_range: NotRequired[str] + audio_channel_layout: NotRequired[str] + bit_depth: NotRequired[int] + bitrate: NotRequired[int] + channels: NotRequired[int] + codec: NotRequired[str] + display_title: NotRequired[str] + extended_display_title: NotRequired[str] + gain: NotRequired[str] + id: NotRequired[str] + index: NotRequired[int] + loudness: NotRequired[str] + lra: NotRequired[str] + peak: NotRequired[str] + sampling_rate: NotRequired[int] + selected: NotRequired[bool] + stream_type: NotRequired[int] + location: NotRequired[str] + + +class GetSessionsStream(BaseModel): + album_gain: Annotated[Optional[str], pydantic.Field(alias="albumGain")] = None + + album_peak: Annotated[Optional[str], pydantic.Field(alias="albumPeak")] = None + + album_range: Annotated[Optional[str], pydantic.Field(alias="albumRange")] = None + + audio_channel_layout: Annotated[ + Optional[str], pydantic.Field(alias="audioChannelLayout") + ] = None + + bit_depth: Annotated[Optional[int], pydantic.Field(alias="bitDepth")] = None + + bitrate: Optional[int] = None + + channels: Optional[int] = None + + codec: Optional[str] = None + + display_title: Annotated[Optional[str], pydantic.Field(alias="displayTitle")] = None + + extended_display_title: Annotated[ + Optional[str], pydantic.Field(alias="extendedDisplayTitle") + ] = None + + gain: Optional[str] = None + + id: Optional[str] = None + + index: Optional[int] = None + + loudness: Optional[str] = None + + lra: Optional[str] = None + + peak: Optional[str] = None + + sampling_rate: Annotated[Optional[int], pydantic.Field(alias="samplingRate")] = None + + selected: Optional[bool] = None + + stream_type: Annotated[Optional[int], pydantic.Field(alias="streamType")] = None + + location: Optional[str] = None + + +class GetSessionsPartTypedDict(TypedDict): + container: NotRequired[str] + duration: NotRequired[int] + file: NotRequired[str] + has_thumbnail: NotRequired[str] + id: NotRequired[str] + key: NotRequired[str] + size: NotRequired[int] + decision: NotRequired[str] + selected: NotRequired[bool] + stream: NotRequired[List[GetSessionsStreamTypedDict]] + + +class GetSessionsPart(BaseModel): + container: Optional[str] = None + + duration: Optional[int] = None + + file: Optional[str] = None + + has_thumbnail: Annotated[Optional[str], pydantic.Field(alias="hasThumbnail")] = None + + id: Optional[str] = None + + key: Optional[str] = None + + size: Optional[int] = None + + decision: Optional[str] = None + + selected: Optional[bool] = None + + stream: Annotated[ + Optional[List[GetSessionsStream]], pydantic.Field(alias="Stream") + ] = None + + +class GetSessionsMediaTypedDict(TypedDict): + audio_channels: NotRequired[int] + audio_codec: NotRequired[str] + bitrate: NotRequired[int] + container: NotRequired[str] + duration: NotRequired[int] + id: NotRequired[str] + selected: NotRequired[bool] + part: NotRequired[List[GetSessionsPartTypedDict]] + + +class GetSessionsMedia(BaseModel): + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + bitrate: Optional[int] = None + + container: Optional[str] = None + + duration: Optional[int] = None + + id: Optional[str] = None + + selected: Optional[bool] = None + + part: Annotated[Optional[List[GetSessionsPart]], pydantic.Field(alias="Part")] = ( + None + ) + + +class GetSessionsUserTypedDict(TypedDict): + id: NotRequired[str] + thumb: NotRequired[str] + title: NotRequired[str] + + +class GetSessionsUser(BaseModel): + id: Optional[str] = None + + thumb: Optional[str] = None + + title: Optional[str] = None + + +class PlayerTypedDict(TypedDict): + address: NotRequired[str] + machine_identifier: NotRequired[str] + model: NotRequired[str] + platform: NotRequired[str] + platform_version: NotRequired[str] + product: NotRequired[str] + profile: NotRequired[str] + remote_public_address: NotRequired[str] + state: NotRequired[str] + title: NotRequired[str] + version: NotRequired[str] + local: NotRequired[bool] + relayed: NotRequired[bool] + secure: NotRequired[bool] + user_id: NotRequired[int] + + +class Player(BaseModel): + address: Optional[str] = None + + machine_identifier: Annotated[ + Optional[str], pydantic.Field(alias="machineIdentifier") + ] = None + + model: Optional[str] = None + + platform: Optional[str] = None + + platform_version: Annotated[ + Optional[str], pydantic.Field(alias="platformVersion") + ] = None + + product: Optional[str] = None + + profile: Optional[str] = None + + remote_public_address: Annotated[ + Optional[str], pydantic.Field(alias="remotePublicAddress") + ] = None + + state: Optional[str] = None + + title: Optional[str] = None + + version: Optional[str] = None + + local: Optional[bool] = None + + relayed: Optional[bool] = None + + secure: Optional[bool] = None + + user_id: Annotated[Optional[int], pydantic.Field(alias="userID")] = None + + +class SessionTypedDict(TypedDict): + id: NotRequired[str] + bandwidth: NotRequired[int] + location: NotRequired[str] + + +class Session(BaseModel): + id: Optional[str] = None + + bandwidth: Optional[int] = None + + location: Optional[str] = None + + +class GetSessionsMetadataTypedDict(TypedDict): + added_at: NotRequired[int] + art: NotRequired[str] + duration: NotRequired[int] + grandparent_art: NotRequired[str] + grandparent_guid: NotRequired[str] + grandparent_key: NotRequired[str] + grandparent_rating_key: NotRequired[str] + grandparent_thumb: NotRequired[str] + grandparent_title: NotRequired[str] + guid: NotRequired[str] + index: NotRequired[int] + key: NotRequired[str] + library_section_id: NotRequired[str] + library_section_key: NotRequired[str] + library_section_title: NotRequired[str] + music_analysis_version: NotRequired[str] + parent_guid: NotRequired[str] + parent_index: NotRequired[int] + parent_key: NotRequired[str] + parent_rating_key: NotRequired[str] + parent_studio: NotRequired[str] + parent_thumb: NotRequired[str] + parent_title: NotRequired[str] + parent_year: NotRequired[int] + rating_count: NotRequired[int] + rating_key: NotRequired[str] + session_key: NotRequired[str] + thumb: NotRequired[str] + title: NotRequired[str] + title_sort: NotRequired[str] + type: NotRequired[str] + updated_at: NotRequired[int] + view_offset: NotRequired[int] + media: NotRequired[List[GetSessionsMediaTypedDict]] + user: NotRequired[GetSessionsUserTypedDict] + player: NotRequired[PlayerTypedDict] + session: NotRequired[SessionTypedDict] + + +class GetSessionsMetadata(BaseModel): + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + grandparent_art: Annotated[ + Optional[str], pydantic.Field(alias="grandparentArt") + ] = None + + grandparent_guid: Annotated[ + Optional[str], pydantic.Field(alias="grandparentGuid") + ] = None + + grandparent_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentKey") + ] = None + + grandparent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="grandparentRatingKey") + ] = None + + grandparent_thumb: Annotated[ + Optional[str], pydantic.Field(alias="grandparentThumb") + ] = None + + grandparent_title: Annotated[ + Optional[str], pydantic.Field(alias="grandparentTitle") + ] = None + + guid: Optional[str] = None + + index: Optional[int] = None + + key: Optional[str] = None + + library_section_id: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + music_analysis_version: Annotated[ + Optional[str], pydantic.Field(alias="musicAnalysisVersion") + ] = None + + parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None + + parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None + + parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None + + parent_rating_key: Annotated[ + Optional[str], pydantic.Field(alias="parentRatingKey") + ] = None + + parent_studio: Annotated[Optional[str], pydantic.Field(alias="parentStudio")] = None + + parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None + + parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None + + parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None + + rating_count: Annotated[Optional[int], pydantic.Field(alias="ratingCount")] = None + + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + session_key: Annotated[Optional[str], pydantic.Field(alias="sessionKey")] = None + + thumb: Optional[str] = None + + title: Optional[str] = None + + title_sort: Annotated[Optional[str], pydantic.Field(alias="titleSort")] = None + + type: Optional[str] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + view_offset: Annotated[Optional[int], pydantic.Field(alias="viewOffset")] = None + + media: Annotated[ + Optional[List[GetSessionsMedia]], pydantic.Field(alias="Media") + ] = None + + user: Annotated[Optional[GetSessionsUser], pydantic.Field(alias="User")] = None + + player: Annotated[Optional[Player], pydantic.Field(alias="Player")] = None + + session: Annotated[Optional[Session], pydantic.Field(alias="Session")] = None + + +class GetSessionsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + metadata: NotRequired[List[GetSessionsMetadataTypedDict]] + + +class GetSessionsMediaContainer(BaseModel): + size: Optional[int] = None + + metadata: Annotated[ + Optional[List[GetSessionsMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetSessionsResponseBodyTypedDict(TypedDict): + r"""List of Active Plex Sessions""" + + media_container: NotRequired[GetSessionsMediaContainerTypedDict] + + +class GetSessionsResponseBody(BaseModel): + r"""List of Active Plex Sessions""" + + media_container: Annotated[ + Optional[GetSessionsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetSessionsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetSessionsResponseBodyTypedDict] + r"""List of Active Plex Sessions""" + + +class GetSessionsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetSessionsResponseBody] = None + r"""List of Active Plex Sessions""" diff --git a/src/plex_api_client/models/operations/getsourceconnectioninformation.py b/src/plex_api_client/models/operations/getsourceconnectioninformation.py new file mode 100644 index 0000000..0dec2b2 --- /dev/null +++ b/src/plex_api_client/models/operations/getsourceconnectioninformation.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class GetSourceConnectionInformationRequestTypedDict(TypedDict): + source: str + r"""The source identifier with an included prefix.""" + + +class GetSourceConnectionInformationRequest(BaseModel): + source: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The source identifier with an included prefix.""" + + +class GetSourceConnectionInformationResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetSourceConnectionInformationResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/getstatistics.py b/src/plex_api_client/models/operations/getstatistics.py new file mode 100644 index 0000000..cdd8ac1 --- /dev/null +++ b/src/plex_api_client/models/operations/getstatistics.py @@ -0,0 +1,172 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetStatisticsRequestTypedDict(TypedDict): + timespan: NotRequired[int] + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class GetStatisticsRequest(BaseModel): + timespan: Annotated[ + Optional[int], + pydantic.Field(alias="Timespan"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + """ + + +class GetStatisticsDeviceTypedDict(TypedDict): + id: NotRequired[int] + name: NotRequired[str] + platform: NotRequired[str] + client_identifier: NotRequired[str] + created_at: NotRequired[int] + + +class GetStatisticsDevice(BaseModel): + id: Optional[int] = None + + name: Optional[str] = None + + platform: Optional[str] = None + + client_identifier: Annotated[ + Optional[str], pydantic.Field(alias="clientIdentifier") + ] = None + + created_at: Annotated[Optional[int], pydantic.Field(alias="createdAt")] = None + + +class AccountTypedDict(TypedDict): + id: NotRequired[int] + key: NotRequired[str] + name: NotRequired[str] + default_audio_language: NotRequired[str] + auto_select_audio: NotRequired[bool] + default_subtitle_language: NotRequired[str] + subtitle_mode: NotRequired[int] + thumb: NotRequired[str] + + +class Account(BaseModel): + id: Optional[int] = None + + key: Optional[str] = None + + name: Optional[str] = None + + default_audio_language: Annotated[ + Optional[str], pydantic.Field(alias="defaultAudioLanguage") + ] = None + + auto_select_audio: Annotated[ + Optional[bool], pydantic.Field(alias="autoSelectAudio") + ] = None + + default_subtitle_language: Annotated[ + Optional[str], pydantic.Field(alias="defaultSubtitleLanguage") + ] = None + + subtitle_mode: Annotated[Optional[int], pydantic.Field(alias="subtitleMode")] = None + + thumb: Optional[str] = None + + +class StatisticsMediaTypedDict(TypedDict): + account_id: NotRequired[int] + device_id: NotRequired[int] + timespan: NotRequired[int] + at: NotRequired[int] + metadata_type: NotRequired[int] + count: NotRequired[int] + duration: NotRequired[int] + + +class StatisticsMedia(BaseModel): + account_id: Annotated[Optional[int], pydantic.Field(alias="accountID")] = None + + device_id: Annotated[Optional[int], pydantic.Field(alias="deviceID")] = None + + timespan: Optional[int] = None + + at: Optional[int] = None + + metadata_type: Annotated[Optional[int], pydantic.Field(alias="metadataType")] = None + + count: Optional[int] = None + + duration: Optional[int] = None + + +class GetStatisticsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + device: NotRequired[List[GetStatisticsDeviceTypedDict]] + account: NotRequired[List[AccountTypedDict]] + statistics_media: NotRequired[List[StatisticsMediaTypedDict]] + + +class GetStatisticsMediaContainer(BaseModel): + size: Optional[int] = None + + device: Annotated[ + Optional[List[GetStatisticsDevice]], pydantic.Field(alias="Device") + ] = None + + account: Annotated[Optional[List[Account]], pydantic.Field(alias="Account")] = None + + statistics_media: Annotated[ + Optional[List[StatisticsMedia]], pydantic.Field(alias="StatisticsMedia") + ] = None + + +class GetStatisticsResponseBodyTypedDict(TypedDict): + r"""Media Statistics""" + + media_container: NotRequired[GetStatisticsMediaContainerTypedDict] + + +class GetStatisticsResponseBody(BaseModel): + r"""Media Statistics""" + + media_container: Annotated[ + Optional[GetStatisticsMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetStatisticsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetStatisticsResponseBodyTypedDict] + r"""Media Statistics""" + + +class GetStatisticsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetStatisticsResponseBody] = None + r"""Media Statistics""" diff --git a/src/plex_api_client/models/operations/gettimeline.py b/src/plex_api_client/models/operations/gettimeline.py new file mode 100644 index 0000000..18e6496 --- /dev/null +++ b/src/plex_api_client/models/operations/gettimeline.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class State(str, Enum): + r"""The state of the media item""" + + PLAYING = "playing" + PAUSED = "paused" + STOPPED = "stopped" + + +class GetTimelineRequestTypedDict(TypedDict): + rating_key: float + r"""The rating key of the media item""" + key: str + r"""The key of the media item to get the timeline for""" + state: State + r"""The state of the media item""" + has_mde: float + r"""Whether the media item has MDE""" + time: float + r"""The time of the media item""" + duration: float + r"""The duration of the media item""" + context: str + r"""The context of the media item""" + play_queue_item_id: float + r"""The play queue item ID of the media item""" + play_back_time: float + r"""The playback time of the media item""" + row: float + r"""The row of the media item""" + + +class GetTimelineRequest(BaseModel): + rating_key: Annotated[ + float, + pydantic.Field(alias="ratingKey"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The rating key of the media item""" + + key: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The key of the media item to get the timeline for""" + + state: Annotated[ + State, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The state of the media item""" + + has_mde: Annotated[ + float, + pydantic.Field(alias="hasMDE"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Whether the media item has MDE""" + + time: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The time of the media item""" + + duration: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The duration of the media item""" + + context: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The context of the media item""" + + play_queue_item_id: Annotated[ + float, + pydantic.Field(alias="playQueueItemID"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The play queue item ID of the media item""" + + play_back_time: Annotated[ + float, + pydantic.Field(alias="playBackTime"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The playback time of the media item""" + + row: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The row of the media item""" + + +class GetTimelineResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTimelineResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/gettokenbypinid.py b/src/plex_api_client/models/operations/gettokenbypinid.py new file mode 100644 index 0000000..f76eeb0 --- /dev/null +++ b/src/plex_api_client/models/operations/gettokenbypinid.py @@ -0,0 +1,248 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from plex_api_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Any, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_TOKEN_BY_PIN_ID_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class GetTokenByPinIDGlobalsTypedDict(TypedDict): + x_plex_client_identifier: 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 GetTokenByPinIDGlobals(BaseModel): + x_plex_client_identifier: 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 GetTokenByPinIDRequestTypedDict(TypedDict): + pin_id: int + r"""The PinID to retrieve an access token for""" + x_plex_client_identifier: 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 GetTokenByPinIDRequest(BaseModel): + pin_id: Annotated[ + int, + pydantic.Field(alias="pinID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The PinID to retrieve an access token for""" + + x_plex_client_identifier: 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 GetTokenByPinIDGeoDataTypedDict(TypedDict): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + continent_code: str + r"""The continent code where the country is located.""" + country: str + r"""The official name of the country.""" + city: str + r"""The name of the city.""" + time_zone: str + r"""The time zone of the country.""" + postal_code: int + r"""The postal code of the location.""" + subdivisions: str + r"""The name of the primary administrative subdivision.""" + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + european_union_member: NotRequired[bool] + r"""Indicates if the country is a member of the European Union.""" + in_privacy_restricted_country: NotRequired[bool] + r"""Indicates if the country has privacy restrictions.""" + in_privacy_restricted_region: NotRequired[bool] + r"""Indicates if the region has privacy restrictions.""" + + +class GetTokenByPinIDGeoData(BaseModel): + r"""Geo location data""" + + code: str + r"""The ISO 3166-1 alpha-2 code of the country.""" + + continent_code: str + r"""The continent code where the country is located.""" + + country: str + r"""The official name of the country.""" + + city: str + r"""The name of the city.""" + + time_zone: str + r"""The time zone of the country.""" + + postal_code: int + r"""The postal code of the location.""" + + subdivisions: str + r"""The name of the primary administrative subdivision.""" + + coordinates: str + r"""The geographical coordinates (latitude, longitude) of the location.""" + + european_union_member: Optional[bool] = False + r"""Indicates if the country is a member of the European Union.""" + + in_privacy_restricted_country: Optional[bool] = False + r"""Indicates if the country has privacy restrictions.""" + + in_privacy_restricted_region: Optional[bool] = False + r"""Indicates if the region has privacy restrictions.""" + + +class GetTokenByPinIDAuthPinContainerTypedDict(TypedDict): + r"""The Pin with a non-null authToken when it has been verified by the user""" + + id: int + code: str + product: str + qr: str + client_identifier: str + r"""The X-Client-Identifier used in the request""" + location: GetTokenByPinIDGeoDataTypedDict + r"""Geo location data""" + created_at: datetime + expires_at: datetime + trusted: NotRequired[bool] + expires_in: NotRequired[int] + r"""The number of seconds this pin expires, by default 900 seconds""" + auth_token: NotRequired[Nullable[Any]] + new_registration: NotRequired[Nullable[Any]] + + +class GetTokenByPinIDAuthPinContainer(BaseModel): + r"""The Pin with a non-null authToken when it has been verified by the user""" + + id: int + + code: str + + product: str + + qr: str + + client_identifier: Annotated[str, pydantic.Field(alias="clientIdentifier")] + r"""The X-Client-Identifier used in the request""" + + location: GetTokenByPinIDGeoData + r"""Geo location data""" + + created_at: Annotated[datetime, pydantic.Field(alias="createdAt")] + + expires_at: Annotated[datetime, pydantic.Field(alias="expiresAt")] + + trusted: Optional[bool] = False + + expires_in: Annotated[Optional[int], pydantic.Field(alias="expiresIn")] = 900 + r"""The number of seconds this pin expires, by default 900 seconds""" + + auth_token: Annotated[OptionalNullable[Any], pydantic.Field(alias="authToken")] = ( + UNSET + ) + + new_registration: Annotated[ + OptionalNullable[Any], pydantic.Field(alias="newRegistration") + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["trusted", "expiresIn", "authToken", "newRegistration"] + nullable_fields = ["authToken", "newRegistration"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetTokenByPinIDResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + auth_pin_container: NotRequired[GetTokenByPinIDAuthPinContainerTypedDict] + r"""The Pin with a non-null authToken when it has been verified by the user""" + + +class GetTokenByPinIDResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + auth_pin_container: Optional[GetTokenByPinIDAuthPinContainer] = None + r"""The Pin with a non-null authToken when it has been verified by the user""" diff --git a/src/plex_api_client/models/operations/gettopwatchedcontent.py b/src/plex_api_client/models/operations/gettopwatchedcontent.py new file mode 100644 index 0000000..2819ba0 --- /dev/null +++ b/src/plex_api_client/models/operations/gettopwatchedcontent.py @@ -0,0 +1,330 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import date +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class GetTopWatchedContentQueryParamType(int, Enum): + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + + +class GetTopWatchedContentRequestTypedDict(TypedDict): + type: GetTopWatchedContentQueryParamType + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + include_guids: NotRequired[int] + r"""Adds the Guids object to the response + + """ + + +class GetTopWatchedContentRequest(BaseModel): + type: Annotated[ + GetTopWatchedContentQueryParamType, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The type of media to retrieve. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + """ + + include_guids: Annotated[ + Optional[int], + pydantic.Field(alias="includeGuids"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Adds the Guids object to the response + + """ + + +class GetTopWatchedContentGenreTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + + +class GetTopWatchedContentGenre(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + +class GetTopWatchedContentCountryTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + + +class GetTopWatchedContentCountry(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + +class GetTopWatchedContentGuidsTypedDict(TypedDict): + id: NotRequired[str] + + +class GetTopWatchedContentGuids(BaseModel): + id: Optional[str] = None + + +class GetTopWatchedContentRoleTypedDict(TypedDict): + id: NotRequired[int] + filter_: NotRequired[str] + tag: NotRequired[str] + tag_key: NotRequired[str] + role: NotRequired[str] + thumb: NotRequired[str] + + +class GetTopWatchedContentRole(BaseModel): + id: Optional[int] = None + + filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = None + + tag: Optional[str] = None + + tag_key: Annotated[Optional[str], pydantic.Field(alias="tagKey")] = None + + role: Optional[str] = None + + thumb: Optional[str] = None + + +class UserTypedDict(TypedDict): + id: NotRequired[int] + + +class User(BaseModel): + id: Optional[int] = None + + +class GetTopWatchedContentMetadataTypedDict(TypedDict): + rating_key: NotRequired[str] + key: NotRequired[str] + guid: NotRequired[str] + slug: NotRequired[str] + studio: NotRequired[str] + type: NotRequired[str] + title: NotRequired[str] + library_section_title: NotRequired[str] + library_section_id: NotRequired[int] + library_section_key: NotRequired[str] + content_rating: NotRequired[str] + summary: NotRequired[str] + index: NotRequired[int] + audience_rating: NotRequired[float] + year: NotRequired[int] + tagline: NotRequired[str] + thumb: NotRequired[str] + art: NotRequired[str] + duration: NotRequired[int] + originally_available_at: NotRequired[date] + leaf_count: NotRequired[int] + viewed_leaf_count: NotRequired[int] + child_count: NotRequired[int] + added_at: NotRequired[int] + updated_at: NotRequired[int] + global_view_count: NotRequired[int] + audience_rating_image: NotRequired[str] + genre: NotRequired[List[GetTopWatchedContentGenreTypedDict]] + country: NotRequired[List[GetTopWatchedContentCountryTypedDict]] + guids: NotRequired[List[GetTopWatchedContentGuidsTypedDict]] + role: NotRequired[List[GetTopWatchedContentRoleTypedDict]] + user: NotRequired[List[UserTypedDict]] + + +class GetTopWatchedContentMetadata(BaseModel): + rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None + + key: Optional[str] = None + + guid: Optional[str] = None + + slug: Optional[str] = None + + studio: Optional[str] = None + + type: Optional[str] = None + + title: Optional[str] = None + + library_section_title: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionTitle") + ] = None + + library_section_id: Annotated[ + Optional[int], pydantic.Field(alias="librarySectionID") + ] = None + + library_section_key: Annotated[ + Optional[str], pydantic.Field(alias="librarySectionKey") + ] = None + + content_rating: Annotated[Optional[str], pydantic.Field(alias="contentRating")] = ( + None + ) + + summary: Optional[str] = None + + index: Optional[int] = None + + audience_rating: Annotated[ + Optional[float], pydantic.Field(alias="audienceRating") + ] = None + + year: Optional[int] = None + + tagline: Optional[str] = None + + thumb: Optional[str] = None + + art: Optional[str] = None + + duration: Optional[int] = None + + originally_available_at: Annotated[ + Optional[date], pydantic.Field(alias="originallyAvailableAt") + ] = None + + leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None + + viewed_leaf_count: Annotated[ + Optional[int], pydantic.Field(alias="viewedLeafCount") + ] = None + + child_count: Annotated[Optional[int], pydantic.Field(alias="childCount")] = None + + added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None + + updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None + + global_view_count: Annotated[ + Optional[int], pydantic.Field(alias="globalViewCount") + ] = None + + audience_rating_image: Annotated[ + Optional[str], pydantic.Field(alias="audienceRatingImage") + ] = None + + genre: Annotated[ + Optional[List[GetTopWatchedContentGenre]], pydantic.Field(alias="Genre") + ] = None + + country: Annotated[ + Optional[List[GetTopWatchedContentCountry]], pydantic.Field(alias="Country") + ] = None + + guids: Annotated[ + Optional[List[GetTopWatchedContentGuids]], pydantic.Field(alias="Guid") + ] = None + + role: Annotated[ + Optional[List[GetTopWatchedContentRole]], pydantic.Field(alias="Role") + ] = None + + user: Annotated[Optional[List[User]], pydantic.Field(alias="User")] = None + + +class GetTopWatchedContentMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + allow_sync: NotRequired[bool] + identifier: NotRequired[str] + media_tag_prefix: NotRequired[str] + media_tag_version: NotRequired[int] + metadata: NotRequired[List[GetTopWatchedContentMetadataTypedDict]] + + +class GetTopWatchedContentMediaContainer(BaseModel): + size: Optional[int] = None + + allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None + + identifier: Optional[str] = None + + media_tag_prefix: Annotated[ + Optional[str], pydantic.Field(alias="mediaTagPrefix") + ] = None + + media_tag_version: Annotated[ + Optional[int], pydantic.Field(alias="mediaTagVersion") + ] = None + + metadata: Annotated[ + Optional[List[GetTopWatchedContentMetadata]], pydantic.Field(alias="Metadata") + ] = None + + +class GetTopWatchedContentResponseBodyTypedDict(TypedDict): + r"""The metadata of the library item.""" + + media_container: NotRequired[GetTopWatchedContentMediaContainerTypedDict] + + +class GetTopWatchedContentResponseBody(BaseModel): + r"""The metadata of the library item.""" + + media_container: Annotated[ + Optional[GetTopWatchedContentMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetTopWatchedContentResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetTopWatchedContentResponseBodyTypedDict] + r"""The metadata of the library item.""" + + +class GetTopWatchedContentResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetTopWatchedContentResponseBody] = None + r"""The metadata of the library item.""" diff --git a/src/plex_api_client/models/operations/gettranscodesessions.py b/src/plex_api_client/models/operations/gettranscodesessions.py new file mode 100644 index 0000000..77d5020 --- /dev/null +++ b/src/plex_api_client/models/operations/gettranscodesessions.py @@ -0,0 +1,156 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class TranscodeSessionTypedDict(TypedDict): + key: NotRequired[str] + throttled: NotRequired[bool] + complete: NotRequired[bool] + progress: NotRequired[float] + size: NotRequired[int] + speed: NotRequired[float] + error: NotRequired[bool] + duration: NotRequired[int] + remaining: NotRequired[int] + context: NotRequired[str] + source_video_codec: NotRequired[str] + source_audio_codec: NotRequired[str] + video_decision: NotRequired[str] + audio_decision: NotRequired[str] + subtitle_decision: NotRequired[str] + protocol: NotRequired[str] + container: NotRequired[str] + video_codec: NotRequired[str] + audio_codec: NotRequired[str] + audio_channels: NotRequired[int] + transcode_hw_requested: NotRequired[bool] + time_stamp: NotRequired[float] + max_offset_available: NotRequired[float] + min_offset_available: NotRequired[float] + + +class TranscodeSession(BaseModel): + key: Optional[str] = None + + throttled: Optional[bool] = None + + complete: Optional[bool] = None + + progress: Optional[float] = None + + size: Optional[int] = None + + speed: Optional[float] = None + + error: Optional[bool] = None + + duration: Optional[int] = None + + remaining: Optional[int] = None + + context: Optional[str] = None + + source_video_codec: Annotated[ + Optional[str], pydantic.Field(alias="sourceVideoCodec") + ] = None + + source_audio_codec: Annotated[ + Optional[str], pydantic.Field(alias="sourceAudioCodec") + ] = None + + video_decision: Annotated[Optional[str], pydantic.Field(alias="videoDecision")] = ( + None + ) + + audio_decision: Annotated[Optional[str], pydantic.Field(alias="audioDecision")] = ( + None + ) + + subtitle_decision: Annotated[ + Optional[str], pydantic.Field(alias="subtitleDecision") + ] = None + + protocol: Optional[str] = None + + container: Optional[str] = None + + video_codec: Annotated[Optional[str], pydantic.Field(alias="videoCodec")] = None + + audio_codec: Annotated[Optional[str], pydantic.Field(alias="audioCodec")] = None + + audio_channels: Annotated[Optional[int], pydantic.Field(alias="audioChannels")] = ( + None + ) + + transcode_hw_requested: Annotated[ + Optional[bool], pydantic.Field(alias="transcodeHwRequested") + ] = None + + time_stamp: Annotated[Optional[float], pydantic.Field(alias="timeStamp")] = None + + max_offset_available: Annotated[ + Optional[float], pydantic.Field(alias="maxOffsetAvailable") + ] = None + + min_offset_available: Annotated[ + Optional[float], pydantic.Field(alias="minOffsetAvailable") + ] = None + + +class GetTranscodeSessionsMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + transcode_session: NotRequired[List[TranscodeSessionTypedDict]] + + +class GetTranscodeSessionsMediaContainer(BaseModel): + size: Optional[int] = None + + transcode_session: Annotated[ + Optional[List[TranscodeSession]], pydantic.Field(alias="TranscodeSession") + ] = None + + +class GetTranscodeSessionsResponseBodyTypedDict(TypedDict): + r"""The Transcode Sessions""" + + media_container: NotRequired[GetTranscodeSessionsMediaContainerTypedDict] + + +class GetTranscodeSessionsResponseBody(BaseModel): + r"""The Transcode Sessions""" + + media_container: Annotated[ + Optional[GetTranscodeSessionsMediaContainer], + pydantic.Field(alias="MediaContainer"), + ] = None + + +class GetTranscodeSessionsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetTranscodeSessionsResponseBodyTypedDict] + r"""The Transcode Sessions""" + + +class GetTranscodeSessionsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetTranscodeSessionsResponseBody] = None + r"""The Transcode Sessions""" diff --git a/src/plex_api_client/models/operations/gettransienttoken.py b/src/plex_api_client/models/operations/gettransienttoken.py new file mode 100644 index 0000000..b537129 --- /dev/null +++ b/src/plex_api_client/models/operations/gettransienttoken.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class GetTransientTokenQueryParamType(str, Enum): + r"""`delegation` - This is the only supported `type` parameter.""" + + DELEGATION = "delegation" + + +class Scope(str, Enum): + r"""`all` - This is the only supported `scope` parameter.""" + + ALL = "all" + + +class GetTransientTokenRequestTypedDict(TypedDict): + type: GetTransientTokenQueryParamType + r"""`delegation` - This is the only supported `type` parameter.""" + scope: Scope + r"""`all` - This is the only supported `scope` parameter.""" + + +class GetTransientTokenRequest(BaseModel): + type: Annotated[ + GetTransientTokenQueryParamType, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""`delegation` - This is the only supported `type` parameter.""" + + scope: Annotated[ + Scope, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""`all` - This is the only supported `scope` parameter.""" + + +class GetTransientTokenResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class GetTransientTokenResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/getupdatestatus.py b/src/plex_api_client/models/operations/getupdatestatus.py new file mode 100644 index 0000000..4784017 --- /dev/null +++ b/src/plex_api_client/models/operations/getupdatestatus.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +import pydantic +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class ReleaseTypedDict(TypedDict): + key: NotRequired[str] + version: NotRequired[str] + added: NotRequired[str] + fixed: NotRequired[str] + download_url: NotRequired[str] + state: NotRequired[str] + + +class Release(BaseModel): + key: Optional[str] = None + + version: Optional[str] = None + + added: Optional[str] = None + + fixed: Optional[str] = None + + download_url: Annotated[Optional[str], pydantic.Field(alias="downloadURL")] = None + + state: Optional[str] = None + + +class GetUpdateStatusMediaContainerTypedDict(TypedDict): + size: NotRequired[int] + can_install: NotRequired[bool] + checked_at: NotRequired[int] + download_url: NotRequired[str] + status: NotRequired[int] + release: NotRequired[List[ReleaseTypedDict]] + + +class GetUpdateStatusMediaContainer(BaseModel): + size: Optional[int] = None + + can_install: Annotated[Optional[bool], pydantic.Field(alias="canInstall")] = None + + checked_at: Annotated[Optional[int], pydantic.Field(alias="checkedAt")] = None + + download_url: Annotated[Optional[str], pydantic.Field(alias="downloadURL")] = None + + status: Optional[int] = None + + release: Annotated[Optional[List[Release]], pydantic.Field(alias="Release")] = None + + +class GetUpdateStatusResponseBodyTypedDict(TypedDict): + r"""The Server Updates""" + + media_container: NotRequired[GetUpdateStatusMediaContainerTypedDict] + + +class GetUpdateStatusResponseBody(BaseModel): + r"""The Server Updates""" + + media_container: Annotated[ + Optional[GetUpdateStatusMediaContainer], pydantic.Field(alias="MediaContainer") + ] = None + + +class GetUpdateStatusResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetUpdateStatusResponseBodyTypedDict] + r"""The Server Updates""" + + +class GetUpdateStatusResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetUpdateStatusResponseBody] = None + r"""The Server Updates""" diff --git a/src/plex_api_client/models/operations/getuserdetails.py b/src/plex_api_client/models/operations/getuserdetails.py new file mode 100644 index 0000000..257d33c --- /dev/null +++ b/src/plex_api_client/models/operations/getuserdetails.py @@ -0,0 +1,822 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +import httpx +from plex_api_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_USER_DETAILS_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class GetUserDetailsRequestTypedDict(TypedDict): + x_plex_token: str + r"""Plex Authentication Token""" + + +class GetUserDetailsRequest(BaseModel): + x_plex_token: Annotated[ + str, + pydantic.Field(alias="X-Plex-Token"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Plex Authentication Token""" + + +class MailingListStatus(str, Enum): + r"""Your current mailing list status""" + + ACTIVE = "active" + UNSUBSCRIBED = "unsubscribed" + + +class AutoSelectSubtitle(str, Enum): + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + + ZERO = "0" + ONE = "1" + + +class DefaultSubtitleAccessibility(str, Enum): + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + + ZERO = "0" + ONE = "1" + + +class DefaultSubtitleForced(str, Enum): + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + + ZERO = "0" + ONE = "1" + + +class WatchedIndicator(str, Enum): + ZERO = "0" + ONE = "1" + + +class MediaReviewsVisibility(int, Enum): + ZERO = 0 + ONE = 1 + + +class UserProfileTypedDict(TypedDict): + default_audio_language: Nullable[str] + r"""The preferred audio language for the account""" + default_subtitle_language: Nullable[str] + r"""The preferred subtitle language for the account""" + auto_select_audio: NotRequired[bool] + r"""If the account has automatically select audio and subtitle tracks enabled""" + auto_select_subtitle: NotRequired[AutoSelectSubtitle] + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + default_subtitle_accessibility: NotRequired[DefaultSubtitleAccessibility] + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + default_subtitle_forced: NotRequired[DefaultSubtitleForced] + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + watched_indicator: NotRequired[WatchedIndicator] + media_reviews_visibility: NotRequired[MediaReviewsVisibility] + + +class UserProfile(BaseModel): + default_audio_language: Annotated[ + Nullable[str], pydantic.Field(alias="defaultAudioLanguage") + ] + r"""The preferred audio language for the account""" + + default_subtitle_language: Annotated[ + Nullable[str], pydantic.Field(alias="defaultSubtitleLanguage") + ] + r"""The preferred subtitle language for the account""" + + auto_select_audio: Annotated[ + Optional[bool], pydantic.Field(alias="autoSelectAudio") + ] = True + r"""If the account has automatically select audio and subtitle tracks enabled""" + + auto_select_subtitle: Annotated[ + Optional[AutoSelectSubtitle], pydantic.Field(alias="autoSelectSubtitle") + ] = None + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + + default_subtitle_accessibility: Annotated[ + Optional[DefaultSubtitleAccessibility], + pydantic.Field(alias="defaultSubtitleAccessibility"), + ] = None + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + + default_subtitle_forced: Annotated[ + Optional[DefaultSubtitleForced], pydantic.Field(alias="defaultSubtitleForced") + ] = None + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + + watched_indicator: Annotated[ + Optional[WatchedIndicator], pydantic.Field(alias="watchedIndicator") + ] = None + + media_reviews_visibility: Annotated[ + Optional[MediaReviewsVisibility], pydantic.Field(alias="mediaReviewsVisibility") + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "autoSelectAudio", + "autoSelectSubtitle", + "defaultSubtitleAccessibility", + "defaultSubtitleForced", + "watchedIndicator", + "mediaReviewsVisibility", + ] + nullable_fields = ["defaultAudioLanguage", "defaultSubtitleLanguage"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetUserDetailsStatus(str, Enum): + ONLINE = "online" + OFFLINE = "offline" + + +class ServicesTypedDict(TypedDict): + identifier: str + endpoint: str + token: Nullable[str] + secret: Nullable[str] + status: GetUserDetailsStatus + + +class Services(BaseModel): + identifier: str + + endpoint: str + + token: Nullable[str] + + secret: Nullable[str] + + status: GetUserDetailsStatus + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["token", "secret"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class Features(str, Enum): + ANDROID_DOLBY_VISION = "Android - Dolby Vision" + ANDROID_PI_P = "Android - PiP" + CU_SUNSET = "CU Sunset" + HRK_ENABLE_EUR = "HRK_enable_EUR" + TREBLE_SHOW_FEATURES = "TREBLE-show-features" + AD_COUNTDOWN_TIMER = "ad-countdown-timer" + ADAPTIVE_BITRATE = "adaptive_bitrate" + AMAZON_LOOP_DEBUG = "amazon-loop-debug" + AVOD_AD_ANALYSIS = "avod-ad-analysis" + AVOD_NEW_MEDIA = "avod-new-media" + BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + CLIENT_RADIO_STATIONS = "client-radio-stations" + CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + COLLECTIONS = "collections" + COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" + COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" + COMPANIONS_SONOS = "companions_sonos" + CUSTOM_HOME_REMOVAL = "custom-home-removal" + DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" + DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DRM_SUPPORT = "drm_support" + EXCLUDE_RESTRICTIONS = "exclude restrictions" + FEDERATED_AUTH = "federated-auth" + FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GUIDED_UPGRADE = "guided-upgrade" + HOME = "home" + INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" + IOS14_PRIVACY_BANNER = "ios14-privacy-banner" + ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + KEEP_PAYMENT_METHOD = "keep-payment-method" + KEVIN_BACON = "kevin-bacon" + KOREA_CONSENT = "korea-consent" + LE_ISRG_ROOT_X1 = "le_isrg_root_x1" + LETS_ENCRYPT = "lets_encrypt" + LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" + LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" + LIVETV = "livetv" + METADATA_SEARCH = "metadata_search" + NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" + NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + PHOTOS_FAVORITES = "photos-favorites" + PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PMS_HEALTH = "pms_health" + RADIO = "radio" + RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" + SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SHARED_SERVER_NOTIFICATION = "shared_server_notification" + SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_WITH_APPLE = "signin_with_apple" + SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + TRANSCODER_CACHE = "transcoder_cache" + TUNER_SHARING = "tuner-sharing" + TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" + UNSUPPORTEDTUNERS = "unsupportedtuners" + UPGRADE_3DS2 = "upgrade-3ds2" + VOD_SCHEMA = "vod-schema" + VOD_CLOUDFLARE = "vod_cloudflare" + WATCH_TOGETHER_INVITE = "watch-together-invite" + WEB_SERVER_DASHBOARD = "web_server_dashboard" + + +class GetUserDetailsAuthenticationStatus(str, Enum): + r"""String representation of subscriptionActive""" + + INACTIVE = "Inactive" + ACTIVE = "Active" + + +class SubscriptionTypedDict(TypedDict): + r"""If the account’s Plex Pass subscription is active""" + + features: NotRequired[List[Features]] + r"""List of features allowed on your Plex Pass subscription""" + active: NotRequired[bool] + r"""If the account's Plex Pass subscription is active""" + subscribed_at: NotRequired[Nullable[str]] + r"""Date the account subscribed to Plex Pass""" + status: NotRequired[GetUserDetailsAuthenticationStatus] + r"""String representation of subscriptionActive""" + payment_service: NotRequired[Nullable[str]] + r"""Payment service used for your Plex Pass subscription""" + plan: NotRequired[Nullable[str]] + r"""Name of Plex Pass subscription plan""" + + +class Subscription(BaseModel): + r"""If the account’s Plex Pass subscription is active""" + + features: Optional[List[Features]] = None + r"""List of features allowed on your Plex Pass subscription""" + + active: Optional[bool] = None + r"""If the account's Plex Pass subscription is active""" + + subscribed_at: Annotated[ + OptionalNullable[str], pydantic.Field(alias="subscribedAt") + ] = UNSET + r"""Date the account subscribed to Plex Pass""" + + status: Optional[GetUserDetailsAuthenticationStatus] = None + r"""String representation of subscriptionActive""" + + payment_service: Annotated[ + OptionalNullable[str], pydantic.Field(alias="paymentService") + ] = UNSET + r"""Payment service used for your Plex Pass subscription""" + + plan: OptionalNullable[str] = UNSET + r"""Name of Plex Pass subscription plan""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "features", + "active", + "subscribedAt", + "status", + "paymentService", + "plan", + ] + nullable_fields = ["subscribedAt", "paymentService", "plan"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetUserDetailsFeatures(str, Enum): + ANDROID_DOLBY_VISION = "Android - Dolby Vision" + ANDROID_PI_P = "Android - PiP" + CU_SUNSET = "CU Sunset" + HRK_ENABLE_EUR = "HRK_enable_EUR" + TREBLE_SHOW_FEATURES = "TREBLE-show-features" + AD_COUNTDOWN_TIMER = "ad-countdown-timer" + ADAPTIVE_BITRATE = "adaptive_bitrate" + AMAZON_LOOP_DEBUG = "amazon-loop-debug" + AVOD_AD_ANALYSIS = "avod-ad-analysis" + AVOD_NEW_MEDIA = "avod-new-media" + BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + CLIENT_RADIO_STATIONS = "client-radio-stations" + CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + COLLECTIONS = "collections" + COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" + COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" + COMPANIONS_SONOS = "companions_sonos" + CUSTOM_HOME_REMOVAL = "custom-home-removal" + DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" + DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DRM_SUPPORT = "drm_support" + EXCLUDE_RESTRICTIONS = "exclude restrictions" + FEDERATED_AUTH = "federated-auth" + FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GUIDED_UPGRADE = "guided-upgrade" + HOME = "home" + INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" + IOS14_PRIVACY_BANNER = "ios14-privacy-banner" + ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + KEEP_PAYMENT_METHOD = "keep-payment-method" + KEVIN_BACON = "kevin-bacon" + KOREA_CONSENT = "korea-consent" + LE_ISRG_ROOT_X1 = "le_isrg_root_x1" + LETS_ENCRYPT = "lets_encrypt" + LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" + LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" + LIVETV = "livetv" + METADATA_SEARCH = "metadata_search" + NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" + NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + PHOTOS_FAVORITES = "photos-favorites" + PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PMS_HEALTH = "pms_health" + RADIO = "radio" + RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" + SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SHARED_SERVER_NOTIFICATION = "shared_server_notification" + SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_WITH_APPLE = "signin_with_apple" + SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + TRANSCODER_CACHE = "transcoder_cache" + TUNER_SHARING = "tuner-sharing" + TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" + UNSUPPORTEDTUNERS = "unsupportedtuners" + UPGRADE_3DS2 = "upgrade-3ds2" + VOD_SCHEMA = "vod-schema" + VOD_CLOUDFLARE = "vod_cloudflare" + WATCH_TOGETHER_INVITE = "watch-together-invite" + WEB_SERVER_DASHBOARD = "web_server_dashboard" + + +class GetUserDetailsAuthenticationResponseStatus(str, Enum): + r"""String representation of subscriptionActive""" + + INACTIVE = "Inactive" + ACTIVE = "Active" + + +class GetUserDetailsSubscriptionTypedDict(TypedDict): + features: NotRequired[List[GetUserDetailsFeatures]] + r"""List of features allowed on your Plex Pass subscription""" + active: NotRequired[bool] + r"""If the account's Plex Pass subscription is active""" + subscribed_at: NotRequired[Nullable[str]] + r"""Date the account subscribed to Plex Pass""" + status: NotRequired[GetUserDetailsAuthenticationResponseStatus] + r"""String representation of subscriptionActive""" + payment_service: NotRequired[Nullable[str]] + r"""Payment service used for your Plex Pass subscription""" + plan: NotRequired[Nullable[str]] + r"""Name of Plex Pass subscription plan""" + + +class GetUserDetailsSubscription(BaseModel): + features: Optional[List[GetUserDetailsFeatures]] = None + r"""List of features allowed on your Plex Pass subscription""" + + active: Optional[bool] = None + r"""If the account's Plex Pass subscription is active""" + + subscribed_at: Annotated[ + OptionalNullable[str], pydantic.Field(alias="subscribedAt") + ] = UNSET + r"""Date the account subscribed to Plex Pass""" + + status: Optional[GetUserDetailsAuthenticationResponseStatus] = None + r"""String representation of subscriptionActive""" + + payment_service: Annotated[ + OptionalNullable[str], pydantic.Field(alias="paymentService") + ] = UNSET + r"""Payment service used for your Plex Pass subscription""" + + plan: OptionalNullable[str] = UNSET + r"""Name of Plex Pass subscription plan""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "features", + "active", + "subscribedAt", + "status", + "paymentService", + "plan", + ] + nullable_fields = ["subscribedAt", "paymentService", "plan"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetUserDetailsUserPlexAccountTypedDict(TypedDict): + r"""Logged in user details""" + + ads_consent: Nullable[bool] + r"""Unknown""" + ads_consent_reminder_at: Nullable[datetime] + r"""Unknown""" + ads_consent_set_at: Nullable[datetime] + r"""Unknown""" + auth_token: str + r"""The account token""" + country: str + r"""The account country""" + email: str + r"""The account email address""" + friendly_name: str + r"""Your account full name""" + entitlements: List[str] + r"""List of devices your allowed to use with this account""" + home_size: int + r"""The number of accounts in the Plex Home""" + id: int + r"""The Plex account ID""" + joined_at: int + r"""Unix epoch datetime""" + locale: Nullable[str] + r"""The account locale""" + mailing_list_status: MailingListStatus + r"""Your current mailing list status""" + max_home_size: int + r"""The maximum number of accounts allowed in the Plex Home""" + profile: UserProfileTypedDict + remember_expires_at: int + r"""Unix epoch datetime""" + scrobble_types: str + r"""Unknown""" + services: List[ServicesTypedDict] + subscription: SubscriptionTypedDict + r"""If the account’s Plex Pass subscription is active""" + subscription_description: Nullable[str] + r"""Description of the Plex Pass subscription""" + subscriptions: List[GetUserDetailsSubscriptionTypedDict] + thumb: str + r"""URL of the account thumbnail""" + title: str + r"""The title of the account (username or friendly name)""" + username: str + r"""The account username""" + uuid: str + r"""The account UUID""" + anonymous: NotRequired[Nullable[bool]] + r"""Unknown""" + backup_codes_created: NotRequired[bool] + r"""If the two-factor authentication backup codes have been created""" + confirmed: NotRequired[bool] + r"""If the account has been confirmed""" + email_only_auth: NotRequired[bool] + r"""If login with email only is enabled""" + experimental_features: NotRequired[bool] + r"""If experimental features are enabled""" + guest: NotRequired[bool] + r"""If the account is a Plex Home guest user""" + has_password: NotRequired[bool] + r"""If the account has a password""" + home: NotRequired[bool] + r"""If the account is a Plex Home user""" + home_admin: NotRequired[bool] + r"""If the account is the Plex Home admin""" + mailing_list_active: NotRequired[bool] + r"""If you are subscribed to the Plex newsletter""" + pin: NotRequired[str] + r"""[Might be removed] The hashed Plex Home PIN""" + protected: NotRequired[bool] + r"""If the account has a Plex Home PIN enabled""" + restricted: NotRequired[bool] + r"""If the account is a Plex Home managed user""" + roles: NotRequired[List[str]] + r"""[Might be removed] List of account roles. Plexpass membership listed here""" + two_factor_enabled: NotRequired[bool] + r"""If two-factor authentication is enabled""" + + +class GetUserDetailsUserPlexAccount(BaseModel): + r"""Logged in user details""" + + ads_consent: Annotated[Nullable[bool], pydantic.Field(alias="adsConsent")] + r"""Unknown""" + + ads_consent_reminder_at: Annotated[ + Nullable[datetime], pydantic.Field(alias="adsConsentReminderAt") + ] + r"""Unknown""" + + ads_consent_set_at: Annotated[ + Nullable[datetime], pydantic.Field(alias="adsConsentSetAt") + ] + r"""Unknown""" + + auth_token: Annotated[str, pydantic.Field(alias="authToken")] + r"""The account token""" + + country: str + r"""The account country""" + + email: str + r"""The account email address""" + + friendly_name: Annotated[str, pydantic.Field(alias="friendlyName")] + r"""Your account full name""" + + entitlements: List[str] + r"""List of devices your allowed to use with this account""" + + home_size: Annotated[int, pydantic.Field(alias="homeSize")] + r"""The number of accounts in the Plex Home""" + + id: int + r"""The Plex account ID""" + + joined_at: Annotated[int, pydantic.Field(alias="joinedAt")] + r"""Unix epoch datetime""" + + locale: Nullable[str] + r"""The account locale""" + + mailing_list_status: Annotated[ + MailingListStatus, pydantic.Field(alias="mailingListStatus") + ] + r"""Your current mailing list status""" + + max_home_size: Annotated[int, pydantic.Field(alias="maxHomeSize")] + r"""The maximum number of accounts allowed in the Plex Home""" + + profile: UserProfile + + remember_expires_at: Annotated[int, pydantic.Field(alias="rememberExpiresAt")] + r"""Unix epoch datetime""" + + scrobble_types: Annotated[str, pydantic.Field(alias="scrobbleTypes")] + r"""Unknown""" + + services: List[Services] + + subscription: Subscription + r"""If the account’s Plex Pass subscription is active""" + + subscription_description: Annotated[ + Nullable[str], pydantic.Field(alias="subscriptionDescription") + ] + r"""Description of the Plex Pass subscription""" + + subscriptions: List[GetUserDetailsSubscription] + + thumb: str + r"""URL of the account thumbnail""" + + title: str + r"""The title of the account (username or friendly name)""" + + username: str + r"""The account username""" + + uuid: str + r"""The account UUID""" + + anonymous: OptionalNullable[bool] = False + r"""Unknown""" + + backup_codes_created: Annotated[ + Optional[bool], pydantic.Field(alias="backupCodesCreated") + ] = False + r"""If the two-factor authentication backup codes have been created""" + + confirmed: Optional[bool] = False + r"""If the account has been confirmed""" + + email_only_auth: Annotated[ + Optional[bool], pydantic.Field(alias="emailOnlyAuth") + ] = False + r"""If login with email only is enabled""" + + experimental_features: Annotated[ + Optional[bool], pydantic.Field(alias="experimentalFeatures") + ] = False + r"""If experimental features are enabled""" + + guest: Optional[bool] = False + r"""If the account is a Plex Home guest user""" + + has_password: Annotated[Optional[bool], pydantic.Field(alias="hasPassword")] = True + r"""If the account has a password""" + + home: Optional[bool] = False + r"""If the account is a Plex Home user""" + + home_admin: Annotated[Optional[bool], pydantic.Field(alias="homeAdmin")] = False + r"""If the account is the Plex Home admin""" + + mailing_list_active: Annotated[ + Optional[bool], pydantic.Field(alias="mailingListActive") + ] = False + r"""If you are subscribed to the Plex newsletter""" + + pin: Annotated[ + Optional[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = None + r"""[Might be removed] The hashed Plex Home PIN""" + + protected: Optional[bool] = False + r"""If the account has a Plex Home PIN enabled""" + + restricted: Optional[bool] = False + r"""If the account is a Plex Home managed user""" + + roles: Optional[List[str]] = None + r"""[Might be removed] List of account roles. Plexpass membership listed here""" + + two_factor_enabled: Annotated[ + Optional[bool], pydantic.Field(alias="twoFactorEnabled") + ] = False + r"""If two-factor authentication is enabled""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "anonymous", + "backupCodesCreated", + "confirmed", + "emailOnlyAuth", + "experimentalFeatures", + "guest", + "hasPassword", + "home", + "homeAdmin", + "mailingListActive", + "pin", + "protected", + "restricted", + "roles", + "twoFactorEnabled", + ] + nullable_fields = [ + "adsConsent", + "adsConsentReminderAt", + "adsConsentSetAt", + "locale", + "subscriptionDescription", + "anonymous", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetUserDetailsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + user_plex_account: NotRequired[GetUserDetailsUserPlexAccountTypedDict] + r"""Logged in user details""" + + +class GetUserDetailsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + user_plex_account: Optional[GetUserDetailsUserPlexAccount] = None + r"""Logged in user details""" diff --git a/src/plex_api_client/models/operations/getuserfriends.py b/src/plex_api_client/models/operations/getuserfriends.py new file mode 100644 index 0000000..d8eed27 --- /dev/null +++ b/src/plex_api_client/models/operations/getuserfriends.py @@ -0,0 +1,156 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +GET_USER_FRIENDS_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class SharedServersTypedDict(TypedDict): + pass + + +class SharedServers(BaseModel): + pass + + +class SharedSourcesTypedDict(TypedDict): + pass + + +class SharedSources(BaseModel): + pass + + +class Status(str, Enum): + r"""Current friend request status""" + + ACCEPTED = "accepted" + + +class FriendTypedDict(TypedDict): + email: str + r"""The account email address""" + friendly_name: Nullable[str] + r"""The account full name""" + home: bool + r"""If the account is a Plex Home user""" + id: int + r"""The Plex account ID""" + shared_servers: List[SharedServersTypedDict] + shared_sources: List[SharedSourcesTypedDict] + status: Status + r"""Current friend request status""" + thumb: str + r"""URL of the account thumbnail""" + title: str + r"""The title of the account (username or friendly name)""" + username: str + r"""The account username""" + uuid: str + r"""The account Universally Unique Identifier (UUID)""" + restricted: NotRequired[bool] + r"""If the account is a Plex Home managed user""" + + +class Friend(BaseModel): + email: str + r"""The account email address""" + + friendly_name: Annotated[Nullable[str], pydantic.Field(alias="friendlyName")] + r"""The account full name""" + + home: bool + r"""If the account is a Plex Home user""" + + id: int + r"""The Plex account ID""" + + shared_servers: Annotated[ + List[SharedServers], pydantic.Field(alias="sharedServers") + ] + + shared_sources: Annotated[ + List[SharedSources], pydantic.Field(alias="sharedSources") + ] + + status: Status + r"""Current friend request status""" + + thumb: str + r"""URL of the account thumbnail""" + + title: str + r"""The title of the account (username or friendly name)""" + + username: str + r"""The account username""" + + uuid: str + r"""The account Universally Unique Identifier (UUID)""" + + restricted: Optional[bool] = False + r"""If the account is a Plex Home managed user""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["restricted"] + nullable_fields = ["friendlyName"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class GetUserFriendsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + friends: NotRequired[List[FriendTypedDict]] + r"""Friends Data""" + + +class GetUserFriendsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + friends: Optional[List[Friend]] = None + r"""Friends Data""" diff --git a/src/plex_api_client/models/operations/logline.py b/src/plex_api_client/models/operations/logline.py new file mode 100644 index 0000000..111eefa --- /dev/null +++ b/src/plex_api_client/models/operations/logline.py @@ -0,0 +1,86 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class Level(int, Enum): + r"""An integer log level to write to the PMS log with. + 0: Error + 1: Warning + 2: Info + 3: Debug + 4: Verbose + + """ + + ZERO = 0 + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + + +class LogLineRequestTypedDict(TypedDict): + level: Level + r"""An integer log level to write to the PMS log with. + 0: Error + 1: Warning + 2: Info + 3: Debug + 4: Verbose + + """ + message: str + r"""The text of the message to write to the log.""" + source: str + r"""a string indicating the source of the message.""" + + +class LogLineRequest(BaseModel): + level: Annotated[ + Level, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""An integer log level to write to the PMS log with. + 0: Error + 1: Warning + 2: Info + 3: Debug + 4: Verbose + + """ + + message: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The text of the message to write to the log.""" + + source: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""a string indicating the source of the message.""" + + +class LogLineResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogLineResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/logmultiline.py b/src/plex_api_client/models/operations/logmultiline.py new file mode 100644 index 0000000..fa650fe --- /dev/null +++ b/src/plex_api_client/models/operations/logmultiline.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from typing import TypedDict + + +class LogMultiLineResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class LogMultiLineResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/markplayed.py b/src/plex_api_client/models/operations/markplayed.py new file mode 100644 index 0000000..c217852 --- /dev/null +++ b/src/plex_api_client/models/operations/markplayed.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class MarkPlayedRequestTypedDict(TypedDict): + key: float + r"""The media key to mark as played""" + + +class MarkPlayedRequest(BaseModel): + key: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The media key to mark as played""" + + +class MarkPlayedResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkPlayedResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/markunplayed.py b/src/plex_api_client/models/operations/markunplayed.py new file mode 100644 index 0000000..7fafa8b --- /dev/null +++ b/src/plex_api_client/models/operations/markunplayed.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class MarkUnplayedRequestTypedDict(TypedDict): + key: float + r"""The media key to mark as Unplayed""" + + +class MarkUnplayedRequest(BaseModel): + key: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The media key to mark as Unplayed""" + + +class MarkUnplayedResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class MarkUnplayedResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/performsearch.py b/src/plex_api_client/models/operations/performsearch.py new file mode 100644 index 0000000..d9363bf --- /dev/null +++ b/src/plex_api_client/models/operations/performsearch.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PerformSearchRequestTypedDict(TypedDict): + query: str + r"""The query term""" + section_id: NotRequired[float] + r"""This gives context to the search, and can result in re-ordering of search result hubs""" + limit: NotRequired[float] + r"""The number of items to return per hub""" + + +class PerformSearchRequest(BaseModel): + query: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The query term""" + + section_id: Annotated[ + Optional[float], + pydantic.Field(alias="sectionId"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""This gives context to the search, and can result in re-ordering of search result hubs""" + + limit: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 3 + r"""The number of items to return per hub""" + + +class PerformSearchResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformSearchResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/performvoicesearch.py b/src/plex_api_client/models/operations/performvoicesearch.py new file mode 100644 index 0000000..c504574 --- /dev/null +++ b/src/plex_api_client/models/operations/performvoicesearch.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class PerformVoiceSearchRequestTypedDict(TypedDict): + query: str + r"""The query term""" + section_id: NotRequired[float] + r"""This gives context to the search, and can result in re-ordering of search result hubs""" + limit: NotRequired[float] + r"""The number of items to return per hub""" + + +class PerformVoiceSearchRequest(BaseModel): + query: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The query term""" + + section_id: Annotated[ + Optional[float], + pydantic.Field(alias="sectionId"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""This gives context to the search, and can result in re-ordering of search result hubs""" + + limit: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 3 + r"""The number of items to return per hub""" + + +class PerformVoiceSearchResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class PerformVoiceSearchResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" 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 new file mode 100644 index 0000000..b68f9ac --- /dev/null +++ b/src/plex_api_client/models/operations/post_users_sign_in_data.py @@ -0,0 +1,1058 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +import httpx +from plex_api_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from plex_api_client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import List, Optional, TypedDict +from typing_extensions import Annotated, NotRequired + +POST_USERS_SIGN_IN_DATA_SERVERS = [ + "https://plex.tv/api/v2/", +] + + +class PostUsersSignInDataGlobalsTypedDict(TypedDict): + x_plex_client_identifier: 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 PostUsersSignInDataGlobals(BaseModel): + x_plex_client_identifier: 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 PostUsersSignInDataRequestBodyTypedDict(TypedDict): + r"""Login credentials""" + + login: str + password: str + remember_me: NotRequired[bool] + verification_code: NotRequired[str] + + +class PostUsersSignInDataRequestBody(BaseModel): + r"""Login credentials""" + + login: Annotated[str, FieldMetadata(form=True)] + + password: Annotated[str, FieldMetadata(form=True)] + + remember_me: Annotated[ + Optional[bool], pydantic.Field(alias="rememberMe"), FieldMetadata(form=True) + ] = False + + verification_code: Annotated[ + Optional[str], + pydantic.Field(alias="verificationCode"), + FieldMetadata(form=True), + ] = None + + +class PostUsersSignInDataRequestTypedDict(TypedDict): + x_plex_client_identifier: 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) + + """ + request_body: NotRequired[PostUsersSignInDataRequestBodyTypedDict] + r"""Login credentials""" + + +class PostUsersSignInDataRequest(BaseModel): + x_plex_client_identifier: 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) + + """ + + request_body: Annotated[ + Optional[PostUsersSignInDataRequestBody], + FieldMetadata( + request=RequestMetadata(media_type="application/x-www-form-urlencoded") + ), + ] = None + r"""Login credentials""" + + +class PostUsersSignInDataMailingListStatus(str, Enum): + r"""Your current mailing list status""" + + ACTIVE = "active" + UNSUBSCRIBED = "unsubscribed" + + +class PostUsersSignInDataAutoSelectSubtitle(str, Enum): + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + + ZERO = "0" + ONE = "1" + + +class PostUsersSignInDataDefaultSubtitleAccessibility(str, Enum): + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + + ZERO = "0" + ONE = "1" + + +class PostUsersSignInDataDefaultSubtitleForced(str, Enum): + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + + ZERO = "0" + ONE = "1" + + +class PostUsersSignInDataWatchedIndicator(str, Enum): + ZERO = "0" + ONE = "1" + + +class PostUsersSignInDataMediaReviewsVisibility(int, Enum): + ZERO = 0 + ONE = 1 + + +class PostUsersSignInDataUserProfileTypedDict(TypedDict): + default_audio_language: Nullable[str] + r"""The preferred audio language for the account""" + default_subtitle_language: Nullable[str] + r"""The preferred subtitle language for the account""" + auto_select_audio: NotRequired[bool] + r"""If the account has automatically select audio and subtitle tracks enabled""" + auto_select_subtitle: NotRequired[PostUsersSignInDataAutoSelectSubtitle] + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + default_subtitle_accessibility: NotRequired[ + PostUsersSignInDataDefaultSubtitleAccessibility + ] + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + default_subtitle_forced: NotRequired[PostUsersSignInDataDefaultSubtitleForced] + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + watched_indicator: NotRequired[PostUsersSignInDataWatchedIndicator] + media_reviews_visibility: NotRequired[PostUsersSignInDataMediaReviewsVisibility] + + +class PostUsersSignInDataUserProfile(BaseModel): + default_audio_language: Annotated[ + Nullable[str], pydantic.Field(alias="defaultAudioLanguage") + ] + r"""The preferred audio language for the account""" + + default_subtitle_language: Annotated[ + Nullable[str], pydantic.Field(alias="defaultSubtitleLanguage") + ] + r"""The preferred subtitle language for the account""" + + auto_select_audio: Annotated[ + Optional[bool], pydantic.Field(alias="autoSelectAudio") + ] = True + r"""If the account has automatically select audio and subtitle tracks enabled""" + + auto_select_subtitle: Annotated[ + Optional[PostUsersSignInDataAutoSelectSubtitle], + pydantic.Field(alias="autoSelectSubtitle"), + ] = None + r"""The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)""" + + default_subtitle_accessibility: Annotated[ + Optional[PostUsersSignInDataDefaultSubtitleAccessibility], + pydantic.Field(alias="defaultSubtitleAccessibility"), + ] = None + r"""The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)""" + + default_subtitle_forced: Annotated[ + Optional[PostUsersSignInDataDefaultSubtitleForced], + pydantic.Field(alias="defaultSubtitleForced"), + ] = None + r"""The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)""" + + watched_indicator: Annotated[ + Optional[PostUsersSignInDataWatchedIndicator], + pydantic.Field(alias="watchedIndicator"), + ] = None + + media_reviews_visibility: Annotated[ + Optional[PostUsersSignInDataMediaReviewsVisibility], + pydantic.Field(alias="mediaReviewsVisibility"), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "autoSelectAudio", + "autoSelectSubtitle", + "defaultSubtitleAccessibility", + "defaultSubtitleForced", + "watchedIndicator", + "mediaReviewsVisibility", + ] + nullable_fields = ["defaultAudioLanguage", "defaultSubtitleLanguage"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostUsersSignInDataStatus(str, Enum): + ONLINE = "online" + OFFLINE = "offline" + + +class PostUsersSignInDataServicesTypedDict(TypedDict): + identifier: str + endpoint: str + token: Nullable[str] + secret: Nullable[str] + status: PostUsersSignInDataStatus + + +class PostUsersSignInDataServices(BaseModel): + identifier: str + + endpoint: str + + token: Nullable[str] + + secret: Nullable[str] + + status: PostUsersSignInDataStatus + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["token", "secret"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostUsersSignInDataFeatures(str, Enum): + ANDROID_DOLBY_VISION = "Android - Dolby Vision" + ANDROID_PI_P = "Android - PiP" + CU_SUNSET = "CU Sunset" + HRK_ENABLE_EUR = "HRK_enable_EUR" + TREBLE_SHOW_FEATURES = "TREBLE-show-features" + AD_COUNTDOWN_TIMER = "ad-countdown-timer" + ADAPTIVE_BITRATE = "adaptive_bitrate" + AMAZON_LOOP_DEBUG = "amazon-loop-debug" + AVOD_AD_ANALYSIS = "avod-ad-analysis" + AVOD_NEW_MEDIA = "avod-new-media" + BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + CLIENT_RADIO_STATIONS = "client-radio-stations" + CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + COLLECTIONS = "collections" + COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" + COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" + COMPANIONS_SONOS = "companions_sonos" + CUSTOM_HOME_REMOVAL = "custom-home-removal" + DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" + DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DRM_SUPPORT = "drm_support" + EXCLUDE_RESTRICTIONS = "exclude restrictions" + FEDERATED_AUTH = "federated-auth" + FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GUIDED_UPGRADE = "guided-upgrade" + HOME = "home" + INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" + IOS14_PRIVACY_BANNER = "ios14-privacy-banner" + ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + KEEP_PAYMENT_METHOD = "keep-payment-method" + KEVIN_BACON = "kevin-bacon" + KOREA_CONSENT = "korea-consent" + LE_ISRG_ROOT_X1 = "le_isrg_root_x1" + LETS_ENCRYPT = "lets_encrypt" + LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" + LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" + LIVETV = "livetv" + METADATA_SEARCH = "metadata_search" + NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" + NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + PHOTOS_FAVORITES = "photos-favorites" + PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PMS_HEALTH = "pms_health" + RADIO = "radio" + RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" + SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SHARED_SERVER_NOTIFICATION = "shared_server_notification" + SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_WITH_APPLE = "signin_with_apple" + SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + TRANSCODER_CACHE = "transcoder_cache" + TUNER_SHARING = "tuner-sharing" + TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" + UNSUPPORTEDTUNERS = "unsupportedtuners" + UPGRADE_3DS2 = "upgrade-3ds2" + VOD_SCHEMA = "vod-schema" + VOD_CLOUDFLARE = "vod_cloudflare" + WATCH_TOGETHER_INVITE = "watch-together-invite" + WEB_SERVER_DASHBOARD = "web_server_dashboard" + + +class PostUsersSignInDataAuthenticationStatus(str, Enum): + r"""String representation of subscriptionActive""" + + INACTIVE = "Inactive" + ACTIVE = "Active" + + +class PostUsersSignInDataSubscriptionTypedDict(TypedDict): + r"""If the account’s Plex Pass subscription is active""" + + features: NotRequired[List[PostUsersSignInDataFeatures]] + r"""List of features allowed on your Plex Pass subscription""" + active: NotRequired[bool] + r"""If the account's Plex Pass subscription is active""" + subscribed_at: NotRequired[Nullable[str]] + r"""Date the account subscribed to Plex Pass""" + status: NotRequired[PostUsersSignInDataAuthenticationStatus] + r"""String representation of subscriptionActive""" + payment_service: NotRequired[Nullable[str]] + r"""Payment service used for your Plex Pass subscription""" + plan: NotRequired[Nullable[str]] + r"""Name of Plex Pass subscription plan""" + + +class PostUsersSignInDataSubscription(BaseModel): + r"""If the account’s Plex Pass subscription is active""" + + features: Optional[List[PostUsersSignInDataFeatures]] = None + r"""List of features allowed on your Plex Pass subscription""" + + active: Optional[bool] = None + r"""If the account's Plex Pass subscription is active""" + + subscribed_at: Annotated[ + OptionalNullable[str], pydantic.Field(alias="subscribedAt") + ] = UNSET + r"""Date the account subscribed to Plex Pass""" + + status: Optional[PostUsersSignInDataAuthenticationStatus] = None + r"""String representation of subscriptionActive""" + + payment_service: Annotated[ + OptionalNullable[str], pydantic.Field(alias="paymentService") + ] = UNSET + r"""Payment service used for your Plex Pass subscription""" + + plan: OptionalNullable[str] = UNSET + r"""Name of Plex Pass subscription plan""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "features", + "active", + "subscribedAt", + "status", + "paymentService", + "plan", + ] + nullable_fields = ["subscribedAt", "paymentService", "plan"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostUsersSignInDataAuthenticationFeatures(str, Enum): + ANDROID_DOLBY_VISION = "Android - Dolby Vision" + ANDROID_PI_P = "Android - PiP" + CU_SUNSET = "CU Sunset" + HRK_ENABLE_EUR = "HRK_enable_EUR" + TREBLE_SHOW_FEATURES = "TREBLE-show-features" + AD_COUNTDOWN_TIMER = "ad-countdown-timer" + ADAPTIVE_BITRATE = "adaptive_bitrate" + AMAZON_LOOP_DEBUG = "amazon-loop-debug" + AVOD_AD_ANALYSIS = "avod-ad-analysis" + AVOD_NEW_MEDIA = "avod-new-media" + BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + CLIENT_RADIO_STATIONS = "client-radio-stations" + CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + COLLECTIONS = "collections" + COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" + COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" + COMPANIONS_SONOS = "companions_sonos" + CUSTOM_HOME_REMOVAL = "custom-home-removal" + DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" + DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DRM_SUPPORT = "drm_support" + EXCLUDE_RESTRICTIONS = "exclude restrictions" + FEDERATED_AUTH = "federated-auth" + FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GUIDED_UPGRADE = "guided-upgrade" + HOME = "home" + INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" + IOS14_PRIVACY_BANNER = "ios14-privacy-banner" + ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + KEEP_PAYMENT_METHOD = "keep-payment-method" + KEVIN_BACON = "kevin-bacon" + KOREA_CONSENT = "korea-consent" + LE_ISRG_ROOT_X1 = "le_isrg_root_x1" + LETS_ENCRYPT = "lets_encrypt" + LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" + LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" + LIVETV = "livetv" + METADATA_SEARCH = "metadata_search" + NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" + NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + PHOTOS_FAVORITES = "photos-favorites" + PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PMS_HEALTH = "pms_health" + RADIO = "radio" + RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" + SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SHARED_SERVER_NOTIFICATION = "shared_server_notification" + SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_WITH_APPLE = "signin_with_apple" + SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + TRANSCODER_CACHE = "transcoder_cache" + TUNER_SHARING = "tuner-sharing" + TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" + UNSUPPORTEDTUNERS = "unsupportedtuners" + UPGRADE_3DS2 = "upgrade-3ds2" + VOD_SCHEMA = "vod-schema" + VOD_CLOUDFLARE = "vod_cloudflare" + WATCH_TOGETHER_INVITE = "watch-together-invite" + WEB_SERVER_DASHBOARD = "web_server_dashboard" + + +class PostUsersSignInDataAuthenticationResponseStatus(str, Enum): + r"""String representation of subscriptionActive""" + + INACTIVE = "Inactive" + ACTIVE = "Active" + + +class PostUsersSignInDataAuthenticationSubscriptionTypedDict(TypedDict): + features: NotRequired[List[PostUsersSignInDataAuthenticationFeatures]] + r"""List of features allowed on your Plex Pass subscription""" + active: NotRequired[bool] + r"""If the account's Plex Pass subscription is active""" + subscribed_at: NotRequired[Nullable[str]] + r"""Date the account subscribed to Plex Pass""" + status: NotRequired[PostUsersSignInDataAuthenticationResponseStatus] + r"""String representation of subscriptionActive""" + payment_service: NotRequired[Nullable[str]] + r"""Payment service used for your Plex Pass subscription""" + plan: NotRequired[Nullable[str]] + r"""Name of Plex Pass subscription plan""" + + +class PostUsersSignInDataAuthenticationSubscription(BaseModel): + features: Optional[List[PostUsersSignInDataAuthenticationFeatures]] = None + r"""List of features allowed on your Plex Pass subscription""" + + active: Optional[bool] = None + r"""If the account's Plex Pass subscription is active""" + + subscribed_at: Annotated[ + OptionalNullable[str], pydantic.Field(alias="subscribedAt") + ] = UNSET + r"""Date the account subscribed to Plex Pass""" + + status: Optional[PostUsersSignInDataAuthenticationResponseStatus] = None + r"""String representation of subscriptionActive""" + + payment_service: Annotated[ + OptionalNullable[str], pydantic.Field(alias="paymentService") + ] = UNSET + r"""Payment service used for your Plex Pass subscription""" + + plan: OptionalNullable[str] = UNSET + r"""Name of Plex Pass subscription plan""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "features", + "active", + "subscribedAt", + "status", + "paymentService", + "plan", + ] + nullable_fields = ["subscribedAt", "paymentService", "plan"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostUsersSignInDataState(str, Enum): + ENDED = "ended" + + +class InternalPaymentMethodTypedDict(TypedDict): + pass + + +class InternalPaymentMethod(BaseModel): + pass + + +class BillingTypedDict(TypedDict): + internal_payment_method: InternalPaymentMethodTypedDict + payment_method_id: Nullable[int] + + +class Billing(BaseModel): + internal_payment_method: Annotated[ + InternalPaymentMethod, pydantic.Field(alias="internalPaymentMethod") + ] + + payment_method_id: Annotated[Nullable[int], pydantic.Field(alias="paymentMethodId")] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["paymentMethodId"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PastSubscriptionTypedDict(TypedDict): + id: Nullable[str] + mode: Nullable[str] + renews_at: Nullable[int] + ends_at: Nullable[int] + type: str + transfer: Nullable[str] + state: PostUsersSignInDataState + billing: BillingTypedDict + canceled: NotRequired[bool] + grace_period: NotRequired[bool] + on_hold: NotRequired[bool] + can_reactivate: NotRequired[bool] + can_upgrade: NotRequired[bool] + can_downgrade: NotRequired[bool] + can_convert: NotRequired[bool] + + +class PastSubscription(BaseModel): + id: Nullable[str] + + mode: Nullable[str] + + renews_at: Annotated[Nullable[int], pydantic.Field(alias="renewsAt")] + + ends_at: Annotated[Nullable[int], pydantic.Field(alias="endsAt")] + + type: str + + transfer: Nullable[str] + + state: PostUsersSignInDataState + + billing: Billing + + canceled: Optional[bool] = False + + grace_period: Annotated[Optional[bool], pydantic.Field(alias="gracePeriod")] = False + + on_hold: Annotated[Optional[bool], pydantic.Field(alias="onHold")] = False + + can_reactivate: Annotated[Optional[bool], pydantic.Field(alias="canReactivate")] = ( + False + ) + + can_upgrade: Annotated[Optional[bool], pydantic.Field(alias="canUpgrade")] = False + + can_downgrade: Annotated[Optional[bool], pydantic.Field(alias="canDowngrade")] = ( + False + ) + + can_convert: Annotated[Optional[bool], pydantic.Field(alias="canConvert")] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "canceled", + "gracePeriod", + "onHold", + "canReactivate", + "canUpgrade", + "canDowngrade", + "canConvert", + ] + nullable_fields = ["id", "mode", "renewsAt", "endsAt", "transfer"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class TrialsTypedDict(TypedDict): + pass + + +class Trials(BaseModel): + pass + + +class PostUsersSignInDataUserPlexAccountTypedDict(TypedDict): + r"""Returns the user account data with a valid auth token""" + + ads_consent: Nullable[bool] + r"""Unknown""" + ads_consent_reminder_at: Nullable[datetime] + r"""Unknown""" + ads_consent_set_at: Nullable[datetime] + r"""Unknown""" + auth_token: str + r"""The account token""" + country: str + r"""The account country""" + email: str + r"""The account email address""" + friendly_name: str + r"""Your account full name""" + entitlements: List[str] + r"""List of devices your allowed to use with this account""" + home_size: int + r"""The number of accounts in the Plex Home""" + id: int + r"""The Plex account ID""" + joined_at: int + r"""Unix epoch datetime""" + locale: Nullable[str] + r"""The account locale""" + mailing_list_status: PostUsersSignInDataMailingListStatus + r"""Your current mailing list status""" + max_home_size: int + r"""The maximum number of accounts allowed in the Plex Home""" + profile: PostUsersSignInDataUserProfileTypedDict + remember_expires_at: int + r"""Unix epoch datetime""" + scrobble_types: str + r"""Unknown""" + services: List[PostUsersSignInDataServicesTypedDict] + subscription: PostUsersSignInDataSubscriptionTypedDict + r"""If the account’s Plex Pass subscription is active""" + subscription_description: Nullable[str] + r"""Description of the Plex Pass subscription""" + subscriptions: List[PostUsersSignInDataAuthenticationSubscriptionTypedDict] + thumb: str + r"""URL of the account thumbnail""" + title: str + r"""The title of the account (username or friendly name)""" + username: str + r"""The account username""" + uuid: str + r"""The account UUID""" + past_subscriptions: List[PastSubscriptionTypedDict] + trials: List[TrialsTypedDict] + anonymous: NotRequired[Nullable[bool]] + r"""Unknown""" + backup_codes_created: NotRequired[bool] + r"""If the two-factor authentication backup codes have been created""" + confirmed: NotRequired[bool] + r"""If the account has been confirmed""" + email_only_auth: NotRequired[bool] + r"""If login with email only is enabled""" + experimental_features: NotRequired[bool] + r"""If experimental features are enabled""" + guest: NotRequired[bool] + r"""If the account is a Plex Home guest user""" + has_password: NotRequired[bool] + r"""If the account has a password""" + home: NotRequired[bool] + r"""If the account is a Plex Home user""" + home_admin: NotRequired[bool] + r"""If the account is the Plex Home admin""" + mailing_list_active: NotRequired[bool] + r"""If you are subscribed to the Plex newsletter""" + pin: NotRequired[str] + r"""[Might be removed] The hashed Plex Home PIN""" + protected: NotRequired[bool] + r"""If the account has a Plex Home PIN enabled""" + restricted: NotRequired[bool] + r"""If the account is a Plex Home managed user""" + roles: NotRequired[List[str]] + r"""[Might be removed] List of account roles. Plexpass membership listed here""" + two_factor_enabled: NotRequired[bool] + r"""If two-factor authentication is enabled""" + + +class PostUsersSignInDataUserPlexAccount(BaseModel): + r"""Returns the user account data with a valid auth token""" + + ads_consent: Annotated[Nullable[bool], pydantic.Field(alias="adsConsent")] + r"""Unknown""" + + ads_consent_reminder_at: Annotated[ + Nullable[datetime], pydantic.Field(alias="adsConsentReminderAt") + ] + r"""Unknown""" + + ads_consent_set_at: Annotated[ + Nullable[datetime], pydantic.Field(alias="adsConsentSetAt") + ] + r"""Unknown""" + + auth_token: Annotated[str, pydantic.Field(alias="authToken")] + r"""The account token""" + + country: str + r"""The account country""" + + email: str + r"""The account email address""" + + friendly_name: Annotated[str, pydantic.Field(alias="friendlyName")] + r"""Your account full name""" + + entitlements: List[str] + r"""List of devices your allowed to use with this account""" + + home_size: Annotated[int, pydantic.Field(alias="homeSize")] + r"""The number of accounts in the Plex Home""" + + id: int + r"""The Plex account ID""" + + joined_at: Annotated[int, pydantic.Field(alias="joinedAt")] + r"""Unix epoch datetime""" + + locale: Nullable[str] + r"""The account locale""" + + mailing_list_status: Annotated[ + PostUsersSignInDataMailingListStatus, pydantic.Field(alias="mailingListStatus") + ] + r"""Your current mailing list status""" + + max_home_size: Annotated[int, pydantic.Field(alias="maxHomeSize")] + r"""The maximum number of accounts allowed in the Plex Home""" + + profile: PostUsersSignInDataUserProfile + + remember_expires_at: Annotated[int, pydantic.Field(alias="rememberExpiresAt")] + r"""Unix epoch datetime""" + + scrobble_types: Annotated[str, pydantic.Field(alias="scrobbleTypes")] + r"""Unknown""" + + services: List[PostUsersSignInDataServices] + + subscription: PostUsersSignInDataSubscription + r"""If the account’s Plex Pass subscription is active""" + + subscription_description: Annotated[ + Nullable[str], pydantic.Field(alias="subscriptionDescription") + ] + r"""Description of the Plex Pass subscription""" + + subscriptions: List[PostUsersSignInDataAuthenticationSubscription] + + thumb: str + r"""URL of the account thumbnail""" + + title: str + r"""The title of the account (username or friendly name)""" + + username: str + r"""The account username""" + + uuid: str + r"""The account UUID""" + + past_subscriptions: Annotated[ + List[PastSubscription], pydantic.Field(alias="pastSubscriptions") + ] + + trials: List[Trials] + + anonymous: OptionalNullable[bool] = False + r"""Unknown""" + + backup_codes_created: Annotated[ + Optional[bool], pydantic.Field(alias="backupCodesCreated") + ] = False + r"""If the two-factor authentication backup codes have been created""" + + confirmed: Optional[bool] = False + r"""If the account has been confirmed""" + + email_only_auth: Annotated[ + Optional[bool], pydantic.Field(alias="emailOnlyAuth") + ] = False + r"""If login with email only is enabled""" + + experimental_features: Annotated[ + Optional[bool], pydantic.Field(alias="experimentalFeatures") + ] = False + r"""If experimental features are enabled""" + + guest: Optional[bool] = False + r"""If the account is a Plex Home guest user""" + + has_password: Annotated[Optional[bool], pydantic.Field(alias="hasPassword")] = True + r"""If the account has a password""" + + home: Optional[bool] = False + r"""If the account is a Plex Home user""" + + home_admin: Annotated[Optional[bool], pydantic.Field(alias="homeAdmin")] = False + r"""If the account is the Plex Home admin""" + + mailing_list_active: Annotated[ + Optional[bool], pydantic.Field(alias="mailingListActive") + ] = False + r"""If you are subscribed to the Plex newsletter""" + + pin: Annotated[ + Optional[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = None + r"""[Might be removed] The hashed Plex Home PIN""" + + protected: Optional[bool] = False + r"""If the account has a Plex Home PIN enabled""" + + restricted: Optional[bool] = False + r"""If the account is a Plex Home managed user""" + + roles: Optional[List[str]] = None + r"""[Might be removed] List of account roles. Plexpass membership listed here""" + + two_factor_enabled: Annotated[ + Optional[bool], pydantic.Field(alias="twoFactorEnabled") + ] = False + r"""If two-factor authentication is enabled""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "anonymous", + "backupCodesCreated", + "confirmed", + "emailOnlyAuth", + "experimentalFeatures", + "guest", + "hasPassword", + "home", + "homeAdmin", + "mailingListActive", + "pin", + "protected", + "restricted", + "roles", + "twoFactorEnabled", + ] + nullable_fields = [ + "adsConsent", + "adsConsentReminderAt", + "adsConsentSetAt", + "locale", + "subscriptionDescription", + "anonymous", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostUsersSignInDataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + user_plex_account: NotRequired[PostUsersSignInDataUserPlexAccountTypedDict] + r"""Returns the user account data with a valid auth token""" + + +class PostUsersSignInDataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + user_plex_account: Optional[PostUsersSignInDataUserPlexAccount] = None + r"""Returns the user account data with a valid auth token""" diff --git a/src/plex_api_client/models/operations/startalltasks.py b/src/plex_api_client/models/operations/startalltasks.py new file mode 100644 index 0000000..6513386 --- /dev/null +++ b/src/plex_api_client/models/operations/startalltasks.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from typing import TypedDict + + +class StartAllTasksResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartAllTasksResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/starttask.py b/src/plex_api_client/models/operations/starttask.py new file mode 100644 index 0000000..62d1ea9 --- /dev/null +++ b/src/plex_api_client/models/operations/starttask.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class TaskName(str, Enum): + r"""the name of the task to be started.""" + + BACKUP_DATABASE = "BackupDatabase" + BUILD_GRACENOTE_COLLECTIONS = "BuildGracenoteCollections" + CHECK_FOR_UPDATES = "CheckForUpdates" + CLEAN_OLD_BUNDLES = "CleanOldBundles" + CLEAN_OLD_CACHE_FILES = "CleanOldCacheFiles" + DEEP_MEDIA_ANALYSIS = "DeepMediaAnalysis" + GENERATE_AUTO_TAGS = "GenerateAutoTags" + GENERATE_CHAPTER_THUMBS = "GenerateChapterThumbs" + GENERATE_MEDIA_INDEX_FILES = "GenerateMediaIndexFiles" + OPTIMIZE_DATABASE = "OptimizeDatabase" + REFRESH_LIBRARIES = "RefreshLibraries" + REFRESH_LOCAL_MEDIA = "RefreshLocalMedia" + REFRESH_PERIODIC_METADATA = "RefreshPeriodicMetadata" + UPGRADE_MEDIA_ANALYSIS = "UpgradeMediaAnalysis" + + +class StartTaskRequestTypedDict(TypedDict): + task_name: TaskName + r"""the name of the task to be started.""" + + +class StartTaskRequest(BaseModel): + task_name: Annotated[ + TaskName, + pydantic.Field(alias="taskName"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the name of the task to be started.""" + + +class StartTaskResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartTaskResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/startuniversaltranscode.py b/src/plex_api_client/models/operations/startuniversaltranscode.py new file mode 100644 index 0000000..122716a --- /dev/null +++ b/src/plex_api_client/models/operations/startuniversaltranscode.py @@ -0,0 +1,171 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class StartUniversalTranscodeRequestTypedDict(TypedDict): + has_mde: float + r"""Whether the media item has MDE""" + path: str + r"""The path to the media item to transcode""" + media_index: float + r"""The index of the media item to transcode""" + part_index: float + r"""The index of the part to transcode""" + protocol: str + r"""The protocol to use for the transcode session""" + fast_seek: NotRequired[float] + r"""Whether to use fast seek or not""" + direct_play: NotRequired[float] + r"""Whether to use direct play or not""" + direct_stream: NotRequired[float] + r"""Whether to use direct stream or not""" + subtitle_size: NotRequired[float] + r"""The size of the subtitles""" + subtites: NotRequired[str] + r"""The subtitles""" + audio_boost: NotRequired[float] + r"""The audio boost""" + location: NotRequired[str] + r"""The location of the transcode session""" + media_buffer_size: NotRequired[float] + r"""The size of the media buffer""" + session: NotRequired[str] + r"""The session ID""" + add_debug_overlay: NotRequired[float] + r"""Whether to add a debug overlay or not""" + auto_adjust_quality: NotRequired[float] + r"""Whether to auto adjust quality or not""" + + +class StartUniversalTranscodeRequest(BaseModel): + has_mde: Annotated[ + float, + pydantic.Field(alias="hasMDE"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Whether the media item has MDE""" + + path: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The path to the media item to transcode""" + + media_index: Annotated[ + float, + pydantic.Field(alias="mediaIndex"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The index of the media item to transcode""" + + part_index: Annotated[ + float, + pydantic.Field(alias="partIndex"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""The index of the part to transcode""" + + protocol: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The protocol to use for the transcode session""" + + fast_seek: Annotated[ + Optional[float], + pydantic.Field(alias="fastSeek"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to use fast seek or not""" + + direct_play: Annotated[ + Optional[float], + pydantic.Field(alias="directPlay"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to use direct play or not""" + + direct_stream: Annotated[ + Optional[float], + pydantic.Field(alias="directStream"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to use direct stream or not""" + + subtitle_size: Annotated[ + Optional[float], + pydantic.Field(alias="subtitleSize"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The size of the subtitles""" + + subtites: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The subtitles""" + + audio_boost: Annotated[ + Optional[float], + pydantic.Field(alias="audioBoost"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The audio boost""" + + location: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The location of the transcode session""" + + media_buffer_size: Annotated[ + Optional[float], + pydantic.Field(alias="mediaBufferSize"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The size of the media buffer""" + + session: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The session ID""" + + add_debug_overlay: Annotated[ + Optional[float], + pydantic.Field(alias="addDebugOverlay"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to add a debug overlay or not""" + + auto_adjust_quality: Annotated[ + Optional[float], + pydantic.Field(alias="autoAdjustQuality"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to auto adjust quality or not""" + + +class StartUniversalTranscodeResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StartUniversalTranscodeResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/stopalltasks.py b/src/plex_api_client/models/operations/stopalltasks.py new file mode 100644 index 0000000..aaf29b5 --- /dev/null +++ b/src/plex_api_client/models/operations/stopalltasks.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from typing import TypedDict + + +class StopAllTasksResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopAllTasksResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/stoptask.py b/src/plex_api_client/models/operations/stoptask.py new file mode 100644 index 0000000..94aa426 --- /dev/null +++ b/src/plex_api_client/models/operations/stoptask.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class PathParamTaskName(str, Enum): + r"""The name of the task to be started.""" + + BACKUP_DATABASE = "BackupDatabase" + BUILD_GRACENOTE_COLLECTIONS = "BuildGracenoteCollections" + CHECK_FOR_UPDATES = "CheckForUpdates" + CLEAN_OLD_BUNDLES = "CleanOldBundles" + CLEAN_OLD_CACHE_FILES = "CleanOldCacheFiles" + DEEP_MEDIA_ANALYSIS = "DeepMediaAnalysis" + GENERATE_AUTO_TAGS = "GenerateAutoTags" + GENERATE_CHAPTER_THUMBS = "GenerateChapterThumbs" + GENERATE_MEDIA_INDEX_FILES = "GenerateMediaIndexFiles" + OPTIMIZE_DATABASE = "OptimizeDatabase" + REFRESH_LIBRARIES = "RefreshLibraries" + REFRESH_LOCAL_MEDIA = "RefreshLocalMedia" + REFRESH_PERIODIC_METADATA = "RefreshPeriodicMetadata" + UPGRADE_MEDIA_ANALYSIS = "UpgradeMediaAnalysis" + + +class StopTaskRequestTypedDict(TypedDict): + task_name: PathParamTaskName + r"""The name of the task to be started.""" + + +class StopTaskRequest(BaseModel): + task_name: Annotated[ + PathParamTaskName, + pydantic.Field(alias="taskName"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The name of the task to be started.""" + + +class StopTaskResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTaskResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/stoptranscodesession.py b/src/plex_api_client/models/operations/stoptranscodesession.py new file mode 100644 index 0000000..72dc80a --- /dev/null +++ b/src/plex_api_client/models/operations/stoptranscodesession.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class StopTranscodeSessionRequestTypedDict(TypedDict): + session_key: str + r"""the Key of the transcode session to stop""" + + +class StopTranscodeSessionRequest(BaseModel): + session_key: Annotated[ + str, + pydantic.Field(alias="sessionKey"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the Key of the transcode session to stop""" + + +class StopTranscodeSessionResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class StopTranscodeSessionResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/updateplaylist.py b/src/plex_api_client/models/operations/updateplaylist.py new file mode 100644 index 0000000..ffe1ab7 --- /dev/null +++ b/src/plex_api_client/models/operations/updateplaylist.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class UpdatePlaylistRequestTypedDict(TypedDict): + playlist_id: float + r"""the ID of the playlist""" + title: NotRequired[str] + r"""name of the playlist""" + summary: NotRequired[str] + r"""summary description of the playlist""" + + +class UpdatePlaylistRequest(BaseModel): + playlist_id: Annotated[ + float, + pydantic.Field(alias="playlistID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""the ID of the playlist""" + + title: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""name of the playlist""" + + summary: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""summary description of the playlist""" + + +class UpdatePlaylistResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlaylistResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/updateplayprogress.py b/src/plex_api_client/models/operations/updateplayprogress.py new file mode 100644 index 0000000..32e3a81 --- /dev/null +++ b/src/plex_api_client/models/operations/updateplayprogress.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class UpdatePlayProgressRequestTypedDict(TypedDict): + key: str + r"""the media key""" + time: float + r"""The time, in milliseconds, used to set the media playback progress.""" + state: str + r"""The playback state of the media item.""" + + +class UpdatePlayProgressRequest(BaseModel): + key: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""the media key""" + + time: Annotated[ + float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The time, in milliseconds, used to set the media playback progress.""" + + state: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The playback state of the media item.""" + + +class UpdatePlayProgressResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePlayProgressResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/models/operations/uploadplaylist.py b/src/plex_api_client/models/operations/uploadplaylist.py new file mode 100644 index 0000000..0e86607 --- /dev/null +++ b/src/plex_api_client/models/operations/uploadplaylist.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +from plex_api_client.types import BaseModel +from plex_api_client.utils import FieldMetadata, QueryParamMetadata +from typing import TypedDict +from typing_extensions import Annotated + + +class QueryParamForce(int, Enum): + r"""Force overwriting of duplicate playlists. + By default, a playlist file uploaded with the same path will overwrite the existing playlist. + The `force` argument is used to disable overwriting. + If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + """ + + ZERO = 0 + ONE = 1 + + +class UploadPlaylistRequestTypedDict(TypedDict): + path: str + r"""absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + + """ + force: QueryParamForce + r"""Force overwriting of duplicate playlists. + By default, a playlist file uploaded with the same path will overwrite the existing playlist. + The `force` argument is used to disable overwriting. + If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + """ + + +class UploadPlaylistRequest(BaseModel): + path: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + + """ + + force: Annotated[ + QueryParamForce, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Force overwriting of duplicate playlists. + By default, a playlist file uploaded with the same path will overwrite the existing playlist. + The `force` argument is used to disable overwriting. + If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + """ + + +class UploadPlaylistResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UploadPlaylistResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/plex_api_client/playlists.py b/src/plex_api_client/playlists.py new file mode 100644 index 0000000..4c7cfda --- /dev/null +++ b/src/plex_api_client/playlists.py @@ -0,0 +1,1833 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Playlists(BaseSDK): + r"""Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as \"all albums from 2017\"). + They can be organized in (optionally nesting) folders. + Retrieving a playlist, or its items, will trigger a refresh of its metadata. + This may cause the duration and number of items to change. + + """ + + def create_playlist( + self, + *, + request: Union[ + operations.CreatePlaylistRequest, operations.CreatePlaylistRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CreatePlaylistResponse: + r"""Create a Playlist + + Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: + - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). + - `playQueueID` - To create a playlist from an existing play queue. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.CreatePlaylistRequest) + request = cast(operations.CreatePlaylistRequest, request) + + req = self.build_request( + method="POST", + path="/playlists", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="createPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreatePlaylistResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.CreatePlaylistResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CreatePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.CreatePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CreatePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.CreatePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def create_playlist_async( + self, + *, + request: Union[ + operations.CreatePlaylistRequest, operations.CreatePlaylistRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CreatePlaylistResponse: + r"""Create a Playlist + + Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: + - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). + - `playQueueID` - To create a playlist from an existing play queue. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.CreatePlaylistRequest) + request = cast(operations.CreatePlaylistRequest, request) + + req = self.build_request_async( + method="POST", + path="/playlists", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="createPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreatePlaylistResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.CreatePlaylistResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CreatePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.CreatePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CreatePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.CreatePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_playlists( + self, + *, + playlist_type: Optional[operations.PlaylistType] = None, + smart: Optional[operations.QueryParamSmart] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistsResponse: + r"""Get All Playlists + + Get All Playlists given the specified filters. + + :param playlist_type: limit to a type of playlist. + :param smart: type of playlists to return (default is all). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistsRequest( + playlist_type=playlist_type, + smart=smart, + ) + + req = self.build_request( + method="GET", + path="/playlists", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getPlaylists", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_playlists_async( + self, + *, + playlist_type: Optional[operations.PlaylistType] = None, + smart: Optional[operations.QueryParamSmart] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistsResponse: + r"""Get All Playlists + + Get All Playlists given the specified filters. + + :param playlist_type: limit to a type of playlist. + :param smart: type of playlists to return (default is all). + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistsRequest( + playlist_type=playlist_type, + smart=smart, + ) + + req = self.build_request_async( + method="GET", + path="/playlists", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getPlaylists", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_playlist( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistResponse: + r"""Retrieve Playlist + + Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistRequest( + playlist_id=playlist_id, + ) + + req = self.build_request( + method="GET", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_playlist_async( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistResponse: + r"""Retrieve Playlist + + Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistRequest( + playlist_id=playlist_id, + ) + + req = self.build_request_async( + method="GET", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def delete_playlist( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.DeletePlaylistResponse: + r"""Deletes a Playlist + + This endpoint will delete a playlist + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.DeletePlaylistRequest( + playlist_id=playlist_id, + ) + + req = self.build_request( + method="DELETE", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="deletePlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return operations.DeletePlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeletePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.DeletePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeletePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.DeletePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def delete_playlist_async( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.DeletePlaylistResponse: + r"""Deletes a Playlist + + This endpoint will delete a playlist + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.DeletePlaylistRequest( + playlist_id=playlist_id, + ) + + req = self.build_request_async( + method="DELETE", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="deletePlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return operations.DeletePlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeletePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.DeletePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.DeletePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.DeletePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def update_playlist( + self, + *, + playlist_id: float, + title: Optional[str] = None, + summary: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UpdatePlaylistResponse: + r"""Update a Playlist + + From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + + + :param playlist_id: the ID of the playlist + :param title: name of the playlist + :param summary: summary description of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UpdatePlaylistRequest( + playlist_id=playlist_id, + title=title, + summary=summary, + ) + + req = self.build_request( + method="PUT", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="updatePlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def update_playlist_async( + self, + *, + playlist_id: float, + title: Optional[str] = None, + summary: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UpdatePlaylistResponse: + r"""Update a Playlist + + From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + + + :param playlist_id: the ID of the playlist + :param title: name of the playlist + :param summary: summary description of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UpdatePlaylistRequest( + playlist_id=playlist_id, + title=title, + summary=summary, + ) + + req = self.build_request_async( + method="PUT", + path="/playlists/{playlistID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="updatePlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UpdatePlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.UpdatePlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_playlist_contents( + self, + *, + playlist_id: float, + type_: operations.GetPlaylistContentsQueryParamType, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistContentsResponse: + r"""Retrieve Playlist Contents + + Gets the contents of a playlist. Should be paged by clients via standard mechanisms. + By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. + For example, you could use this to display a list of recently added albums vis a smart playlist. + Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + + + :param playlist_id: the ID of the playlist + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistContentsRequest( + playlist_id=playlist_id, + type=type_, + ) + + req = self.build_request( + method="GET", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistContentsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistContentsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_playlist_contents_async( + self, + *, + playlist_id: float, + type_: operations.GetPlaylistContentsQueryParamType, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPlaylistContentsResponse: + r"""Retrieve Playlist Contents + + Gets the contents of a playlist. Should be paged by clients via standard mechanisms. + By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. + For example, you could use this to display a list of recently added albums vis a smart playlist. + Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + + + :param playlist_id: the ID of the playlist + :param type: The type of media to retrieve. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetPlaylistContentsRequest( + playlist_id=playlist_id, + type=type_, + ) + + req = self.build_request_async( + method="GET", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPlaylistContentsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetPlaylistContentsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def clear_playlist_contents( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.ClearPlaylistContentsResponse: + r"""Delete Playlist Contents + + Clears a playlist, only works with dumb playlists. Returns the playlist. + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.ClearPlaylistContentsRequest( + playlist_id=playlist_id, + ) + + req = self.build_request( + method="DELETE", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="clearPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.ClearPlaylistContentsResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ClearPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.ClearPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ClearPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.ClearPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def clear_playlist_contents_async( + self, + *, + playlist_id: float, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.ClearPlaylistContentsResponse: + r"""Delete Playlist Contents + + Clears a playlist, only works with dumb playlists. Returns the playlist. + + + :param playlist_id: the ID of the playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.ClearPlaylistContentsRequest( + playlist_id=playlist_id, + ) + + req = self.build_request_async( + method="DELETE", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="clearPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.ClearPlaylistContentsResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ClearPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.ClearPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ClearPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.ClearPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def add_playlist_contents( + self, + *, + playlist_id: float, + uri: str, + play_queue_id: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.AddPlaylistContentsResponse: + r"""Adding to a Playlist + + Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. + With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + + + :param playlist_id: the ID of the playlist + :param uri: the content URI for the playlist + :param play_queue_id: the play queue to add to a playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.AddPlaylistContentsRequest( + playlist_id=playlist_id, + uri=uri, + play_queue_id=play_queue_id, + ) + + req = self.build_request( + method="PUT", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="addPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.AddPlaylistContentsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.AddPlaylistContentsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.AddPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.AddPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.AddPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.AddPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def add_playlist_contents_async( + self, + *, + playlist_id: float, + uri: str, + play_queue_id: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.AddPlaylistContentsResponse: + r"""Adding to a Playlist + + Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. + With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + + + :param playlist_id: the ID of the playlist + :param uri: the content URI for the playlist + :param play_queue_id: the play queue to add to a playlist + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.AddPlaylistContentsRequest( + playlist_id=playlist_id, + uri=uri, + play_queue_id=play_queue_id, + ) + + req = self.build_request_async( + method="PUT", + path="/playlists/{playlistID}/items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="addPlaylistContents", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.AddPlaylistContentsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.AddPlaylistContentsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.AddPlaylistContentsResponseBodyData + ) + data.raw_response = http_res + raise errors.AddPlaylistContentsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.AddPlaylistContentsPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.AddPlaylistContentsPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def upload_playlist( + self, + *, + path: str, + force: operations.QueryParamForce, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UploadPlaylistResponse: + r"""Upload Playlist + + Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + + + :param path: absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. + :param force: Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UploadPlaylistRequest( + path=path, + force=force, + ) + + req = self.build_request( + method="POST", + path="/playlists/upload", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="uploadPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UploadPlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UploadPlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.UploadPlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UploadPlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.UploadPlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def upload_playlist_async( + self, + *, + path: str, + force: operations.QueryParamForce, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.UploadPlaylistResponse: + r"""Upload Playlist + + Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + + + :param path: absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. + :param force: Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.UploadPlaylistRequest( + path=path, + force=force, + ) + + req = self.build_request_async( + method="POST", + path="/playlists/upload", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="uploadPlaylist", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UploadPlaylistResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UploadPlaylistResponseBodyData + ) + data.raw_response = http_res + raise errors.UploadPlaylistResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.UploadPlaylistPlaylistsResponseBodyData + ) + data.raw_response = http_res + raise errors.UploadPlaylistPlaylistsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/plex.py b/src/plex_api_client/plex.py new file mode 100644 index 0000000..c7837ad --- /dev/null +++ b/src/plex_api_client/plex.py @@ -0,0 +1,1360 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, List, Optional, Union, cast + + +class Plex(BaseSDK): + r"""API Calls that perform operations directly against https://Plex.tv""" + + def get_companions_data( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetCompanionsDataResponse: + r"""Get Companions Data + + Get Companions Data + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_COMPANIONS_DATA_SERVERS[0] + req = self.build_request( + method="GET", + path="/companions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getCompanionsData", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetCompanionsDataResponse( + response_bodies=utils.unmarshal_json( + http_res.text, Optional[List[operations.ResponseBody]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetCompanionsDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetCompanionsDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetCompanionsDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetCompanionsDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_companions_data_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetCompanionsDataResponse: + r"""Get Companions Data + + Get Companions Data + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_COMPANIONS_DATA_SERVERS[0] + req = self.build_request_async( + method="GET", + path="/companions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getCompanionsData", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetCompanionsDataResponse( + response_bodies=utils.unmarshal_json( + http_res.text, Optional[List[operations.ResponseBody]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetCompanionsDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetCompanionsDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetCompanionsDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetCompanionsDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_user_friends( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUserFriendsResponse: + r"""Get list of friends of the user logged in + + Get friends of provided auth token. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_USER_FRIENDS_SERVERS[0] + req = self.build_request( + method="GET", + path="/friends", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getUserFriends", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUserFriendsResponse( + friends=utils.unmarshal_json( + http_res.text, Optional[List[operations.Friend]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserFriendsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserFriendsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserFriendsPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserFriendsPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_user_friends_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUserFriendsResponse: + r"""Get list of friends of the user logged in + + Get friends of provided auth token. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_USER_FRIENDS_SERVERS[0] + req = self.build_request_async( + method="GET", + path="/friends", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getUserFriends", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUserFriendsResponse( + friends=utils.unmarshal_json( + http_res.text, Optional[List[operations.Friend]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserFriendsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserFriendsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUserFriendsPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUserFriendsPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_geo_data( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetGeoDataResponse: + r"""Get Geo Data + + Returns the geolocation and locale data of the caller + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_GEO_DATA_SERVERS[0] + req = self.build_request( + method="GET", + path="/geoip", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=False, + user_agent_header="user-agent", + accept_header_value="application/json", + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getGeoData", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetGeoDataResponse( + geo_data=utils.unmarshal_json( + http_res.text, Optional[operations.GetGeoDataGeoData] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGeoDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGeoDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGeoDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGeoDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_geo_data_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetGeoDataResponse: + r"""Get Geo Data + + Returns the geolocation and locale data of the caller + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_GEO_DATA_SERVERS[0] + req = self.build_request_async( + method="GET", + path="/geoip", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=False, + user_agent_header="user-agent", + accept_header_value="application/json", + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getGeoData", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetGeoDataResponse( + geo_data=utils.unmarshal_json( + http_res.text, Optional[operations.GetGeoDataGeoData] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGeoDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGeoDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetGeoDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetGeoDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_home_data( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetHomeDataResponse: + r"""Get Plex Home Data + + Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/home", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getHomeData", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetHomeDataResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetHomeDataResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetHomeDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetHomeDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetHomeDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetHomeDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_home_data_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetHomeDataResponse: + r"""Get Plex Home Data + + Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/home", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getHomeData", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetHomeDataResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetHomeDataResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetHomeDataResponseBodyData + ) + data.raw_response = http_res + raise errors.GetHomeDataResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetHomeDataPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetHomeDataPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_server_resources( + self, + *, + request: Union[ + operations.GetServerResourcesRequest, + operations.GetServerResourcesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerResourcesResponse: + r"""Get Server Resources + + Get Plex server access tokens and server connections + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_SERVER_RESOURCES_SERVERS[0] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetServerResourcesRequest) + request = cast(operations.GetServerResourcesRequest, request) + + req = self.build_request( + method="GET", + path="/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetServerResourcesGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-server-resources", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerResourcesResponse( + plex_devices=utils.unmarshal_json( + http_res.text, Optional[List[operations.PlexDevice]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerResourcesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerResourcesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerResourcesPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerResourcesPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_resources_async( + self, + *, + request: Union[ + operations.GetServerResourcesRequest, + operations.GetServerResourcesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerResourcesResponse: + r"""Get Server Resources + + Get Plex server access tokens and server connections + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_SERVER_RESOURCES_SERVERS[0] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetServerResourcesRequest) + request = cast(operations.GetServerResourcesRequest, request) + + req = self.build_request_async( + method="GET", + path="/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetServerResourcesGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-server-resources", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerResourcesResponse( + plex_devices=utils.unmarshal_json( + http_res.text, Optional[List[operations.PlexDevice]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerResourcesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerResourcesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerResourcesPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerResourcesPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_pin( + self, + *, + strong: Optional[bool] = False, + x_plex_client_identifier: Optional[str] = None, + x_plex_product: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPinResponse: + r"""Get a Pin + + Retrieve a Pin from Plex.tv for authentication flows + + :param strong: Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` + :param x_plex_client_identifier: 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 x_plex_product: + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_PIN_SERVERS[0] + + request = operations.GetPinRequest( + strong=strong, + x_plex_client_identifier=x_plex_client_identifier, + x_plex_product=x_plex_product, + ) + + req = self.build_request( + method="POST", + path="/pins", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetPinGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getPin", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPinResponse( + auth_pin_container=utils.unmarshal_json( + http_res.text, Optional[operations.GetPinAuthPinContainer] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GetPinResponseBodyData) + data.raw_response = http_res + raise errors.GetPinResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_pin_async( + self, + *, + strong: Optional[bool] = False, + x_plex_client_identifier: Optional[str] = None, + x_plex_product: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetPinResponse: + r"""Get a Pin + + Retrieve a Pin from Plex.tv for authentication flows + + :param strong: Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` + :param x_plex_client_identifier: 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 x_plex_product: + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_PIN_SERVERS[0] + + request = operations.GetPinRequest( + strong=strong, + x_plex_client_identifier=x_plex_client_identifier, + x_plex_product=x_plex_product, + ) + + req = self.build_request_async( + method="POST", + path="/pins", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetPinGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getPin", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPinResponse( + auth_pin_container=utils.unmarshal_json( + http_res.text, Optional[operations.GetPinAuthPinContainer] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GetPinResponseBodyData) + data.raw_response = http_res + raise errors.GetPinResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_token_by_pin_id( + self, + *, + pin_id: int, + x_plex_client_identifier: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTokenByPinIDResponse: + r"""Get Access Token by PinId + + Retrieve an Access Token from Plex.tv after the Pin has been authenticated + + :param pin_id: The PinID to retrieve an access token for + :param x_plex_client_identifier: 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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_TOKEN_BY_PIN_ID_SERVERS[0] + + request = operations.GetTokenByPinIDRequest( + x_plex_client_identifier=x_plex_client_identifier, + pin_id=pin_id, + ) + + req = self.build_request( + method="GET", + path="/pins/{pinID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetTokenByPinIDGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getTokenByPinId", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "404", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTokenByPinIDResponse( + auth_pin_container=utils.unmarshal_json( + http_res.text, Optional[operations.GetTokenByPinIDAuthPinContainer] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTokenByPinIDResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTokenByPinIDResponseBody(data=data) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTokenByPinIDPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTokenByPinIDPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_token_by_pin_id_async( + self, + *, + pin_id: int, + x_plex_client_identifier: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTokenByPinIDResponse: + r"""Get Access Token by PinId + + Retrieve an Access Token from Plex.tv after the Pin has been authenticated + + :param pin_id: The PinID to retrieve an access token for + :param x_plex_client_identifier: 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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_TOKEN_BY_PIN_ID_SERVERS[0] + + request = operations.GetTokenByPinIDRequest( + x_plex_client_identifier=x_plex_client_identifier, + pin_id=pin_id, + ) + + req = self.build_request_async( + method="GET", + path="/pins/{pinID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + _globals=operations.GetTokenByPinIDGlobals( + x_plex_client_identifier=self.sdk_configuration.globals.x_plex_client_identifier, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getTokenByPinId", oauth2_scopes=[], security_source=None + ), + request=req, + error_status_codes=["400", "404", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTokenByPinIDResponse( + auth_pin_container=utils.unmarshal_json( + http_res.text, Optional[operations.GetTokenByPinIDAuthPinContainer] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTokenByPinIDResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTokenByPinIDResponseBody(data=data) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTokenByPinIDPlexResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTokenByPinIDPlexResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/py.typed b/src/plex_api_client/py.typed new file mode 100644 index 0000000..3e38f1a --- /dev/null +++ b/src/plex_api_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The package enables type hints. diff --git a/src/plex_api_client/sdk.py b/src/plex_api_client/sdk.py new file mode 100644 index 0000000..12b5d34 --- /dev/null +++ b/src/plex_api_client/sdk.py @@ -0,0 +1,229 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from .httpclient import AsyncHttpClient, HttpClient +from .sdkconfiguration import SDKConfiguration, ServerProtocol +from .utils.logger import Logger, get_default_logger +from .utils.retries import RetryConfig +import httpx +from plex_api_client import utils +from plex_api_client._hooks import SDKHooks +from plex_api_client.activities import Activities +from plex_api_client.authentication import Authentication +from plex_api_client.butler import Butler +from plex_api_client.hubs import Hubs +from plex_api_client.library import Library +from plex_api_client.log import Log +from plex_api_client.media import Media +from plex_api_client.models import components, internal +from plex_api_client.playlists import Playlists +from plex_api_client.plex import Plex +from plex_api_client.search import Search +from plex_api_client.server import Server +from plex_api_client.sessions import Sessions +from plex_api_client.statistics import Statistics +from plex_api_client.types import OptionalNullable, UNSET +from plex_api_client.updater import Updater +from plex_api_client.video import Video +from plex_api_client.watchlist import Watchlist +from typing import Any, Callable, Dict, List, Optional, Union + + +class PlexAPI(BaseSDK): + r"""Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server""" + + server: Server + r"""Operations against the Plex Media Server System. + + """ + media: Media + r"""API Calls interacting with Plex Media Server Media + + """ + video: Video + r"""API Calls that perform operations with Plex Media Server Videos + + """ + activities: Activities + r"""Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: + - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. + - They must contain an `type` which is used by clients to distinguish the specific activity. + - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) + - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + + """ + butler: Butler + r"""Butler is the task manager of the Plex Media Server Ecosystem. + + """ + plex: Plex + r"""API Calls that perform operations directly against https://Plex.tv + + """ + hubs: Hubs + r"""Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + + """ + search: Search + r"""API Calls that perform search operations with Plex Media Server + + """ + library: Library + r"""API Calls interacting with Plex Media Server Libraries + + """ + watchlist: Watchlist + r"""API Calls that perform operations with Plex Media Server Watchlists + + """ + log: Log + r"""Submit logs to the Log Handler for Plex Media Server + + """ + playlists: Playlists + r"""Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as \"all albums from 2017\"). + They can be organized in (optionally nesting) folders. + Retrieving a playlist, or its items, will trigger a refresh of its metadata. + This may cause the duration and number of items to change. + + """ + authentication: Authentication + r"""API Calls regarding authentication for Plex Media Server + + """ + statistics: Statistics + r"""API Calls that perform operations with Plex Media Server Statistics + + """ + sessions: Sessions + r"""API Calls that perform search operations with Plex Media Server Sessions + + """ + updater: Updater + r"""This describes the API for searching and applying updates to the Plex Media Server. + Updates to the status can be observed via the Event API. + + """ + + def __init__( + self, + access_token: Optional[ + Union[Optional[str], Callable[[], Optional[str]]] + ] = None, + x_plex_client_identifier: Optional[str] = None, + protocol: Optional[ServerProtocol] = None, + ip: Optional[str] = None, + port: Optional[str] = None, + server_idx: Optional[int] = None, + server_url: Optional[str] = None, + url_params: Optional[Dict[str, str]] = None, + client: Optional[HttpClient] = None, + async_client: Optional[AsyncHttpClient] = None, + retry_config: OptionalNullable[RetryConfig] = UNSET, + timeout_ms: Optional[int] = None, + debug_logger: Optional[Logger] = None, + ) -> None: + r"""Instantiates the SDK configuring it with the provided parameters. + + :param access_token: The access_token required for authentication + :param x_plex_client_identifier: Configures the x_plex_client_identifier parameter for all supported operations + :param protocol: Allows setting the protocol variable for url substitution + :param ip: Allows setting the ip variable for url substitution + :param port: Allows setting the port variable for url substitution + :param server_idx: The index of the server to use for all methods + :param server_url: The server URL to use for all methods + :param url_params: Parameters to optionally template the server URL with + :param client: The HTTP client to use for all synchronous methods + :param async_client: The Async HTTP client to use for all asynchronous methods + :param retry_config: The retry configuration to use for all supported methods + :param timeout_ms: Optional request timeout applied to each operation in milliseconds + """ + if client is None: + client = httpx.Client() + + assert issubclass( + type(client), HttpClient + ), "The provided client must implement the HttpClient protocol." + + if async_client is None: + async_client = httpx.AsyncClient() + + if debug_logger is None: + debug_logger = get_default_logger() + + assert issubclass( + type(async_client), AsyncHttpClient + ), "The provided async_client must implement the AsyncHttpClient protocol." + + security: Any = None + if callable(access_token): + security = lambda: components.Security(access_token=access_token()) # pylint: disable=unnecessary-lambda-assignment + 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) + server_defaults: List[Dict[str, str]] = [ + { + "protocol": protocol or "https", + "ip": ip or "10.10.10.47", + "port": port or "32400", + }, + ] + + _globals = internal.Globals( + x_plex_client_identifier=utils.get_global_from_env( + x_plex_client_identifier, "X_PLEX_CLIENT_IDENTIFIER", str + ), + ) + + BaseSDK.__init__( + self, + SDKConfiguration( + client=client, + async_client=async_client, + globals=_globals, + security=security, + server_url=server_url, + server_idx=server_idx, + server_defaults=server_defaults, + retry_config=retry_config, + timeout_ms=timeout_ms, + debug_logger=debug_logger, + ), + ) + + hooks = SDKHooks() + + current_server_url, *_ = self.sdk_configuration.get_server_details() + server_url, self.sdk_configuration.client = hooks.sdk_init( + current_server_url, self.sdk_configuration.client + ) + if current_server_url != server_url: + self.sdk_configuration.server_url = server_url + + # pylint: disable=protected-access + self.sdk_configuration.__dict__["_hooks"] = hooks + + self._init_sdks() + + def _init_sdks(self): + self.server = Server(self.sdk_configuration) + self.media = Media(self.sdk_configuration) + self.video = Video(self.sdk_configuration) + self.activities = Activities(self.sdk_configuration) + self.butler = Butler(self.sdk_configuration) + self.plex = Plex(self.sdk_configuration) + self.hubs = Hubs(self.sdk_configuration) + self.search = Search(self.sdk_configuration) + self.library = Library(self.sdk_configuration) + self.watchlist = Watchlist(self.sdk_configuration) + self.log = Log(self.sdk_configuration) + self.playlists = Playlists(self.sdk_configuration) + self.authentication = Authentication(self.sdk_configuration) + self.statistics = Statistics(self.sdk_configuration) + self.sessions = Sessions(self.sdk_configuration) + self.updater = Updater(self.sdk_configuration) diff --git a/src/plex_api_client/sdkconfiguration.py b/src/plex_api_client/sdkconfiguration.py new file mode 100644 index 0000000..102f095 --- /dev/null +++ b/src/plex_api_client/sdkconfiguration.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from ._hooks import SDKHooks +from .httpclient import AsyncHttpClient, HttpClient +from .utils import Logger, RetryConfig, remove_suffix +from dataclasses import dataclass, field +from enum import Enum +from plex_api_client.models import components, internal +from plex_api_client.types import OptionalNullable, UNSET +from pydantic import Field +from typing import Callable, Dict, List, Optional, Tuple, Union + + +SERVERS = [ + "{protocol}://{ip}:{port}", + # The full address of your Plex Server +] +"""Contains the list of servers available to the SDK""" + + +class ServerProtocol(str, Enum): + r"""The protocol to use for the server connection""" + + HTTP = "http" + HTTPS = "https" + + +@dataclass +class SDKConfiguration: + client: HttpClient + async_client: AsyncHttpClient + debug_logger: Logger + globals: internal.Globals + security: Optional[ + Union[components.Security, Callable[[], components.Security]] + ] = None + server_url: Optional[str] = "" + server_idx: Optional[int] = 0 + server_defaults: List[Dict[str, str]] = field(default_factory=List) + language: str = "python" + openapi_doc_version: str = "0.0.3" + sdk_version: str = "0.11.0" + gen_version: str = "2.413.0" + user_agent: str = "speakeasy-sdk/python 0.11.0 2.413.0 0.0.3 plex-api-client" + retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) + timeout_ms: Optional[int] = None + + def __post_init__(self): + self._hooks = SDKHooks() + + def get_server_details(self) -> Tuple[str, Dict[str, str]]: + if self.server_url is not None and self.server_url: + return remove_suffix(self.server_url, "/"), {} + if self.server_idx is None: + self.server_idx = 0 + + return SERVERS[self.server_idx], self.server_defaults[self.server_idx] + + def get_hooks(self) -> SDKHooks: + return self._hooks diff --git a/src/plex_api_client/search.py b/src/plex_api_client/search.py new file mode 100644 index 0000000..c03c066 --- /dev/null +++ b/src/plex_api_client/search.py @@ -0,0 +1,644 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Search(BaseSDK): + r"""API Calls that perform search operations with Plex Media Server""" + + def perform_search( + self, + *, + query: str, + section_id: Optional[float] = None, + limit: Optional[float] = 3, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PerformSearchResponse: + r"""Perform a search + + This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + + In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + + - `reason`: The reason for the result, if not because of a direct search term match; can be either: + - `section`: There are multiple identical results from different sections. + - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` + - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). + - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + + This request is intended to be very fast, and called as the user types. + + + :param query: The query term + :param section_id: This gives context to the search, and can result in re-ordering of search result hubs + :param limit: The number of items to return per hub + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.PerformSearchRequest( + query=query, + section_id=section_id, + limit=limit, + ) + + req = self.build_request( + method="GET", + path="/hubs/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="performSearch", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.PerformSearchResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformSearchResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformSearchSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformSearchSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def perform_search_async( + self, + *, + query: str, + section_id: Optional[float] = None, + limit: Optional[float] = 3, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PerformSearchResponse: + r"""Perform a search + + This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + + In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + + - `reason`: The reason for the result, if not because of a direct search term match; can be either: + - `section`: There are multiple identical results from different sections. + - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` + - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). + - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + + This request is intended to be very fast, and called as the user types. + + + :param query: The query term + :param section_id: This gives context to the search, and can result in re-ordering of search result hubs + :param limit: The number of items to return per hub + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.PerformSearchRequest( + query=query, + section_id=section_id, + limit=limit, + ) + + req = self.build_request_async( + method="GET", + path="/hubs/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="performSearch", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.PerformSearchResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformSearchResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformSearchSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformSearchSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def perform_voice_search( + self, + *, + query: str, + section_id: Optional[float] = None, + limit: Optional[float] = 3, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PerformVoiceSearchResponse: + r"""Perform a voice search + + This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. + It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. + Whenever possible, clients should limit the search to the appropriate type. + Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + + + :param query: The query term + :param section_id: This gives context to the search, and can result in re-ordering of search result hubs + :param limit: The number of items to return per hub + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.PerformVoiceSearchRequest( + query=query, + section_id=section_id, + limit=limit, + ) + + req = self.build_request( + method="GET", + path="/hubs/search/voice", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="performVoiceSearch", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.PerformVoiceSearchResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformVoiceSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformVoiceSearchResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformVoiceSearchSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformVoiceSearchSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def perform_voice_search_async( + self, + *, + query: str, + section_id: Optional[float] = None, + limit: Optional[float] = 3, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.PerformVoiceSearchResponse: + r"""Perform a voice search + + This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. + It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. + Whenever possible, clients should limit the search to the appropriate type. + Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + + + :param query: The query term + :param section_id: This gives context to the search, and can result in re-ordering of search result hubs + :param limit: The number of items to return per hub + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.PerformVoiceSearchRequest( + query=query, + section_id=section_id, + limit=limit, + ) + + req = self.build_request_async( + method="GET", + path="/hubs/search/voice", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="performVoiceSearch", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.PerformVoiceSearchResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformVoiceSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformVoiceSearchResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.PerformVoiceSearchSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.PerformVoiceSearchSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_search_results( + self, + *, + query: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSearchResultsResponse: + r"""Get Search Results + + This will search the database for the string provided. + + :param query: The search query string to use + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSearchResultsRequest( + query=query, + ) + + req = self.build_request( + method="GET", + path="/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getSearchResults", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSearchResultsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSearchResultsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchResultsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchResultsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchResultsSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchResultsSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_search_results_async( + self, + *, + query: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSearchResultsResponse: + r"""Get Search Results + + This will search the database for the string provided. + + :param query: The search query string to use + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSearchResultsRequest( + query=query, + ) + + req = self.build_request_async( + method="GET", + path="/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getSearchResults", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSearchResultsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSearchResultsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchResultsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchResultsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSearchResultsSearchResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSearchResultsSearchResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/server.py b/src/plex_api_client/server.py new file mode 100644 index 0000000..d6b020c --- /dev/null +++ b/src/plex_api_client/server.py @@ -0,0 +1,1668 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Server(BaseSDK): + r"""Operations against the Plex Media Server System.""" + + def get_server_capabilities( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerCapabilitiesResponse: + r"""Get Server Capabilities + + Get Server Capabilities + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getServerCapabilities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerCapabilitiesResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetServerCapabilitiesResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerCapabilitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerCapabilitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerCapabilitiesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerCapabilitiesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_capabilities_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerCapabilitiesResponse: + r"""Get Server Capabilities + + Get Server Capabilities + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getServerCapabilities", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerCapabilitiesResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetServerCapabilitiesResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerCapabilitiesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerCapabilitiesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerCapabilitiesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerCapabilitiesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_server_preferences( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerPreferencesResponse: + r"""Get Server Preferences + + Get Server Preferences + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/:/prefs", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getServerPreferences", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerPreferencesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerPreferencesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerPreferencesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerPreferencesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerPreferencesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerPreferencesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_preferences_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerPreferencesResponse: + r"""Get Server Preferences + + Get Server Preferences + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/:/prefs", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getServerPreferences", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerPreferencesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerPreferencesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerPreferencesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerPreferencesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerPreferencesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerPreferencesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_available_clients( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetAvailableClientsResponse: + r"""Get Available Clients + + Get Available Clients + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/clients", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getAvailableClients", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetAvailableClientsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetAvailableClientsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAvailableClientsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAvailableClientsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAvailableClientsServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAvailableClientsServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_available_clients_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetAvailableClientsResponse: + r"""Get Available Clients + + Get Available Clients + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/clients", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getAvailableClients", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetAvailableClientsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetAvailableClientsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAvailableClientsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAvailableClientsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetAvailableClientsServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetAvailableClientsServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_devices( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetDevicesResponse: + r"""Get Devices + + Get Devices + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/devices", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getDevices", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetDevicesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetDevicesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetDevicesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetDevicesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetDevicesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetDevicesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_devices_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetDevicesResponse: + r"""Get Devices + + Get Devices + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/devices", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getDevices", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetDevicesResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetDevicesResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetDevicesResponseBodyData + ) + data.raw_response = http_res + raise errors.GetDevicesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetDevicesServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetDevicesServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_server_identity( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerIdentityResponse: + r"""Get Server Identity + + This request is useful to determine if the server is online or offline + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/identity", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=False, + user_agent_header="user-agent", + accept_header_value="application/json", + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-server-identity", + oauth2_scopes=[], + security_source=None, + ), + request=req, + error_status_codes=["408", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerIdentityResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerIdentityResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "408", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerIdentityResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerIdentityResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_identity_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerIdentityResponse: + r"""Get Server Identity + + This request is useful to determine if the server is online or offline + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/identity", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=False, + user_agent_header="user-agent", + accept_header_value="application/json", + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-server-identity", + oauth2_scopes=[], + security_source=None, + ), + request=req, + error_status_codes=["408", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerIdentityResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerIdentityResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "408", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerIdentityResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerIdentityResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_my_plex_account( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMyPlexAccountResponse: + r"""Get MyPlex Account + + Returns MyPlex Account Information + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/myplex/account", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getMyPlexAccount", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMyPlexAccountResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMyPlexAccountResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMyPlexAccountResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMyPlexAccountResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMyPlexAccountServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMyPlexAccountServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_my_plex_account_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMyPlexAccountResponse: + r"""Get MyPlex Account + + Returns MyPlex Account Information + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/myplex/account", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getMyPlexAccount", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMyPlexAccountResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMyPlexAccountResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMyPlexAccountResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMyPlexAccountResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMyPlexAccountServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMyPlexAccountServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_resized_photo( + self, + *, + request: Union[ + operations.GetResizedPhotoRequest, + operations.GetResizedPhotoRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetResizedPhotoResponse: + r"""Get a Resized Photo + + Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetResizedPhotoRequest) + request = cast(operations.GetResizedPhotoRequest, request) + + req = self.build_request( + method="GET", + path="/photo/:/transcode", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getResizedPhoto", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetResizedPhotoResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResizedPhotoResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResizedPhotoResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResizedPhotoServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResizedPhotoServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_resized_photo_async( + self, + *, + request: Union[ + operations.GetResizedPhotoRequest, + operations.GetResizedPhotoRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetResizedPhotoResponse: + r"""Get a Resized Photo + + Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetResizedPhotoRequest) + request = cast(operations.GetResizedPhotoRequest, request) + + req = self.build_request_async( + method="GET", + path="/photo/:/transcode", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getResizedPhoto", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetResizedPhotoResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResizedPhotoResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResizedPhotoResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResizedPhotoServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResizedPhotoServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_media_providers( + self, + *, + x_plex_token: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMediaProvidersResponse: + r"""Get Media Providers + + Retrieves media providers and their features from the Plex server. + + :param x_plex_token: Plex Authentication Token + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMediaProvidersRequest( + x_plex_token=x_plex_token, + ) + + req = self.build_request( + method="GET", + path="/media/providers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-media-providers", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMediaProvidersResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMediaProvidersResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMediaProvidersResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMediaProvidersResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMediaProvidersServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMediaProvidersServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_media_providers_async( + self, + *, + x_plex_token: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetMediaProvidersResponse: + r"""Get Media Providers + + Retrieves media providers and their features from the Plex server. + + :param x_plex_token: Plex Authentication Token + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetMediaProvidersRequest( + x_plex_token=x_plex_token, + ) + + req = self.build_request_async( + method="GET", + path="/media/providers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-media-providers", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetMediaProvidersResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetMediaProvidersResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMediaProvidersResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMediaProvidersResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetMediaProvidersServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetMediaProvidersServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_server_list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerListResponse: + r"""Get Server List + + Get Server List + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/servers", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getServerList", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerListResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerListResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerListResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerListResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerListServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerListServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_server_list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetServerListResponse: + r"""Get Server List + + Get Server List + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/servers", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getServerList", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetServerListResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetServerListResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerListResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerListResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetServerListServerResponseBodyData + ) + data.raw_response = http_res + raise errors.GetServerListServerResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/sessions.py b/src/plex_api_client/sessions.py new file mode 100644 index 0000000..7d8e363 --- /dev/null +++ b/src/plex_api_client/sessions.py @@ -0,0 +1,788 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional, Union + + +class Sessions(BaseSDK): + r"""API Calls that perform search operations with Plex Media Server Sessions""" + + def get_sessions( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSessionsResponse: + r"""Get Active Sessions + + This will retrieve the \"Now Playing\" Information of the PMS. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/status/sessions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getSessions", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSessionsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSessionsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionsSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionsSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_sessions_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSessionsResponse: + r"""Get Active Sessions + + This will retrieve the \"Now Playing\" Information of the PMS. + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/status/sessions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getSessions", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSessionsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSessionsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionsSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionsSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_session_history( + self, + *, + sort: Optional[str] = None, + account_id: Optional[int] = None, + filter_: Optional[ + Union[operations.QueryParamFilter, operations.QueryParamFilterTypedDict] + ] = None, + library_section_id: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSessionHistoryResponse: + r"""Get Session History + + This will Retrieve a listing of all history views. + + :param sort: Sorts the results by the specified field followed by the direction (asc, desc) + :param account_id: Filter results by those that are related to a specific users id + :param filter_: Filters content by field and direction/equality (Unknown if viewedAt is the only supported column) + :param library_section_id: Filters the results based on the id of a valid library section + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSessionHistoryRequest( + sort=sort, + account_id=account_id, + filter_=utils.get_pydantic_model( + filter_, Optional[operations.QueryParamFilter] + ), + library_section_id=library_section_id, + ) + + req = self.build_request( + method="GET", + path="/status/sessions/history/all", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getSessionHistory", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSessionHistoryResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSessionHistoryResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionHistoryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionHistoryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionHistorySessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionHistorySessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_session_history_async( + self, + *, + sort: Optional[str] = None, + account_id: Optional[int] = None, + filter_: Optional[ + Union[operations.QueryParamFilter, operations.QueryParamFilterTypedDict] + ] = None, + library_section_id: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetSessionHistoryResponse: + r"""Get Session History + + This will Retrieve a listing of all history views. + + :param sort: Sorts the results by the specified field followed by the direction (asc, desc) + :param account_id: Filter results by those that are related to a specific users id + :param filter_: Filters content by field and direction/equality (Unknown if viewedAt is the only supported column) + :param library_section_id: Filters the results based on the id of a valid library section + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetSessionHistoryRequest( + sort=sort, + account_id=account_id, + filter_=utils.get_pydantic_model( + filter_, Optional[operations.QueryParamFilter] + ), + library_section_id=library_section_id, + ) + + req = self.build_request_async( + method="GET", + path="/status/sessions/history/all", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getSessionHistory", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetSessionHistoryResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetSessionHistoryResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionHistoryResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionHistoryResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetSessionHistorySessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetSessionHistorySessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_transcode_sessions( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTranscodeSessionsResponse: + r"""Get Transcode Sessions + + Get Transcode Sessions + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/transcode/sessions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getTranscodeSessions", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTranscodeSessionsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetTranscodeSessionsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTranscodeSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTranscodeSessionsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTranscodeSessionsSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTranscodeSessionsSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_transcode_sessions_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTranscodeSessionsResponse: + r"""Get Transcode Sessions + + Get Transcode Sessions + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/transcode/sessions", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getTranscodeSessions", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetTranscodeSessionsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetTranscodeSessionsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTranscodeSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTranscodeSessionsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTranscodeSessionsSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTranscodeSessionsSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def stop_transcode_session( + self, + *, + session_key: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopTranscodeSessionResponse: + r"""Stop a Transcode Session + + Stop a Transcode Session + + :param session_key: the Key of the transcode session to stop + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StopTranscodeSessionRequest( + session_key=session_key, + ) + + req = self.build_request( + method="DELETE", + path="/transcode/sessions/{sessionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="stopTranscodeSession", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return operations.StopTranscodeSessionResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTranscodeSessionResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTranscodeSessionResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTranscodeSessionSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTranscodeSessionSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def stop_transcode_session_async( + self, + *, + session_key: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StopTranscodeSessionResponse: + r"""Stop a Transcode Session + + Stop a Transcode Session + + :param session_key: the Key of the transcode session to stop + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.StopTranscodeSessionRequest( + session_key=session_key, + ) + + req = self.build_request_async( + method="DELETE", + path="/transcode/sessions/{sessionKey}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="stopTranscodeSession", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return operations.StopTranscodeSessionResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTranscodeSessionResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTranscodeSessionResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StopTranscodeSessionSessionsResponseBodyData + ) + data.raw_response = http_res + raise errors.StopTranscodeSessionSessionsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/statistics.py b/src/plex_api_client/statistics.py new file mode 100644 index 0000000..45f87dd --- /dev/null +++ b/src/plex_api_client/statistics.py @@ -0,0 +1,604 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Statistics(BaseSDK): + r"""API Calls that perform operations with Plex Media Server Statistics""" + + def get_statistics( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetStatisticsResponse: + r"""Get Media Statistics + + This will return the media statistics for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request( + method="GET", + path="/statistics/media", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetStatisticsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_statistics_async( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetStatisticsResponse: + r"""Get Media Statistics + + This will return the media statistics for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request_async( + method="GET", + path="/statistics/media", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetStatisticsResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_resources_statistics( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetResourcesStatisticsResponse: + r"""Get Resources Statistics + + This will return the resources for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetResourcesStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request( + method="GET", + path="/statistics/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getResourcesStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetResourcesStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetResourcesStatisticsResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResourcesStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResourcesStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResourcesStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResourcesStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_resources_statistics_async( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetResourcesStatisticsResponse: + r"""Get Resources Statistics + + This will return the resources for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetResourcesStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request_async( + method="GET", + path="/statistics/resources", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getResourcesStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetResourcesStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetResourcesStatisticsResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResourcesStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResourcesStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetResourcesStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetResourcesStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def get_bandwidth_statistics( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetBandwidthStatisticsResponse: + r"""Get Bandwidth Statistics + + This will return the bandwidth statistics for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetBandwidthStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request( + method="GET", + path="/statistics/bandwidth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getBandwidthStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetBandwidthStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetBandwidthStatisticsResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBandwidthStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBandwidthStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBandwidthStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBandwidthStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_bandwidth_statistics_async( + self, + *, + timespan: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetBandwidthStatisticsResponse: + r"""Get Bandwidth Statistics + + This will return the bandwidth statistics for the server + + :param timespan: The timespan to retrieve statistics for the exact meaning of this parameter is not known + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.GetBandwidthStatisticsRequest( + timespan=timespan, + ) + + req = self.build_request_async( + method="GET", + path="/statistics/bandwidth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getBandwidthStatistics", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetBandwidthStatisticsResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetBandwidthStatisticsResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBandwidthStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBandwidthStatisticsResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetBandwidthStatisticsStatisticsResponseBodyData + ) + data.raw_response = http_res + raise errors.GetBandwidthStatisticsStatisticsResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/types/__init__.py b/src/plex_api_client/types/__init__.py new file mode 100644 index 0000000..fc76fe0 --- /dev/null +++ b/src/plex_api_client/types/__init__.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basemodel import ( + BaseModel, + Nullable, + OptionalNullable, + UnrecognizedInt, + UnrecognizedStr, + UNSET, + UNSET_SENTINEL, +) + +__all__ = [ + "BaseModel", + "Nullable", + "OptionalNullable", + "UnrecognizedInt", + "UnrecognizedStr", + "UNSET", + "UNSET_SENTINEL", +] diff --git a/src/plex_api_client/types/basemodel.py b/src/plex_api_client/types/basemodel.py new file mode 100644 index 0000000..a6187ef --- /dev/null +++ b/src/plex_api_client/types/basemodel.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from pydantic import ConfigDict, model_serializer +from pydantic import BaseModel as PydanticBaseModel +from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, NewType +from typing_extensions import TypeAliasType, TypeAlias + + +class BaseModel(PydanticBaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, protected_namespaces=() + ) + + +class Unset(BaseModel): + @model_serializer(mode="plain") + def serialize_model(self): + return UNSET_SENTINEL + + def __bool__(self) -> Literal[False]: + return False + + +UNSET = Unset() +UNSET_SENTINEL = "~?~unset~?~sentinel~?~" + + +T = TypeVar("T") +if TYPE_CHECKING: + Nullable: TypeAlias = Union[T, None] + OptionalNullable: TypeAlias = Union[Optional[Nullable[T]], Unset] +else: + Nullable = TypeAliasType("Nullable", Union[T, None], type_params=(T,)) + OptionalNullable = TypeAliasType( + "OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,) + ) + +UnrecognizedInt = NewType("UnrecognizedInt", int) +UnrecognizedStr = NewType("UnrecognizedStr", str) diff --git a/src/plex_api_client/updater.py b/src/plex_api_client/updater.py new file mode 100644 index 0000000..13d646a --- /dev/null +++ b/src/plex_api_client/updater.py @@ -0,0 +1,585 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import OptionalNullable, UNSET +from typing import Any, Optional + + +class Updater(BaseSDK): + r"""This describes the API for searching and applying updates to the Plex Media Server. + Updates to the status can be observed via the Event API. + + """ + + def get_update_status( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUpdateStatusResponse: + r"""Querying status of updates + + Querying status of updates + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request( + method="GET", + path="/updater/status", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getUpdateStatus", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUpdateStatusResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetUpdateStatusResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUpdateStatusResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUpdateStatusResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUpdateStatusUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUpdateStatusUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_update_status_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetUpdateStatusResponse: + r"""Querying status of updates + + Querying status of updates + + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + req = self.build_request_async( + method="GET", + path="/updater/status", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getUpdateStatus", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetUpdateStatusResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetUpdateStatusResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUpdateStatusResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUpdateStatusResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetUpdateStatusUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.GetUpdateStatusUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def check_for_updates( + self, + *, + download: Optional[operations.Download] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CheckForUpdatesResponse: + r"""Checking for updates + + Checking for updates + + :param download: Indicate that you want to start download any updates found. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.CheckForUpdatesRequest( + download=download, + ) + + req = self.build_request( + method="PUT", + path="/updater/check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="checkForUpdates", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.CheckForUpdatesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CheckForUpdatesResponseBodyData + ) + data.raw_response = http_res + raise errors.CheckForUpdatesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CheckForUpdatesUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.CheckForUpdatesUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def check_for_updates_async( + self, + *, + download: Optional[operations.Download] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.CheckForUpdatesResponse: + r"""Checking for updates + + Checking for updates + + :param download: Indicate that you want to start download any updates found. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.CheckForUpdatesRequest( + download=download, + ) + + req = self.build_request_async( + method="PUT", + path="/updater/check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="checkForUpdates", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.CheckForUpdatesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CheckForUpdatesResponseBodyData + ) + data.raw_response = http_res + raise errors.CheckForUpdatesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.CheckForUpdatesUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.CheckForUpdatesUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def apply_updates( + self, + *, + tonight: Optional[operations.Tonight] = None, + skip: Optional[operations.Skip] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.ApplyUpdatesResponse: + r"""Apply Updates + + Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + + + :param tonight: Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + :param skip: Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.ApplyUpdatesRequest( + tonight=tonight, + skip=skip, + ) + + req = self.build_request( + method="PUT", + path="/updater/apply", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="applyUpdates", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.ApplyUpdatesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ApplyUpdatesResponseBodyData + ) + data.raw_response = http_res + raise errors.ApplyUpdatesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ApplyUpdatesUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.ApplyUpdatesUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "500", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def apply_updates_async( + self, + *, + tonight: Optional[operations.Tonight] = None, + skip: Optional[operations.Skip] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.ApplyUpdatesResponse: + r"""Apply Updates + + Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + + + :param tonight: Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + :param skip: Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = operations.ApplyUpdatesRequest( + tonight=tonight, + skip=skip, + ) + + req = self.build_request_async( + method="PUT", + path="/updater/apply", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="applyUpdates", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.ApplyUpdatesResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ApplyUpdatesResponseBodyData + ) + data.raw_response = http_res + raise errors.ApplyUpdatesResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.ApplyUpdatesUpdaterResponseBodyData + ) + data.raw_response = http_res + raise errors.ApplyUpdatesUpdaterResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "500", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/utils/__init__.py b/src/plex_api_client/utils/__init__.py new file mode 100644 index 0000000..6c26aeb --- /dev/null +++ b/src/plex_api_client/utils/__init__.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .annotations import get_discriminator +from .enums import OpenEnumMeta +from .headers import get_headers, get_response_headers +from .metadata import ( + FieldMetadata, + find_metadata, + FormMetadata, + HeaderMetadata, + MultipartFormMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, + SecurityMetadata, +) +from .queryparams import get_query_params +from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig +from .requestbodies import serialize_request_body, SerializedRequestBody +from .security import get_security +from .serializers import ( + get_pydantic_model, + marshal_json, + unmarshal, + unmarshal_json, + serialize_decimal, + serialize_float, + serialize_int, + stream_to_text, + validate_decimal, + validate_float, + validate_int, + validate_open_enum, +) +from .url import generate_url, template_url, remove_suffix +from .values import ( + get_global_from_env, + match_content_type, + match_status_codes, + match_response, +) +from .logger import Logger, get_body_content, get_default_logger + +__all__ = [ + "BackoffStrategy", + "FieldMetadata", + "find_metadata", + "FormMetadata", + "generate_url", + "get_body_content", + "get_default_logger", + "get_discriminator", + "get_global_from_env", + "get_headers", + "get_pydantic_model", + "get_query_params", + "get_response_headers", + "get_security", + "HeaderMetadata", + "Logger", + "marshal_json", + "match_content_type", + "match_status_codes", + "match_response", + "MultipartFormMetadata", + "OpenEnumMeta", + "PathParamMetadata", + "QueryParamMetadata", + "remove_suffix", + "Retries", + "retry", + "retry_async", + "RetryConfig", + "RequestMetadata", + "SecurityMetadata", + "serialize_decimal", + "serialize_float", + "serialize_int", + "serialize_request_body", + "SerializedRequestBody", + "stream_to_text", + "template_url", + "unmarshal", + "unmarshal_json", + "validate_decimal", + "validate_float", + "validate_int", + "validate_open_enum", +] diff --git a/src/plex_api_client/utils/annotations.py b/src/plex_api_client/utils/annotations.py new file mode 100644 index 0000000..0d17472 --- /dev/null +++ b/src/plex_api_client/utils/annotations.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import Any + +def get_discriminator(model: Any, fieldname: str, key: str) -> str: + if isinstance(model, dict): + try: + return f'{model.get(key)}' + except AttributeError as e: + raise ValueError(f'Could not find discriminator key {key} in {model}') from e + + if hasattr(model, fieldname): + return f'{getattr(model, fieldname)}' + + fieldname = fieldname.upper() + if hasattr(model, fieldname): + return f'{getattr(model, fieldname)}' + + raise ValueError(f'Could not find discriminator field {fieldname} in {model}') diff --git a/src/plex_api_client/utils/enums.py b/src/plex_api_client/utils/enums.py new file mode 100644 index 0000000..c650b10 --- /dev/null +++ b/src/plex_api_client/utils/enums.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import enum + + +class OpenEnumMeta(enum.EnumMeta): + def __call__( + cls, value, names=None, *, module=None, qualname=None, type=None, start=1 + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin + + if names is not None: + return super().__call__( + value, + names=names, + module=module, + qualname=qualname, + type=type, + start=start, + ) + + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + module=module, + qualname=qualname, + type=type, + start=start, + ) + except ValueError: + return value diff --git a/src/plex_api_client/utils/eventstreaming.py b/src/plex_api_client/utils/eventstreaming.py new file mode 100644 index 0000000..553b386 --- /dev/null +++ b/src/plex_api_client/utils/eventstreaming.py @@ -0,0 +1,178 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import re +import json +from typing import Callable, TypeVar, Optional, Generator, AsyncGenerator, Tuple +import httpx + +T = TypeVar("T") + + +class ServerEvent: + id: Optional[str] = None + event: Optional[str] = None + data: Optional[str] = None + retry: Optional[int] = None + + +MESSAGE_BOUNDARIES = [ + b"\r\n\r\n", + b"\n\n", + b"\r\r", +] + + +async def stream_events_async( + response: httpx.Response, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, +) -> AsyncGenerator[T, None]: + buffer = bytearray() + position = 0 + discard = False + async for chunk in response.aiter_bytes(): + # We've encountered the sentinel value and should no longer process + # incoming data. Instead we throw new data away until the server closes + # the connection. + if discard: + continue + + buffer += chunk + for i in range(position, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard = _parse_event(block, decoder, sentinel) + if event is not None: + yield event + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard = _parse_event(buffer, decoder, sentinel) + if event is not None: + yield event + + +def stream_events( + response: httpx.Response, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, +) -> Generator[T, None, None]: + buffer = bytearray() + position = 0 + discard = False + for chunk in response.iter_bytes(): + # We've encountered the sentinel value and should no longer process + # incoming data. Instead we throw new data away until the server closes + # the connection. + if discard: + continue + + buffer += chunk + for i in range(position, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard = _parse_event(block, decoder, sentinel) + if event is not None: + yield event + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard = _parse_event(buffer, decoder, sentinel) + if event is not None: + yield event + + +def _parse_event( + raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None +) -> Tuple[Optional[T], bool]: + block = raw.decode() + lines = re.split(r"\r?\n|\r", block) + publish = False + event = ServerEvent() + data = "" + for line in lines: + if not line: + continue + + delim = line.find(":") + if delim <= 0: + continue + + field = line[0:delim] + value = line[delim + 1 :] if delim < len(line) - 1 else "" + if len(value) and value[0] == " ": + value = value[1:] + + if field == "event": + event.event = value + publish = True + elif field == "data": + data += value + "\n" + publish = True + elif field == "id": + event.id = value + publish = True + elif field == "retry": + event.retry = int(value) if value.isdigit() else None + publish = True + + if sentinel and data == f"{sentinel}\n": + return None, True + + if data: + data = data[:-1] + event.data = data + + data_is_primitive = ( + data.isnumeric() or data == "true" or data == "false" or data == "null" + ) + data_is_json = ( + data.startswith("{") or data.startswith("[") or data.startswith('"') + ) + + if data_is_primitive or data_is_json: + try: + event.data = json.loads(data) + except Exception: + pass + + out = None + if publish: + out = decoder(json.dumps(event.__dict__)) + + return out, False + + +def _peek_sequence(position: int, buffer: bytearray, sequence: bytes): + if len(sequence) > (len(buffer) - position): + return None + + for i, seq in enumerate(sequence): + if buffer[position + i] != seq: + return None + + return sequence diff --git a/src/plex_api_client/utils/forms.py b/src/plex_api_client/utils/forms.py new file mode 100644 index 0000000..9f5a731 --- /dev/null +++ b/src/plex_api_client/utils/forms.py @@ -0,0 +1,208 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import ( + Any, + Dict, + get_type_hints, + List, + Tuple, +) +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from .serializers import marshal_json + +from .metadata import ( + FormMetadata, + MultipartFormMetadata, + find_field_metadata, +) +from .values import _is_set, _val_to_string + + +def _populate_form( + field_name: str, + explode: bool, + obj: Any, + delimiter: str, + form: Dict[str, List[str]], +): + if not _is_set(obj): + return form + + if isinstance(obj, BaseModel): + items = [] + + obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields + for name in obj_fields: + obj_field = obj_fields[name] + obj_field_name = obj_field.alias if obj_field.alias is not None else name + if obj_field_name == "": + continue + + val = getattr(obj, name) + if not _is_set(val): + continue + + if explode: + form[obj_field_name] = [_val_to_string(val)] + else: + items.append(f"{obj_field_name}{delimiter}{_val_to_string(val)}") + + if len(items) > 0: + form[field_name] = [delimiter.join(items)] + elif isinstance(obj, Dict): + items = [] + for key, value in obj.items(): + if not _is_set(value): + continue + + if explode: + form[key] = [_val_to_string(value)] + else: + items.append(f"{key}{delimiter}{_val_to_string(value)}") + + if len(items) > 0: + form[field_name] = [delimiter.join(items)] + elif isinstance(obj, List): + items = [] + + for value in obj: + if not _is_set(value): + continue + + if explode: + if not field_name in form: + form[field_name] = [] + form[field_name].append(_val_to_string(value)) + else: + items.append(_val_to_string(value)) + + if len(items) > 0: + form[field_name] = [delimiter.join([str(item) for item in items])] + else: + form[field_name] = [_val_to_string(obj)] + + return form + + +def serialize_multipart_form( + media_type: str, request: Any +) -> Tuple[str, Dict[str, Any], Dict[str, Any]]: + form: Dict[str, Any] = {} + files: Dict[str, Any] = {} + + if not isinstance(request, BaseModel): + raise TypeError("invalid request body type") + + request_fields: Dict[str, FieldInfo] = request.__class__.model_fields + request_field_types = get_type_hints(request.__class__) + + for name in request_fields: + field = request_fields[name] + + val = getattr(request, name) + if not _is_set(val): + continue + + field_metadata = find_field_metadata(field, MultipartFormMetadata) + if not field_metadata: + continue + + f_name = field.alias if field.alias is not None else name + + if field_metadata.file: + file_fields: Dict[str, FieldInfo] = val.__class__.model_fields + + file_name = "" + field_name = "" + content = None + content_type = None + + for file_field_name in file_fields: + file_field = file_fields[file_field_name] + + file_metadata = find_field_metadata(file_field, MultipartFormMetadata) + if file_metadata is None: + continue + + if file_metadata.content: + content = getattr(val, file_field_name, None) + elif file_field_name == "content_type": + content_type = getattr(val, file_field_name, None) + else: + field_name = ( + file_field.alias + if file_field.alias is not None + else file_field_name + ) + file_name = getattr(val, file_field_name) + + if field_name == "" or file_name == "" or content is None: + raise ValueError("invalid multipart/form-data file") + + if content_type is not None: + files[field_name] = (file_name, content, content_type) + else: + files[field_name] = (file_name, content) + elif field_metadata.json: + files[f_name] = ( + None, + marshal_json(val, request_field_types[name]), + "application/json", + ) + else: + if isinstance(val, List): + values = [] + + for value in val: + if not _is_set(value): + continue + values.append(_val_to_string(value)) + + form[f_name + "[]"] = values + else: + form[f_name] = _val_to_string(val) + return media_type, form, files + + +def serialize_form_data(data: Any) -> Dict[str, Any]: + form: Dict[str, List[str]] = {} + + if isinstance(data, BaseModel): + data_fields: Dict[str, FieldInfo] = data.__class__.model_fields + data_field_types = get_type_hints(data.__class__) + for name in data_fields: + field = data_fields[name] + + val = getattr(data, name) + if not _is_set(val): + continue + + metadata = find_field_metadata(field, FormMetadata) + if metadata is None: + continue + + f_name = field.alias if field.alias is not None else name + + if metadata.json: + form[f_name] = [marshal_json(val, data_field_types[name])] + else: + if metadata.style == "form": + _populate_form( + f_name, + metadata.explode, + val, + ",", + form, + ) + else: + raise ValueError(f"Invalid form style for field {name}") + elif isinstance(data, Dict): + for key, value in data.items(): + if _is_set(value): + form[key] = [_val_to_string(value)] + else: + raise TypeError(f"Invalid request body type {type(data)} for form data") + + return form diff --git a/src/plex_api_client/utils/headers.py b/src/plex_api_client/utils/headers.py new file mode 100644 index 0000000..37864cb --- /dev/null +++ b/src/plex_api_client/utils/headers.py @@ -0,0 +1,136 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import ( + Any, + Dict, + List, + Optional, +) +from httpx import Headers +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from .metadata import ( + HeaderMetadata, + find_field_metadata, +) + +from .values import _is_set, _populate_from_globals, _val_to_string + + +def get_headers(headers_params: Any, gbls: Optional[Any] = None) -> Dict[str, str]: + headers: Dict[str, str] = {} + + globals_already_populated = [] + if _is_set(headers_params): + globals_already_populated = _populate_headers(headers_params, gbls, headers, []) + if _is_set(gbls): + _populate_headers(gbls, None, headers, globals_already_populated) + + return headers + + +def _populate_headers( + headers_params: Any, + gbls: Any, + header_values: Dict[str, str], + skip_fields: List[str], +) -> List[str]: + globals_already_populated: List[str] = [] + + if not isinstance(headers_params, BaseModel): + return globals_already_populated + + param_fields: Dict[str, FieldInfo] = headers_params.__class__.model_fields + for name in param_fields: + if name in skip_fields: + continue + + field = param_fields[name] + f_name = field.alias if field.alias is not None else name + + metadata = find_field_metadata(field, HeaderMetadata) + if metadata is None: + continue + + value, global_found = _populate_from_globals( + name, getattr(headers_params, name), HeaderMetadata, gbls + ) + if global_found: + globals_already_populated.append(name) + value = _serialize_header(metadata.explode, value) + + if value != "": + header_values[f_name] = value + + return globals_already_populated + + +def _serialize_header(explode: bool, obj: Any) -> str: + if not _is_set(obj): + return "" + + if isinstance(obj, BaseModel): + items = [] + obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields + for name in obj_fields: + obj_field = obj_fields[name] + obj_param_metadata = find_field_metadata(obj_field, HeaderMetadata) + + if not obj_param_metadata: + continue + + f_name = obj_field.alias if obj_field.alias is not None else name + + val = getattr(obj, name) + if not _is_set(val): + continue + + if explode: + items.append(f"{f_name}={_val_to_string(val)}") + else: + items.append(f_name) + items.append(_val_to_string(val)) + + if len(items) > 0: + return ",".join(items) + elif isinstance(obj, Dict): + items = [] + + for key, value in obj.items(): + if not _is_set(value): + continue + + if explode: + items.append(f"{key}={_val_to_string(value)}") + else: + items.append(key) + items.append(_val_to_string(value)) + + if len(items) > 0: + return ",".join([str(item) for item in items]) + elif isinstance(obj, List): + items = [] + + for value in obj: + if not _is_set(value): + continue + + items.append(_val_to_string(value)) + + if len(items) > 0: + return ",".join(items) + elif _is_set(obj): + return f"{_val_to_string(obj)}" + + return "" + + +def get_response_headers(headers: Headers) -> Dict[str, List[str]]: + res: Dict[str, List[str]] = {} + for k, v in headers.items(): + if not k in res: + res[k] = [] + + res[k].append(v) + return res diff --git a/src/plex_api_client/utils/logger.py b/src/plex_api_client/utils/logger.py new file mode 100644 index 0000000..b661aff --- /dev/null +++ b/src/plex_api_client/utils/logger.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Any, Protocol + + +class Logger(Protocol): + def debug(self, msg: str, *args: Any, **kwargs: Any) -> None: + pass + + +class NoOpLogger: + def debug(self, msg: str, *args: Any, **kwargs: Any) -> None: + pass + + +def get_body_content(req: httpx.Request) -> str: + return "" if not hasattr(req, "_content") else str(req.content) + + +def get_default_logger() -> Logger: + return NoOpLogger() diff --git a/src/plex_api_client/utils/metadata.py b/src/plex_api_client/utils/metadata.py new file mode 100644 index 0000000..173b3e5 --- /dev/null +++ b/src/plex_api_client/utils/metadata.py @@ -0,0 +1,118 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import Optional, Type, TypeVar, Union +from dataclasses import dataclass +from pydantic.fields import FieldInfo + + +T = TypeVar("T") + + +@dataclass +class SecurityMetadata: + option: bool = False + scheme: bool = False + scheme_type: Optional[str] = None + sub_type: Optional[str] = None + field_name: Optional[str] = None + + def get_field_name(self, default: str) -> str: + return self.field_name or default + + +@dataclass +class ParamMetadata: + serialization: Optional[str] = None + style: str = "simple" + explode: bool = False + + +@dataclass +class PathParamMetadata(ParamMetadata): + pass + + +@dataclass +class QueryParamMetadata(ParamMetadata): + style: str = "form" + explode: bool = True + + +@dataclass +class HeaderMetadata(ParamMetadata): + pass + + +@dataclass +class RequestMetadata: + media_type: str = "application/octet-stream" + + +@dataclass +class MultipartFormMetadata: + file: bool = False + content: bool = False + json: bool = False + + +@dataclass +class FormMetadata: + json: bool = False + style: str = "form" + explode: bool = True + + +class FieldMetadata: + security: Optional[SecurityMetadata] = None + path: Optional[PathParamMetadata] = None + query: Optional[QueryParamMetadata] = None + header: Optional[HeaderMetadata] = None + request: Optional[RequestMetadata] = None + form: Optional[FormMetadata] = None + multipart: Optional[MultipartFormMetadata] = None + + def __init__( + self, + security: Optional[SecurityMetadata] = None, + path: Optional[Union[PathParamMetadata, bool]] = None, + query: Optional[Union[QueryParamMetadata, bool]] = None, + header: Optional[Union[HeaderMetadata, bool]] = None, + request: Optional[Union[RequestMetadata, bool]] = None, + form: Optional[Union[FormMetadata, bool]] = None, + multipart: Optional[Union[MultipartFormMetadata, bool]] = None, + ): + self.security = security + self.path = PathParamMetadata() if isinstance(path, bool) else path + self.query = QueryParamMetadata() if isinstance(query, bool) else query + self.header = HeaderMetadata() if isinstance(header, bool) else header + self.request = RequestMetadata() if isinstance(request, bool) else request + self.form = FormMetadata() if isinstance(form, bool) else form + self.multipart = ( + MultipartFormMetadata() if isinstance(multipart, bool) else multipart + ) + + +def find_field_metadata(field_info: FieldInfo, metadata_type: Type[T]) -> Optional[T]: + metadata = find_metadata(field_info, FieldMetadata) + if not metadata: + return None + + fields = metadata.__dict__ + + for field in fields: + if isinstance(fields[field], metadata_type): + return fields[field] + + return None + + +def find_metadata(field_info: FieldInfo, metadata_type: Type[T]) -> Optional[T]: + metadata = field_info.metadata + if not metadata: + return None + + for md in metadata: + if isinstance(md, metadata_type): + return md + + return None diff --git a/src/plex_api_client/utils/queryparams.py b/src/plex_api_client/utils/queryparams.py new file mode 100644 index 0000000..37a6e7f --- /dev/null +++ b/src/plex_api_client/utils/queryparams.py @@ -0,0 +1,205 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import ( + Any, + Dict, + get_type_hints, + List, + Optional, +) + +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from .metadata import ( + QueryParamMetadata, + find_field_metadata, +) +from .values import ( + _get_serialized_params, + _is_set, + _populate_from_globals, + _val_to_string, +) +from .forms import _populate_form + + +def get_query_params( + query_params: Any, + gbls: Optional[Any] = None, +) -> Dict[str, List[str]]: + params: Dict[str, List[str]] = {} + + globals_already_populated = _populate_query_params(query_params, gbls, params, []) + if _is_set(gbls): + _populate_query_params(gbls, None, params, globals_already_populated) + + return params + + +def _populate_query_params( + query_params: Any, + gbls: Any, + query_param_values: Dict[str, List[str]], + skip_fields: List[str], +) -> List[str]: + globals_already_populated: List[str] = [] + + if not isinstance(query_params, BaseModel): + return globals_already_populated + + param_fields: Dict[str, FieldInfo] = query_params.__class__.model_fields + param_field_types = get_type_hints(query_params.__class__) + for name in param_fields: + if name in skip_fields: + continue + + field = param_fields[name] + + metadata = find_field_metadata(field, QueryParamMetadata) + if not metadata: + continue + + value = getattr(query_params, name) if _is_set(query_params) else None + + value, global_found = _populate_from_globals( + name, value, QueryParamMetadata, gbls + ) + if global_found: + globals_already_populated.append(name) + + f_name = field.alias if field.alias is not None else name + serialization = metadata.serialization + if serialization is not None: + serialized_parms = _get_serialized_params( + metadata, f_name, value, param_field_types[name] + ) + for key, value in serialized_parms.items(): + if key in query_param_values: + query_param_values[key].extend(value) + else: + query_param_values[key] = [value] + else: + style = metadata.style + if style == "deepObject": + _populate_deep_object_query_params(f_name, value, query_param_values) + elif style == "form": + _populate_delimited_query_params( + metadata, f_name, value, ",", query_param_values + ) + elif style == "pipeDelimited": + _populate_delimited_query_params( + metadata, f_name, value, "|", query_param_values + ) + else: + raise NotImplementedError( + f"query param style {style} not yet supported" + ) + + return globals_already_populated + + +def _populate_deep_object_query_params( + field_name: str, + obj: Any, + params: Dict[str, List[str]], +): + if not _is_set(obj): + return + + if isinstance(obj, BaseModel): + _populate_deep_object_query_params_basemodel(field_name, obj, params) + elif isinstance(obj, Dict): + _populate_deep_object_query_params_dict(field_name, obj, params) + + +def _populate_deep_object_query_params_basemodel( + prior_params_key: str, + obj: Any, + params: Dict[str, List[str]], +): + if not _is_set(obj) or not isinstance(obj, BaseModel): + return + + obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields + for name in obj_fields: + obj_field = obj_fields[name] + + f_name = obj_field.alias if obj_field.alias is not None else name + + params_key = f"{prior_params_key}[{f_name}]" + + obj_param_metadata = find_field_metadata(obj_field, QueryParamMetadata) + if not _is_set(obj_param_metadata): + continue + + obj_val = getattr(obj, name) + if not _is_set(obj_val): + continue + + if isinstance(obj_val, BaseModel): + _populate_deep_object_query_params_basemodel(params_key, obj_val, params) + elif isinstance(obj_val, Dict): + _populate_deep_object_query_params_dict(params_key, obj_val, params) + elif isinstance(obj_val, List): + _populate_deep_object_query_params_list(params_key, obj_val, params) + else: + params[params_key] = [_val_to_string(obj_val)] + + +def _populate_deep_object_query_params_dict( + prior_params_key: str, + value: Dict, + params: Dict[str, List[str]], +): + if not _is_set(value): + return + + for key, val in value.items(): + if not _is_set(val): + continue + + params_key = f"{prior_params_key}[{key}]" + + if isinstance(val, BaseModel): + _populate_deep_object_query_params_basemodel(params_key, val, params) + elif isinstance(val, Dict): + _populate_deep_object_query_params_dict(params_key, val, params) + elif isinstance(val, List): + _populate_deep_object_query_params_list(params_key, val, params) + else: + params[params_key] = [_val_to_string(val)] + + +def _populate_deep_object_query_params_list( + params_key: str, + value: List, + params: Dict[str, List[str]], +): + if not _is_set(value): + return + + for val in value: + if not _is_set(val): + continue + + if params.get(params_key) is None: + params[params_key] = [] + + params[params_key].append(_val_to_string(val)) + + +def _populate_delimited_query_params( + metadata: QueryParamMetadata, + field_name: str, + obj: Any, + delimiter: str, + query_param_values: Dict[str, List[str]], +): + _populate_form( + field_name, + metadata.explode, + obj, + delimiter, + query_param_values, + ) diff --git a/src/plex_api_client/utils/requestbodies.py b/src/plex_api_client/utils/requestbodies.py new file mode 100644 index 0000000..4f586ae --- /dev/null +++ b/src/plex_api_client/utils/requestbodies.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import io +from dataclasses import dataclass +import re +from typing import ( + Any, + Optional, +) + +from .forms import serialize_form_data, serialize_multipart_form + +from .serializers import marshal_json + +SERIALIZATION_METHOD_TO_CONTENT_TYPE = { + "json": "application/json", + "form": "application/x-www-form-urlencoded", + "multipart": "multipart/form-data", + "raw": "application/octet-stream", + "string": "text/plain", +} + + +@dataclass +class SerializedRequestBody: + media_type: str + content: Optional[Any] = None + data: Optional[Any] = None + files: Optional[Any] = None + + +def serialize_request_body( + request_body: Any, + nullable: bool, + optional: bool, + serialization_method: str, + request_body_type, +) -> Optional[SerializedRequestBody]: + if request_body is None: + if not nullable and optional: + return None + + media_type = SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method] + + serialized_request_body = SerializedRequestBody(media_type) + + if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None: + serialized_request_body.content = marshal_json(request_body, request_body_type) + elif re.match(r"multipart\/.*", media_type) is not None: + ( + serialized_request_body.media_type, + serialized_request_body.data, + serialized_request_body.files, + ) = serialize_multipart_form(media_type, request_body) + elif re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None: + serialized_request_body.data = serialize_form_data(request_body) + elif isinstance(request_body, (bytes, bytearray, io.BytesIO, io.BufferedReader)): + serialized_request_body.content = request_body + elif isinstance(request_body, str): + serialized_request_body.content = request_body + else: + raise TypeError( + f"invalid request body type {type(request_body)} for mediaType {media_type}" + ) + + return serialized_request_body diff --git a/src/plex_api_client/utils/retries.py b/src/plex_api_client/utils/retries.py new file mode 100644 index 0000000..4d60867 --- /dev/null +++ b/src/plex_api_client/utils/retries.py @@ -0,0 +1,217 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import asyncio +import random +import time +from typing import List + +import httpx + + +class BackoffStrategy: + initial_interval: int + max_interval: int + exponent: float + max_elapsed_time: int + + def __init__( + self, + initial_interval: int, + max_interval: int, + exponent: float, + max_elapsed_time: int, + ): + self.initial_interval = initial_interval + self.max_interval = max_interval + self.exponent = exponent + self.max_elapsed_time = max_elapsed_time + + +class RetryConfig: + strategy: str + backoff: BackoffStrategy + retry_connection_errors: bool + + def __init__( + self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool + ): + self.strategy = strategy + self.backoff = backoff + self.retry_connection_errors = retry_connection_errors + + +class Retries: + config: RetryConfig + status_codes: List[str] + + def __init__(self, config: RetryConfig, status_codes: List[str]): + self.config = config + self.status_codes = status_codes + + +class TemporaryError(Exception): + response: httpx.Response + + def __init__(self, response: httpx.Response): + self.response = response + + +class PermanentError(Exception): + inner: Exception + + def __init__(self, inner: Exception): + self.inner = inner + + +def retry(func, retries: Retries): + if retries.config.strategy == "backoff": + + def do_request() -> httpx.Response: + res: httpx.Response + try: + res = func() + + for code in retries.status_codes: + if "X" in code.upper(): + code_range = int(code[0]) + + status_major = res.status_code / 100 + + if code_range <= status_major < code_range + 1: + raise TemporaryError(res) + else: + parsed_code = int(code) + + if res.status_code == parsed_code: + raise TemporaryError(res) + except httpx.ConnectError as exception: + if retries.config.retry_connection_errors: + raise + + raise PermanentError(exception) from exception + except httpx.TimeoutException as exception: + if retries.config.retry_connection_errors: + raise + + raise PermanentError(exception) from exception + except TemporaryError: + raise + except Exception as exception: + raise PermanentError(exception) from exception + + return res + + return retry_with_backoff( + do_request, + retries.config.backoff.initial_interval, + retries.config.backoff.max_interval, + retries.config.backoff.exponent, + retries.config.backoff.max_elapsed_time, + ) + + return func() + + +async def retry_async(func, retries: Retries): + if retries.config.strategy == "backoff": + + async def do_request() -> httpx.Response: + res: httpx.Response + try: + res = await func() + + for code in retries.status_codes: + if "X" in code.upper(): + code_range = int(code[0]) + + status_major = res.status_code / 100 + + if code_range <= status_major < code_range + 1: + raise TemporaryError(res) + else: + parsed_code = int(code) + + if res.status_code == parsed_code: + raise TemporaryError(res) + except httpx.ConnectError as exception: + if retries.config.retry_connection_errors: + raise + + raise PermanentError(exception) from exception + except httpx.TimeoutException as exception: + if retries.config.retry_connection_errors: + raise + + raise PermanentError(exception) from exception + except TemporaryError: + raise + except Exception as exception: + raise PermanentError(exception) from exception + + return res + + return await retry_with_backoff_async( + do_request, + retries.config.backoff.initial_interval, + retries.config.backoff.max_interval, + retries.config.backoff.exponent, + retries.config.backoff.max_elapsed_time, + ) + + return await func() + + +def retry_with_backoff( + func, + initial_interval=500, + max_interval=60000, + exponent=1.5, + max_elapsed_time=3600000, +): + start = round(time.time() * 1000) + retries = 0 + + while True: + try: + return func() + except PermanentError as exception: + raise exception.inner + except Exception as exception: # pylint: disable=broad-exception-caught + now = round(time.time() * 1000) + if now - start > max_elapsed_time: + if isinstance(exception, TemporaryError): + return exception.response + + raise + sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) + sleep = min(sleep, max_interval / 1000) + time.sleep(sleep) + retries += 1 + + +async def retry_with_backoff_async( + func, + initial_interval=500, + max_interval=60000, + exponent=1.5, + max_elapsed_time=3600000, +): + start = round(time.time() * 1000) + retries = 0 + + while True: + try: + return await func() + except PermanentError as exception: + raise exception.inner + except Exception as exception: # pylint: disable=broad-exception-caught + now = round(time.time() * 1000) + if now - start > max_elapsed_time: + if isinstance(exception, TemporaryError): + return exception.response + + raise + sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) + sleep = min(sleep, max_interval / 1000) + await asyncio.sleep(sleep) + retries += 1 diff --git a/src/plex_api_client/utils/security.py b/src/plex_api_client/utils/security.py new file mode 100644 index 0000000..295a3f4 --- /dev/null +++ b/src/plex_api_client/utils/security.py @@ -0,0 +1,174 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import base64 +from typing import ( + Any, + Dict, + List, + Tuple, +) +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from .metadata import ( + SecurityMetadata, + find_field_metadata, +) + + +def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: + headers: Dict[str, str] = {} + query_params: Dict[str, List[str]] = {} + + if security is None: + return headers, query_params + + if not isinstance(security, BaseModel): + raise TypeError("security must be a pydantic model") + + sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields + for name in sec_fields: + sec_field = sec_fields[name] + + value = getattr(security, name) + if value is None: + continue + + metadata = find_field_metadata(sec_field, SecurityMetadata) + if metadata is None: + continue + if metadata.option: + _parse_security_option(headers, query_params, value) + return headers, query_params + if metadata.scheme: + # Special case for basic auth or custom auth which could be a flattened model + if metadata.sub_type in ["basic", "custom"] and not isinstance( + value, BaseModel + ): + _parse_security_scheme(headers, query_params, metadata, name, security) + else: + _parse_security_scheme(headers, query_params, metadata, name, value) + + return headers, query_params + + +def _parse_security_option( + headers: Dict[str, str], query_params: Dict[str, List[str]], option: Any +): + if not isinstance(option, BaseModel): + raise TypeError("security option must be a pydantic model") + + opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: + opt_field = opt_fields[name] + + metadata = find_field_metadata(opt_field, SecurityMetadata) + if metadata is None or not metadata.scheme: + continue + _parse_security_scheme( + headers, query_params, metadata, name, getattr(option, name) + ) + + +def _parse_security_scheme( + headers: Dict[str, str], + query_params: Dict[str, List[str]], + scheme_metadata: SecurityMetadata, + field_name: str, + scheme: Any, +): + scheme_type = scheme_metadata.scheme_type + sub_type = scheme_metadata.sub_type + + if isinstance(scheme, BaseModel): + if scheme_type == "http": + if sub_type == "basic": + _parse_basic_auth_scheme(headers, scheme) + return + if sub_type == "custom": + return + + scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields + for name in scheme_fields: + scheme_field = scheme_fields[name] + + metadata = find_field_metadata(scheme_field, SecurityMetadata) + if metadata is None or metadata.field_name is None: + continue + + value = getattr(scheme, name) + + _parse_security_scheme_value( + headers, query_params, scheme_metadata, metadata, name, value + ) + else: + _parse_security_scheme_value( + headers, query_params, scheme_metadata, scheme_metadata, field_name, scheme + ) + + +def _parse_security_scheme_value( + headers: Dict[str, str], + query_params: Dict[str, List[str]], + scheme_metadata: SecurityMetadata, + security_metadata: SecurityMetadata, + field_name: str, + value: Any, +): + scheme_type = scheme_metadata.scheme_type + sub_type = scheme_metadata.sub_type + + header_name = security_metadata.get_field_name(field_name) + + if scheme_type == "apiKey": + if sub_type == "header": + headers[header_name] = value + elif sub_type == "query": + query_params[header_name] = [value] + else: + raise ValueError("sub type {sub_type} not supported") + elif scheme_type == "openIdConnect": + headers[header_name] = _apply_bearer(value) + elif scheme_type == "oauth2": + if sub_type != "client_credentials": + headers[header_name] = _apply_bearer(value) + elif scheme_type == "http": + if sub_type == "bearer": + headers[header_name] = _apply_bearer(value) + elif sub_type == "custom": + return + else: + raise ValueError("sub type {sub_type} not supported") + else: + raise ValueError("scheme type {scheme_type} not supported") + + +def _apply_bearer(token: str) -> str: + return token.lower().startswith("bearer ") and token or f"Bearer {token}" + + +def _parse_basic_auth_scheme(headers: Dict[str, str], scheme: Any): + username = "" + password = "" + + if not isinstance(scheme, BaseModel): + raise TypeError("basic auth scheme must be a pydantic model") + + scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields + for name in scheme_fields: + scheme_field = scheme_fields[name] + + metadata = find_field_metadata(scheme_field, SecurityMetadata) + if metadata is None or metadata.field_name is None: + continue + + field_name = metadata.field_name + value = getattr(scheme, name) + + if field_name == "username": + username = value + if field_name == "password": + password = value + + data = f"{username}:{password}".encode() + headers["Authorization"] = f"Basic {base64.b64encode(data).decode()}" diff --git a/src/plex_api_client/utils/serializers.py b/src/plex_api_client/utils/serializers.py new file mode 100644 index 0000000..85d57f4 --- /dev/null +++ b/src/plex_api_client/utils/serializers.py @@ -0,0 +1,190 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from decimal import Decimal +import json +from typing import Any, Dict, List, Union, get_args +import httpx +from typing_extensions import get_origin +from pydantic import ConfigDict, create_model +from pydantic_core import from_json +from typing_inspect import is_optional_type + +from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset + + +def serialize_decimal(as_str: bool): + def serialize(d): + if is_optional_type(type(d)) and d is None: + return None + if isinstance(d, Unset): + return d + + if not isinstance(d, Decimal): + raise ValueError("Expected Decimal object") + + return str(d) if as_str else float(d) + + return serialize + + +def validate_decimal(d): + if d is None: + return None + + if isinstance(d, (Decimal, Unset)): + return d + + if not isinstance(d, (str, int, float)): + raise ValueError("Expected string, int or float") + + return Decimal(str(d)) + + +def serialize_float(as_str: bool): + def serialize(f): + if is_optional_type(type(f)) and f is None: + return None + if isinstance(f, Unset): + return f + + if not isinstance(f, float): + raise ValueError("Expected float") + + return str(f) if as_str else f + + return serialize + + +def validate_float(f): + if f is None: + return None + + if isinstance(f, (float, Unset)): + return f + + if not isinstance(f, str): + raise ValueError("Expected string") + + return float(f) + + +def serialize_int(as_str: bool): + def serialize(i): + if is_optional_type(type(i)) and i is None: + return None + if isinstance(i, Unset): + return i + + if not isinstance(i, int): + raise ValueError("Expected int") + + return str(i) if as_str else i + + return serialize + + +def validate_int(b): + if b is None: + return None + + if isinstance(b, (int, Unset)): + return b + + if not isinstance(b, str): + raise ValueError("Expected string") + + return int(b) + + +def validate_open_enum(is_int: bool): + def validate(e): + if e is None: + return None + + if isinstance(e, Unset): + return e + + if is_int: + if not isinstance(e, int): + raise ValueError("Expected int") + else: + if not isinstance(e, str): + raise ValueError("Expected string") + + return e + + return validate + + +def unmarshal_json(raw, typ: Any) -> Any: + return unmarshal(from_json(raw), typ) + + +def unmarshal(val, typ: Any) -> Any: + unmarshaller = create_model( + "Unmarshaller", + body=(typ, ...), + __config__=ConfigDict(populate_by_name=True, arbitrary_types_allowed=True), + ) + + m = unmarshaller(body=val) + + # pyright: ignore[reportAttributeAccessIssue] + return m.body # type: ignore + + +def marshal_json(val, typ): + if is_nullable(typ) and val is None: + return "null" + + marshaller = create_model( + "Marshaller", + body=(typ, ...), + __config__=ConfigDict(populate_by_name=True, arbitrary_types_allowed=True), + ) + + m = marshaller(body=val) + + d = m.model_dump(by_alias=True, mode="json", exclude_none=True) + + if len(d) == 0: + return "" + + return json.dumps(d[next(iter(d))], separators=(",", ":"), sort_keys=True) + + +def is_nullable(field): + origin = get_origin(field) + if origin is Nullable or origin is OptionalNullable: + return True + + if not origin is Union or type(None) not in get_args(field): + return False + + for arg in get_args(field): + if get_origin(arg) is Nullable or get_origin(arg) is OptionalNullable: + return True + + return False + + +def stream_to_text(stream: httpx.Response) -> str: + return "".join(stream.iter_text()) + + +def get_pydantic_model(data: Any, typ: Any) -> Any: + if not _contains_pydantic_model(data): + return unmarshal(data, typ) + + return data + + +def _contains_pydantic_model(data: Any) -> bool: + if isinstance(data, BaseModel): + return True + if isinstance(data, List): + return any(_contains_pydantic_model(item) for item in data) + if isinstance(data, Dict): + return any(_contains_pydantic_model(value) for value in data.values()) + + return False diff --git a/src/plex_api_client/utils/url.py b/src/plex_api_client/utils/url.py new file mode 100644 index 0000000..c78ccba --- /dev/null +++ b/src/plex_api_client/utils/url.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from decimal import Decimal +from typing import ( + Any, + Dict, + get_type_hints, + List, + Optional, + Union, + get_args, + get_origin, +) +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from .metadata import ( + PathParamMetadata, + find_field_metadata, +) +from .values import ( + _get_serialized_params, + _is_set, + _populate_from_globals, + _val_to_string, +) + + +def generate_url( + server_url: str, + path: str, + path_params: Any, + gbls: Optional[Any] = None, +) -> str: + path_param_values: Dict[str, str] = {} + + globals_already_populated = _populate_path_params( + path_params, gbls, path_param_values, [] + ) + if _is_set(gbls): + _populate_path_params(gbls, None, path_param_values, globals_already_populated) + + for key, value in path_param_values.items(): + path = path.replace("{" + key + "}", value, 1) + + return remove_suffix(server_url, "/") + path + + +def _populate_path_params( + path_params: Any, + gbls: Any, + path_param_values: Dict[str, str], + skip_fields: List[str], +) -> List[str]: + globals_already_populated: List[str] = [] + + if not isinstance(path_params, BaseModel): + return globals_already_populated + + path_param_fields: Dict[str, FieldInfo] = path_params.__class__.model_fields + path_param_field_types = get_type_hints(path_params.__class__) + for name in path_param_fields: + if name in skip_fields: + continue + + field = path_param_fields[name] + + param_metadata = find_field_metadata(field, PathParamMetadata) + if param_metadata is None: + continue + + param = getattr(path_params, name) if _is_set(path_params) else None + param, global_found = _populate_from_globals( + name, param, PathParamMetadata, gbls + ) + if global_found: + globals_already_populated.append(name) + + if not _is_set(param): + continue + + f_name = field.alias if field.alias is not None else name + serialization = param_metadata.serialization + if serialization is not None: + serialized_params = _get_serialized_params( + param_metadata, f_name, param, path_param_field_types[name] + ) + for key, value in serialized_params.items(): + path_param_values[key] = value + else: + pp_vals: List[str] = [] + if param_metadata.style == "simple": + if isinstance(param, List): + for pp_val in param: + if not _is_set(pp_val): + continue + pp_vals.append(_val_to_string(pp_val)) + path_param_values[f_name] = ",".join(pp_vals) + elif isinstance(param, Dict): + for pp_key in param: + if not _is_set(param[pp_key]): + continue + if param_metadata.explode: + pp_vals.append(f"{pp_key}={_val_to_string(param[pp_key])}") + else: + pp_vals.append(f"{pp_key},{_val_to_string(param[pp_key])}") + path_param_values[f_name] = ",".join(pp_vals) + elif not isinstance(param, (str, int, float, complex, bool, Decimal)): + param_fields: Dict[str, FieldInfo] = param.__class__.model_fields + for name in param_fields: + param_field = param_fields[name] + + param_value_metadata = find_field_metadata( + param_field, PathParamMetadata + ) + if param_value_metadata is None: + continue + + param_name = ( + param_field.alias if param_field.alias is not None else name + ) + + param_field_val = getattr(param, name) + if not _is_set(param_field_val): + continue + if param_metadata.explode: + pp_vals.append( + f"{param_name}={_val_to_string(param_field_val)}" + ) + else: + pp_vals.append( + f"{param_name},{_val_to_string(param_field_val)}" + ) + path_param_values[f_name] = ",".join(pp_vals) + elif _is_set(param): + path_param_values[f_name] = _val_to_string(param) + + return globals_already_populated + + +def is_optional(field): + return get_origin(field) is Union and type(None) in get_args(field) + + +def template_url(url_with_params: str, params: Dict[str, str]) -> str: + for key, value in params.items(): + url_with_params = url_with_params.replace("{" + key + "}", value) + + return url_with_params + + +def remove_suffix(input_string, suffix): + if suffix and input_string.endswith(suffix): + return input_string[: -len(suffix)] + return input_string diff --git a/src/plex_api_client/utils/values.py b/src/plex_api_client/utils/values.py new file mode 100644 index 0000000..2b4b683 --- /dev/null +++ b/src/plex_api_client/utils/values.py @@ -0,0 +1,134 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from datetime import datetime +from enum import Enum +from email.message import Message +import os +from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union + +from httpx import Response +from pydantic import BaseModel +from pydantic.fields import FieldInfo + +from ..types.basemodel import Unset + +from .serializers import marshal_json + +from .metadata import ParamMetadata, find_field_metadata + + +def match_content_type(content_type: str, pattern: str) -> bool: + if pattern in (content_type, "*", "*/*"): + return True + + msg = Message() + msg["content-type"] = content_type + media_type = msg.get_content_type() + + if media_type == pattern: + return True + + parts = media_type.split("/") + if len(parts) == 2: + if pattern in (f"{parts[0]}/*", f"*/{parts[1]}"): + return True + + return False + + +def match_status_codes(status_codes: List[str], status_code: int) -> bool: + if "default" in status_codes: + return True + + for code in status_codes: + if code == str(status_code): + return True + + if code.endswith("XX") and code.startswith(str(status_code)[:1]): + return True + return False + + +T = TypeVar("T") + + +def get_global_from_env( + value: Optional[T], env_key: str, type_cast: Callable[[str], T] +) -> Optional[T]: + if value is not None: + return value + env_value = os.getenv(env_key) + if env_value is not None: + try: + return type_cast(env_value) + except ValueError: + pass + return None + + +def match_response( + response: Response, code: Union[str, List[str]], content_type: str +) -> bool: + codes = code if isinstance(code, list) else [code] + return match_status_codes(codes, response.status_code) and match_content_type( + response.headers.get("content-type", "application/octet-stream"), content_type + ) + + +def _populate_from_globals( + param_name: str, value: Any, param_metadata_type: type, gbls: Any +) -> Tuple[Any, bool]: + if gbls is None: + return value, False + + if not isinstance(gbls, BaseModel): + raise TypeError("globals must be a pydantic model") + + global_fields: Dict[str, FieldInfo] = gbls.__class__.model_fields + found = False + for name in global_fields: + field = global_fields[name] + if name is not param_name: + continue + + found = True + + if value is not None: + return value, True + + global_value = getattr(gbls, name) + + param_metadata = find_field_metadata(field, param_metadata_type) + if param_metadata is None: + return value, True + + return global_value, True + + return value, found + + +def _val_to_string(val) -> str: + if isinstance(val, bool): + return str(val).lower() + if isinstance(val, datetime): + return str(val.isoformat().replace("+00:00", "Z")) + if isinstance(val, Enum): + return str(val.value) + + return str(val) + + +def _get_serialized_params( + metadata: ParamMetadata, field_name: str, obj: Any, typ: type +) -> Dict[str, str]: + params: Dict[str, str] = {} + + serialization = metadata.serialization + if serialization == "json": + params[field_name] = marshal_json(obj, typ) + + return params + + +def _is_set(value: Any) -> bool: + return value is not None and not isinstance(value, Unset) diff --git a/src/plex_api_client/video.py b/src/plex_api_client/video.py new file mode 100644 index 0000000..b027150 --- /dev/null +++ b/src/plex_api_client/video.py @@ -0,0 +1,406 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Video(BaseSDK): + r"""API Calls that perform operations with Plex Media Server Videos""" + + def get_timeline( + self, + *, + request: Union[ + operations.GetTimelineRequest, operations.GetTimelineRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTimelineResponse: + r"""Get the timeline for a media item + + Get the timeline for a media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetTimelineRequest) + request = cast(operations.GetTimelineRequest, request) + + req = self.build_request( + method="GET", + path="/:/timeline", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="getTimeline", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetTimelineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTimelineResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTimelineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTimelineVideoResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTimelineVideoResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_timeline_async( + self, + *, + request: Union[ + operations.GetTimelineRequest, operations.GetTimelineRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetTimelineResponse: + r"""Get the timeline for a media item + + Get the timeline for a media item + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetTimelineRequest) + request = cast(operations.GetTimelineRequest, request) + + req = self.build_request_async( + method="GET", + path="/:/timeline", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="getTimeline", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.GetTimelineResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTimelineResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTimelineResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetTimelineVideoResponseBodyData + ) + data.raw_response = http_res + raise errors.GetTimelineVideoResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + def start_universal_transcode( + self, + *, + request: Union[ + operations.StartUniversalTranscodeRequest, + operations.StartUniversalTranscodeRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartUniversalTranscodeResponse: + r"""Start Universal Transcode + + Begin a Universal Transcode Session + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.StartUniversalTranscodeRequest + ) + request = cast(operations.StartUniversalTranscodeRequest, request) + + req = self.build_request( + method="GET", + path="/video/:/transcode/universal/start.mpd", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="startUniversalTranscode", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StartUniversalTranscodeResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartUniversalTranscodeResponseBodyData + ) + data.raw_response = http_res + raise errors.StartUniversalTranscodeResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartUniversalTranscodeVideoResponseBodyData + ) + data.raw_response = http_res + raise errors.StartUniversalTranscodeVideoResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def start_universal_transcode_async( + self, + *, + request: Union[ + operations.StartUniversalTranscodeRequest, + operations.StartUniversalTranscodeRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.StartUniversalTranscodeResponse: + r"""Start Universal Transcode + + Begin a Universal Transcode Session + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.StartUniversalTranscodeRequest + ) + request = cast(operations.StartUniversalTranscodeRequest, request) + + req = self.build_request_async( + method="GET", + path="/video/:/transcode/universal/start.mpd", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="startUniversalTranscode", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.StartUniversalTranscodeResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartUniversalTranscodeResponseBodyData + ) + data.raw_response = http_res + raise errors.StartUniversalTranscodeResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.StartUniversalTranscodeVideoResponseBodyData + ) + data.raw_response = http_res + raise errors.StartUniversalTranscodeVideoResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) diff --git a/src/plex_api_client/watchlist.py b/src/plex_api_client/watchlist.py new file mode 100644 index 0000000..f650d77 --- /dev/null +++ b/src/plex_api_client/watchlist.py @@ -0,0 +1,216 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from plex_api_client import utils +from plex_api_client._hooks import HookContext +from plex_api_client.models import errors, operations +from plex_api_client.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Optional, Union, cast + + +class Watchlist(BaseSDK): + r"""API Calls that perform operations with Plex Media Server Watchlists""" + + def get_watch_list( + self, + *, + request: Union[ + operations.GetWatchListRequest, operations.GetWatchListRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetWatchListResponse: + r"""Get User Watchlist + + Get User Watchlist + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_WATCH_LIST_SERVERS[0] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetWatchListRequest) + request = cast(operations.GetWatchListRequest, request) + + req = self.build_request( + method="GET", + path="/library/sections/watchlist/{filter}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="get-watch-list", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetWatchListResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetWatchListResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetWatchListResponseBodyData + ) + data.raw_response = http_res + raise errors.GetWatchListResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetWatchListWatchlistResponseBodyData + ) + data.raw_response = http_res + raise errors.GetWatchListWatchlistResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def get_watch_list_async( + self, + *, + request: Union[ + operations.GetWatchListRequest, operations.GetWatchListRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> operations.GetWatchListResponse: + r"""Get User Watchlist + + Get User Watchlist + + :param request: The request object to send. + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.GET_WATCH_LIST_SERVERS[0] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetWatchListRequest) + request = cast(operations.GetWatchListRequest, request) + + req = self.build_request_async( + method="GET", + path="/library/sections/watchlist/{filter}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="get-watch-list", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetWatchListResponse( + object=utils.unmarshal_json( + http_res.text, Optional[operations.GetWatchListResponseBody] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetWatchListResponseBodyData + ) + data.raw_response = http_res + raise errors.GetWatchListResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GetWatchListWatchlistResponseBodyData + ) + data.raw_response = http_res + raise errors.GetWatchListWatchlistResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + )