diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 34ed30c..8043ee8 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: aa9449e7-c19d-411d-b8e2-f9c5fe982f6f management: - docChecksum: 911d74baa0d06121d2ce2c71d94e977a + docChecksum: 37654ea0982ab5e87a9a9576014c9d19 docVersion: 0.0.3 - speakeasyVersion: 1.299.6 - generationVersion: 2.338.12 - releaseVersion: 0.1.6 - configChecksum: 4833578ad426e3f5e12fb312da9df6fb + speakeasyVersion: 1.308.1 + generationVersion: 2.342.6 + releaseVersion: 0.2.0 + configChecksum: 1507274669f173a15fcb7c909dcf9110 repoURL: https://github.com/LukeHagar/plexruby.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexruby @@ -19,6 +19,7 @@ features: globals: 2.82.1 methodServerURLs: 2.82.1 nameOverrides: 2.81.2 + typeOverrides: 2.81.1 generatedFiles: - lib/open_api_sdk/sdkconfiguration.rb - lib/open_api_sdk/server.rb @@ -26,16 +27,17 @@ generatedFiles: - lib/open_api_sdk/video.rb - lib/open_api_sdk/activities.rb - lib/open_api_sdk/butler.rb + - lib/open_api_sdk/plex.rb - lib/open_api_sdk/hubs.rb - lib/open_api_sdk/search.rb - lib/open_api_sdk/library.rb - lib/open_api_sdk/log.rb - - lib/open_api_sdk/plex.rb - lib/open_api_sdk/playlists.rb - lib/open_api_sdk/authentication.rb - lib/open_api_sdk/statistics.rb - lib/open_api_sdk/sessions.rb - lib/open_api_sdk/updater.rb + - lib/open_api_sdk/watchlist.rb - lib/open_api_sdk/plex_api.rb - lib/open_api_sdk/server_variables/server_protocol.rb - lib/open_api_sdk/server_variables.rb @@ -187,6 +189,22 @@ generatedFiles: - lib/open_api_sdk/models/operations/stoptask_errors.rb - lib/open_api_sdk/models/operations/stoptask_responsebody.rb - lib/open_api_sdk/models/operations/stoptask_response.rb + - lib/open_api_sdk/models/operations/gethomedata_errors.rb + - lib/open_api_sdk/models/operations/gethomedata_plex_responsebody.rb + - lib/open_api_sdk/models/operations/gethomedata_responsebody.rb + - lib/open_api_sdk/models/operations/gethomedata_response.rb + - lib/open_api_sdk/models/operations/getpin_request.rb + - lib/open_api_sdk/models/operations/getpin_errors.rb + - lib/open_api_sdk/models/operations/getpin_plex_responsebody.rb + - lib/open_api_sdk/models/operations/location.rb + - lib/open_api_sdk/models/operations/getpin_responsebody.rb + - lib/open_api_sdk/models/operations/getpin_response.rb + - lib/open_api_sdk/models/operations/gettoken_request.rb + - lib/open_api_sdk/models/operations/gettoken_errors.rb + - lib/open_api_sdk/models/operations/gettoken_plex_responsebody.rb + - lib/open_api_sdk/models/operations/gettoken_location.rb + - lib/open_api_sdk/models/operations/gettoken_responsebody.rb + - lib/open_api_sdk/models/operations/gettoken_response.rb - lib/open_api_sdk/models/operations/onlytransient.rb - lib/open_api_sdk/models/operations/getglobalhubs_request.rb - lib/open_api_sdk/models/operations/getglobalhubs_errors.rb @@ -248,7 +266,7 @@ generatedFiles: - lib/open_api_sdk/models/operations/writer.rb - lib/open_api_sdk/models/operations/country.rb - lib/open_api_sdk/models/operations/role.rb - - lib/open_api_sdk/models/operations/metadata.rb + - lib/open_api_sdk/models/operations/getrecentlyadded_metadata.rb - lib/open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb - lib/open_api_sdk/models/operations/getrecentlyadded_responsebody.rb - lib/open_api_sdk/models/operations/getrecentlyadded_response.rb @@ -264,7 +282,7 @@ generatedFiles: - lib/open_api_sdk/models/operations/getlibrary_errors.rb - lib/open_api_sdk/models/operations/getlibrary_library_responsebody.rb - lib/open_api_sdk/models/operations/getlibrary_directory.rb - - lib/open_api_sdk/models/operations/filter.rb + - lib/open_api_sdk/models/operations/getlibrary_filter.rb - lib/open_api_sdk/models/operations/sort.rb - lib/open_api_sdk/models/operations/field.rb - lib/open_api_sdk/models/operations/getlibrary_type.rb @@ -351,16 +369,6 @@ generatedFiles: - lib/open_api_sdk/models/operations/enablepapertrail_errors.rb - lib/open_api_sdk/models/operations/enablepapertrail_responsebody.rb - lib/open_api_sdk/models/operations/enablepapertrail_response.rb - - lib/open_api_sdk/models/operations/getpin_request.rb - - lib/open_api_sdk/models/operations/getpin_errors.rb - - lib/open_api_sdk/models/operations/getpin_plex_responsebody.rb - - lib/open_api_sdk/models/operations/location.rb - - lib/open_api_sdk/models/operations/getpin_responsebody.rb - - lib/open_api_sdk/models/operations/getpin_response.rb - - lib/open_api_sdk/models/operations/gettoken_request.rb - - lib/open_api_sdk/models/operations/gettoken_errors.rb - - lib/open_api_sdk/models/operations/gettoken_responsebody.rb - - lib/open_api_sdk/models/operations/gettoken_response.rb - lib/open_api_sdk/models/operations/queryparam_type.rb - lib/open_api_sdk/models/operations/smart.rb - lib/open_api_sdk/models/operations/createplaylist_request.rb @@ -488,6 +496,17 @@ generatedFiles: - lib/open_api_sdk/models/operations/applyupdates_errors.rb - lib/open_api_sdk/models/operations/applyupdates_responsebody.rb - lib/open_api_sdk/models/operations/applyupdates_response.rb + - lib/open_api_sdk/models/operations/filter.rb + - lib/open_api_sdk/models/operations/libtype.rb + - lib/open_api_sdk/models/operations/includecollections.rb + - lib/open_api_sdk/models/operations/includeexternalmedia.rb + - lib/open_api_sdk/models/operations/getwatchlist_request.rb + - lib/open_api_sdk/models/operations/getwatchlist_errors.rb + - lib/open_api_sdk/models/operations/getwatchlist_watchlist_responsebody.rb + - lib/open_api_sdk/models/operations/image.rb + - lib/open_api_sdk/models/operations/metadata.rb + - lib/open_api_sdk/models/operations/getwatchlist_responsebody.rb + - lib/open_api_sdk/models/operations/getwatchlist_response.rb - lib/open_api_sdk/models/shared/security.rb - lib/plexruby.rb - lib/open_api_sdk/models/operations.rb @@ -592,6 +611,22 @@ generatedFiles: - docs/models/operations/stoptaskerrors.md - docs/models/operations/stoptaskresponsebody.md - docs/models/operations/stoptaskresponse.md + - docs/models/operations/gethomedataerrors.md + - docs/models/operations/gethomedataplexresponsebody.md + - docs/models/operations/gethomedataresponsebody.md + - docs/models/operations/gethomedataresponse.md + - docs/models/operations/getpinrequest.md + - docs/models/operations/getpinerrors.md + - docs/models/operations/getpinplexresponsebody.md + - docs/models/operations/location.md + - docs/models/operations/getpinresponsebody.md + - docs/models/operations/getpinresponse.md + - docs/models/operations/gettokenrequest.md + - docs/models/operations/gettokenerrors.md + - docs/models/operations/gettokenplexresponsebody.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/getglobalhubserrors.md @@ -653,7 +688,7 @@ generatedFiles: - docs/models/operations/writer.md - docs/models/operations/country.md - docs/models/operations/role.md - - docs/models/operations/metadata.md + - docs/models/operations/getrecentlyaddedmetadata.md - docs/models/operations/getrecentlyaddedmediacontainer.md - docs/models/operations/getrecentlyaddedresponsebody.md - docs/models/operations/getrecentlyaddedresponse.md @@ -669,7 +704,7 @@ generatedFiles: - docs/models/operations/getlibraryerrors.md - docs/models/operations/getlibrarylibraryresponsebody.md - docs/models/operations/getlibrarydirectory.md - - docs/models/operations/filter.md + - docs/models/operations/getlibraryfilter.md - docs/models/operations/sort.md - docs/models/operations/field.md - docs/models/operations/getlibrarytype.md @@ -756,16 +791,6 @@ generatedFiles: - docs/models/operations/enablepapertrailerrors.md - docs/models/operations/enablepapertrailresponsebody.md - docs/models/operations/enablepapertrailresponse.md - - docs/models/operations/getpinrequest.md - - docs/models/operations/getpinerrors.md - - docs/models/operations/getpinplexresponsebody.md - - docs/models/operations/location.md - - docs/models/operations/getpinresponsebody.md - - docs/models/operations/getpinresponse.md - - docs/models/operations/gettokenrequest.md - - docs/models/operations/gettokenerrors.md - - docs/models/operations/gettokenresponsebody.md - - docs/models/operations/gettokenresponse.md - docs/models/operations/queryparamtype.md - docs/models/operations/smart.md - docs/models/operations/createplaylistrequest.md @@ -893,6 +918,17 @@ generatedFiles: - docs/models/operations/applyupdateserrors.md - docs/models/operations/applyupdatesresponsebody.md - docs/models/operations/applyupdatesresponse.md + - docs/models/operations/filter.md + - docs/models/operations/libtype.md + - docs/models/operations/includecollections.md + - docs/models/operations/includeexternalmedia.md + - docs/models/operations/getwatchlistrequest.md + - docs/models/operations/getwatchlisterrors.md + - docs/models/operations/getwatchlistwatchlistresponsebody.md + - docs/models/operations/image.md + - docs/models/operations/metadata.md + - docs/models/operations/getwatchlistresponsebody.md + - docs/models/operations/getwatchlistresponse.md - docs/models/shared/security.md - docs/sdks/plexapi/README.md - docs/sdks/server/README.md @@ -900,15 +936,16 @@ generatedFiles: - docs/sdks/video/README.md - docs/sdks/activities/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/plex/README.md - docs/sdks/playlists/README.md - docs/sdks/authentication/README.md - docs/sdks/statistics/README.md - docs/sdks/sessions/README.md - docs/sdks/updater/README.md + - docs/sdks/watchlist/README.md - USAGE.md - .gitattributes diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 83b7757..5d28452 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false ruby: - version: 0.1.6 + version: 0.2.0 author: LukeHagar description: Ruby Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a2e4c14..79d088c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.307.2 +speakeasyVersion: 1.308.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:1fb54e0e5060ef11d38b61b2850254abe81c1dfb5f92c8bfce5ca7ac334d9239 - sourceBlobDigest: sha256:c79924ed898c204768ce528c00e4595fed0da40be721efbda272539bb78e1865 + sourceRevisionDigest: sha256:5c2694e50c805bcd104bcb6db2601ce3897b82b689c6d61e23c7d564e4890057 + sourceBlobDigest: sha256:06bfe3cb8d54a54a5f409360ac3525d040838460fbd456568e714603183d7593 tags: - latest - main @@ -11,8 +11,8 @@ targets: plexruby: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:1fb54e0e5060ef11d38b61b2850254abe81c1dfb5f92c8bfce5ca7ac334d9239 - sourceBlobDigest: sha256:c79924ed898c204768ce528c00e4595fed0da40be721efbda272539bb78e1865 + sourceRevisionDigest: sha256:5c2694e50c805bcd104bcb6db2601ce3897b82b689c6d61e23c7d564e4890057 + sourceBlobDigest: sha256:06bfe3cb8d54a54a5f409360ac3525d040838460fbd456568e714603183d7593 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/Gemfile.lock b/Gemfile.lock index 793c161..81a7f2e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - plexruby (0.1.6) + plexruby (0.2.0) faraday faraday-multipart rack diff --git a/README.md b/README.md index 699fa9e..dae5acd 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,12 @@ end * [start_task](docs/sdks/butler/README.md#start_task) - Start a single Butler task * [stop_task](docs/sdks/butler/README.md#stop_task) - Stop a single Butler task +### [Plex](docs/sdks/plex/README.md) + +* [get_home_data](docs/sdks/plex/README.md#get_home_data) - Get Plex Home Data +* [get_pin](docs/sdks/plex/README.md#get_pin) - Get a Pin +* [get_token](docs/sdks/plex/README.md#get_token) - Get Access Token + ### [Hubs](docs/sdks/hubs/README.md) * [get_global_hubs](docs/sdks/hubs/README.md#get_global_hubs) - Get Global Hubs @@ -113,11 +119,6 @@ end * [log_multi_line](docs/sdks/log/README.md#log_multi_line) - Logging a multi-line message * [enable_paper_trail](docs/sdks/log/README.md#enable_paper_trail) - Enabling Papertrail -### [Plex](docs/sdks/plex/README.md) - -* [get_pin](docs/sdks/plex/README.md#get_pin) - Get a Pin -* [get_token](docs/sdks/plex/README.md#get_token) - Get Access Token - ### [Playlists](docs/sdks/playlists/README.md) * [create_playlist](docs/sdks/playlists/README.md#create_playlist) - Create a Playlist @@ -151,6 +152,10 @@ end * [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 @@ -192,9 +197,9 @@ s = ::OpenApiSDK::PlexAPI.new( ) -res = s.plex.get_pin(server_url: "https://plex.tv/api/v2", strong=false, x_plex_client_identifier="Postman") +res = s.plex.get_pin(server_url: "https://plex.tv/api/v2", x_plex_product="Postman", strong=false, x_plex_client_identifier="Postman") -if ! res.two_hundred_application_json_object.nil? +if ! res.two_hundred_and_one_application_json_object.nil? # handle response end @@ -232,9 +237,9 @@ s = ::OpenApiSDK::PlexAPI.new( ) -res = s.plex.get_pin(strong=false, x_plex_client_identifier="Postman") +res = s.plex.get_pin(x_plex_product="Postman", strong=false, x_plex_client_identifier="Postman") -if ! res.two_hundred_application_json_object.nil? +if ! res.two_hundred_and_one_application_json_object.nil? # handle response end diff --git a/RELEASES.md b/RELEASES.md index abd9de4..9e03483 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -390,4 +390,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.307.2 (2.342.2) https://github.com/speakeasy-api/speakeasy ### Generated -- [ruby v0.1.6] . \ No newline at end of file +- [ruby v0.1.6] . + +## 2024-06-15 00:10:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.308.1 (2.342.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v0.2.0] . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index e1e5081..cd44121 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,72 +3,270 @@ info: title: CodeSamples overlay for ruby target version: 0.0.0 actions: - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getPlaylistContents - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist_contents(playlist_id=5004.46, type=9403.59)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/butler"]["delete"] - update: - x-codeSamples: - - lang: ruby - label: stopAllTasks - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_all_tasks()\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/hubs"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getGlobalHubs - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_global_hubs(count=1262.49, only_transient=::OpenApiSDK::Operations::OnlyTransient::ONE)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/recentlyAdded"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getRecentlyAdded - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_recently_added()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getLibrary - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library(section_id=1000.0, include_details=::OpenApiSDK::Operations::IncludeDetails::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getMetadataChildren - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata_children(rating_key=1539.14)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: ruby - label: getPin - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\n\n \nres = s.plex.get_pin(strong=false, x_plex_client_identifier=\"Postman\")\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/playlists"]["post"] - update: - x-codeSamples: - - lang: ruby - label: createPlaylist - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreatePlaylistRequest.new(\n title: \"\",\n type: ::OpenApiSDK::Operations::QueryParamType::PHOTO,\n smart: ::OpenApiSDK::Operations::Smart::ONE,\n uri: \"https://inborn-brochure.biz\",\n)\n \nres = s.playlists.create_playlist(req)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/status/sessions"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getSessions - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_sessions()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - target: $["paths"]["/"]["get"] update: x-codeSamples: - lang: ruby label: getServerCapabilities source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_capabilities()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/home"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getHomeData + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_home_data()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getMetadataChildren + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata_children(rating_key=1539.14)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/butler/{taskName}"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: stopTask + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_task(task_name=::OpenApiSDK::Operations::PathParamTaskName::BACKUP_DATABASE)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/library/hashes"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getFileHash + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_file_hash(url=\"file://C:\\Image.png&type=13\", type=4462.17)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] + update: + x-codeSamples: + - lang: ruby + label: refreshLibrary + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.refresh_library(section_id=934.16)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/security/token"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getTransientToken + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_transient_token(type=::OpenApiSDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::OpenApiSDK::Operations::Scope::ALL)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/transcode/sessions"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getTranscodeSessions + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_transcode_sessions()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/identity"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getServerIdentity + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_identity()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/:/unscrobble"]["get"] + update: + x-codeSamples: + - lang: ruby + label: markUnplayed + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.mark_unplayed(key=59398.0)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/activities/{activityUUID}"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: cancelServerActivities + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.cancel_server_activities(activity_uuid=\"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\")\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/hubs"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getGlobalHubs + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_global_hubs(count=1262.49, only_transient=::OpenApiSDK::Operations::OnlyTransient::ONE)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/playlists/{playlistID}"]["put"] + update: + x-codeSamples: + - lang: ruby + label: updatePlaylist + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.update_playlist(playlist_id=3915, title=\"\", summary=\"\")\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: stopTranscodeSession + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.stop_transcode_session(session_key=\"zz7llzqlx8w9vnrsbnwhbmep\")\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/butler"]["post"] + update: + x-codeSamples: + - lang: ruby + label: startAllTasks + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_all_tasks()\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/log"]["post"] + update: + x-codeSamples: + - lang: ruby + label: logMultiLine + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = \"level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman\"\n \nres = s.log.log_multi_line(req)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getWatchlist + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetWatchlistRequest.new(\n filter: ::OpenApiSDK::Operations::Filter::RELEASED,\n x_plex_token: \"\",\n)\n \nres = s.watchlist.get_watchlist(req)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/butler"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getButlerTasks + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.get_butler_tasks()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/pins"]["post"] + update: + x-codeSamples: + - lang: ruby + label: getPin + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\n\n \nres = s.plex.get_pin(x_plex_product=\"Postman\", strong=false, x_plex_client_identifier=\"Postman\")\n\nif ! res.two_hundred_and_one_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/sections/{sectionId}/{tag}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getLibraryItems + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library_items(section_id=\"\", tag=::OpenApiSDK::Operations::Tag::GENRE)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/devices"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getDevices + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_devices()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/hubs/search/voice"]["get"] + update: + x-codeSamples: + - lang: ruby + label: performVoiceSearch + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_voice_search(query=\"dead+poop\", section_id=4094.8, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/library/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getLibrary + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library(section_id=1000.0, include_details=::OpenApiSDK::Operations::IncludeDetails::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/status/sessions/history/all"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getSessionHistory + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_session_history()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/playlists"]["post"] + update: + x-codeSamples: + - lang: ruby + label: createPlaylist + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreatePlaylistRequest.new(\n title: \"\",\n type: ::OpenApiSDK::Operations::QueryParamType::PHOTO,\n smart: ::OpenApiSDK::Operations::Smart::ONE,\n uri: \"https://inborn-brochure.biz\",\n)\n \nres = s.playlists.create_playlist(req)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/servers"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getServerList + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_list()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getLibraryHubs + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=::OpenApiSDK::Operations::QueryParamOnlyTransient::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/recentlyAdded"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getRecentlyAdded + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_recently_added()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/sections"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getLibraries + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_libraries()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getMetadata + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata(rating_key=8382.31)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getPlaylistContents + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist_contents(playlist_id=5004.46, type=9403.59)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/security/resources"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getSourceConnectionInformation + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_source_connection_information(source=\"server://client-identifier\")\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] update: x-codeSamples: - lang: ruby label: startUniversalTranscode source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::StartUniversalTranscodeRequest.new(\n has_mde: 1.0,\n path: \"/library/metadata/23409\",\n media_index: 0.0,\n part_index: 0.0,\n protocol: \"hls\",\n fast_seek: 0.0,\n direct_play: 0.0,\n direct_stream: 0.0,\n subtitle_size: 100.0,\n subtites: \"burn\",\n audio_boost: 100.0,\n location: \"lan\",\n media_buffer_size: 102400.0,\n session: \"zvcage8b7rkioqcm8f4uns4c\",\n add_debug_overlay: 0.0,\n auto_adjust_quality: 0.0,\n)\n \nres = s.video.start_universal_transcode(req)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/butler/{taskName}"]["post"] + update: + x-codeSamples: + - lang: ruby + label: startTask + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_task(task_name=::OpenApiSDK::Operations::TaskName::CLEAN_OLD_BUNDLES)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/pins/{pinID}"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getToken + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\n\n \nres = s.plex.get_token(pin_id=\"\", x_plex_client_identifier=\"Postman\")\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/playlists/{playlistID}"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: deletePlaylist + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.delete_playlist(playlist_id=216.22)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: clearPlaylistContents + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.clear_playlist_contents(playlist_id=1893.18)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/status/sessions"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getSessions + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_sessions()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/clients"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getAvailableClients + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_available_clients()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] + update: + x-codeSamples: + - lang: ruby + label: searchLibrary + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.search_library(section_id=933505, type=::OpenApiSDK::Operations::Type::FOUR)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/:/prefs"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getServerPreferences + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_preferences()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/:/scrobble"]["get"] + update: + x-codeSamples: + - lang: ruby + label: markPlayed + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.mark_played(key=59398.0)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/:/progress"]["post"] + update: + x-codeSamples: + - lang: ruby + label: updatePlayProgress + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.update_play_progress(key=\"\", time=90000.0, state=\"played\")\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/butler"]["delete"] + update: + x-codeSamples: + - lang: ruby + label: stopAllTasks + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_all_tasks()\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/library/onDeck"]["get"] update: x-codeSamples: @@ -81,54 +279,48 @@ actions: - lang: ruby label: enablePaperTrail source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.log.enable_paper_trail()\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/playlists"]["get"] + - target: $["paths"]["/statistics/media"]["get"] update: x-codeSamples: - lang: ruby - label: getPlaylists - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlists(playlist_type=::OpenApiSDK::Operations::PlaylistType::AUDIO, smart=::OpenApiSDK::Operations::QueryParamSmart::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + label: getStatistics + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_statistics(timespan=4)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/activities"]["get"] + update: + x-codeSamples: + - lang: ruby + label: getServerActivities + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.get_server_activities()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/hubs/search"]["get"] + update: + x-codeSamples: + - lang: ruby + label: performSearch + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_search(query=\"dylan\", section_id=1516.53, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/playlists/{playlistID}/items"]["put"] update: x-codeSamples: - lang: ruby label: addPlaylistContents source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.add_playlist_contents(playlist_id=8502.01, uri=\"server://12345/com.plexapp.plugins.library/library/metadata/1\", play_queue_id=123.0)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/devices"]["get"] + - target: $["paths"]["/updater/status"]["get"] update: x-codeSamples: - lang: ruby - label: getDevices - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_devices()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] + label: getUpdateStatus + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.get_update_status()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + - target: $["paths"]["/updater/check"]["put"] update: x-codeSamples: - lang: ruby - label: searchLibrary - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.search_library(section_id=933505, type=::OpenApiSDK::Operations::Type::FOUR)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/butler"]["get"] + label: checkForUpdates + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.check_for_updates(download=::OpenApiSDK::Operations::Download::ONE)\n\nif res.status_code == 200\n # handle response\nend" + - target: $["paths"]["/updater/apply"]["put"] update: x-codeSamples: - lang: ruby - label: getButlerTasks - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.get_butler_tasks()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/log"]["post"] - update: - x-codeSamples: - - lang: ruby - label: logMultiLine - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = \"level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman\"\n \nres = s.log.log_multi_line(req)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/status/sessions/history/all"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getSessionHistory - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_session_history()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/myplex/account"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getMyPlexAccount - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_my_plex_account()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + label: applyUpdates + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.apply_updates(tonight=::OpenApiSDK::Operations::Tonight::ONE, skip=::OpenApiSDK::Operations::Skip::ZERO)\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/photo/:/transcode"]["get"] update: x-codeSamples: @@ -141,102 +333,30 @@ actions: - lang: ruby label: getTimeline source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetTimelineRequest.new(\n rating_key: 23409.0,\n key: \"/library/metadata/23409\",\n state: ::OpenApiSDK::Operations::State::PLAYING,\n has_mde: 1.0,\n time: 2000.0,\n duration: 10000.0,\n context: \"home:hub.continueWatching\",\n play_queue_item_id: 1.0,\n play_back_time: 2000.0,\n row: 1.0,\n)\n \nres = s.video.get_timeline(req)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + - target: $["paths"]["/playlists"]["get"] update: x-codeSamples: - lang: ruby - label: clearPlaylistContents - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.clear_playlist_contents(playlist_id=1893.18)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/hubs/search/voice"]["get"] - update: - x-codeSamples: - - lang: ruby - label: performVoiceSearch - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_voice_search(query=\"dead+poop\", section_id=4094.8, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: ruby - label: markPlayed - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.mark_played(key=59398.0)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: ruby - label: cancelServerActivities - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.cancel_server_activities(activity_uuid=\"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\")\n\nif res.status_code == 200\n # handle response\nend" + label: getPlaylists + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlists(playlist_type=::OpenApiSDK::Operations::PlaylistType::AUDIO, smart=::OpenApiSDK::Operations::QueryParamSmart::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - target: $["paths"]["/search"]["get"] update: x-codeSamples: - lang: ruby label: getSearchResults source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.get_search_results(query=\"110\")\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/sections"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getLibraries - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_libraries()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] - update: - x-codeSamples: - - lang: ruby - label: refreshLibrary - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.refresh_library(section_id=934.16)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/playlists/{playlistID}"]["delete"] - update: - x-codeSamples: - - lang: ruby - label: deletePlaylist - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.delete_playlist(playlist_id=216.22)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/servers"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getServerList - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_list()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/:/progress"]["post"] - update: - x-codeSamples: - - lang: ruby - label: updatePlayProgress - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.update_play_progress(key=\"\", time=90000.0, state=\"played\")\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/butler/{taskName}"]["delete"] - update: - x-codeSamples: - - lang: ruby - label: stopTask - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_task(task_name=::OpenApiSDK::Operations::PathParamTaskName::BACKUP_DATABASE)\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/library/sections/{sectionId}"]["delete"] update: x-codeSamples: - lang: ruby label: deleteLibrary source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.delete_library(section_id=1000.0)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/security/token"]["get"] + - target: $["paths"]["/myplex/account"]["get"] update: x-codeSamples: - lang: ruby - label: getTransientToken - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_transient_token(type=::OpenApiSDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::OpenApiSDK::Operations::Scope::ALL)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/updater/apply"]["put"] - update: - x-codeSamples: - - lang: ruby - label: applyUpdates - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.apply_updates(tonight=::OpenApiSDK::Operations::Tonight::ONE, skip=::OpenApiSDK::Operations::Skip::ZERO)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/clients"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getAvailableClients - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_available_clients()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/sections/{sectionId}/{tag}"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getLibraryItems - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library_items(section_id=1, tag=::OpenApiSDK::Operations::Tag::GENRE)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" + label: getMyPlexAccount + source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_my_plex_account()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - target: $["paths"]["/log"]["get"] update: x-codeSamples: @@ -249,117 +369,9 @@ actions: - lang: ruby label: getPlaylist source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist(playlist_id=4109.48)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/playlists/{playlistID}"]["put"] - update: - x-codeSamples: - - lang: ruby - label: updatePlaylist - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.update_playlist(playlist_id=3915, title=\"\", summary=\"\")\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/identity"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getServerIdentity - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_identity()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getToken - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\n\n \nres = s.plex.get_token(pin_id=\"\", x_plex_client_identifier=\"Postman\")\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/butler"]["post"] - update: - x-codeSamples: - - lang: ruby - label: startAllTasks - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_all_tasks()\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/updater/check"]["put"] - update: - x-codeSamples: - - lang: ruby - label: checkForUpdates - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.check_for_updates(download=::OpenApiSDK::Operations::Download::ONE)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/:/unscrobble"]["get"] - update: - x-codeSamples: - - lang: ruby - label: markUnplayed - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.media.mark_unplayed(key=59398.0)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getLibraryHubs - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=::OpenApiSDK::Operations::QueryParamOnlyTransient::ZERO)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/hubs/search"]["get"] - update: - x-codeSamples: - - lang: ruby - label: performSearch - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_search(query=\"dylan\", section_id=1516.53, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" - target: $["paths"]["/playlists/upload"]["post"] update: x-codeSamples: - lang: ruby label: uploadPlaylist source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.upload_playlist(path=\"/home/barkley/playlist.m3u\", force=::OpenApiSDK::Operations::Force::ZERO)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/security/resources"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getSourceConnectionInformation - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_source_connection_information(source=\"server://client-identifier\")\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/statistics/media"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getStatistics - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_statistics(timespan=4)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getTranscodeSessions - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_transcode_sessions()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/butler/{taskName}"]["post"] - update: - x-codeSamples: - - lang: ruby - label: startTask - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_task(task_name=::OpenApiSDK::Operations::TaskName::CLEAN_OLD_BUNDLES)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getFileHash - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_file_hash(url=\"file://C:\\Image.png&type=13\", type=4462.17)\n\nif res.status_code == 200\n # handle response\nend" - - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getUpdateStatus - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.get_update_status()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/:/prefs"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getServerPreferences - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_preferences()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/activities"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getServerActivities - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.get_server_activities()\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] - update: - x-codeSamples: - - lang: ruby - label: getMetadata - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata(rating_key=8382.31)\n\nif ! res.two_hundred_application_json_object.nil?\n # handle response\nend" - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] - update: - x-codeSamples: - - lang: ruby - label: stopTranscodeSession - source: "require 'plexruby'\n\n\ns = ::OpenApiSDK::PlexAPI.new(\n x_plex_client_identifier: \"Postman\",\n )\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.stop_transcode_session(session_key=\"zz7llzqlx8w9vnrsbnwhbmep\")\n\nif res.status_code == 200\n # handle response\nend" diff --git a/docs/models/operations/filter.md b/docs/models/operations/filter.md index f54ddc4..2736d3d 100644 --- a/docs/models/operations/filter.md +++ b/docs/models/operations/filter.md @@ -1,12 +1,12 @@ # Filter +Filter -## Fields -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `filter` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | label | -| `filter_type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | string | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/sections/1/label | -| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Labels | -| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file +## Values + +| Name | Value | +| ----------- | ----------- | +| `ALL` | all | +| `AVAILABLE` | available | +| `RELEASED` | released | \ No newline at end of file diff --git a/docs/models/operations/gethomedataerrors.md b/docs/models/operations/gethomedataerrors.md new file mode 100644 index 0000000..db09786 --- /dev/null +++ b/docs/models/operations/gethomedataerrors.md @@ -0,0 +1,10 @@ +# GetHomeDataErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/operations/gethomedataplexresponsebody.md b/docs/models/operations/gethomedataplexresponsebody.md new file mode 100644 index 0000000..b879941 --- /dev/null +++ b/docs/models/operations/gethomedataplexresponsebody.md @@ -0,0 +1,10 @@ +# GetHomeDataPlexResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `errors` | T::Array<[::OpenApiSDK::Operations::GetHomeDataErrors](../../models/operations/gethomedataerrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gethomedataresponse.md b/docs/models/operations/gethomedataresponse.md new file mode 100644 index 0000000..f6ee5e9 --- /dev/null +++ b/docs/models/operations/gethomedataresponse.md @@ -0,0 +1,12 @@ +# GetHomeDataResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `two_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetHomeDataResponseBody)](../../models/operations/gethomedataresponsebody.md) | :heavy_minus_sign: | Home Data | +| `four_hundred_and_one_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetHomeDataPlexResponseBody)](../../models/operations/gethomedataplexresponsebody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/gethomedataresponsebody.md b/docs/models/operations/gethomedataresponsebody.md new file mode 100644 index 0000000..05776ff --- /dev/null +++ b/docs/models/operations/gethomedataresponsebody.md @@ -0,0 +1,15 @@ +# GetHomeDataResponseBody + +Home Data + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1841489 | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Blindkitty38's home | +| `guest_user_id` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 58815432 | +| `guest_user_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | f3df4e01bfca0787 | +| `guest_enabled` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `subscription` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryfilter.md b/docs/models/operations/getlibraryfilter.md new file mode 100644 index 0000000..1675b75 --- /dev/null +++ b/docs/models/operations/getlibraryfilter.md @@ -0,0 +1,12 @@ +# GetLibraryFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `filter` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | label | +| `filter_type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | string | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/sections/1/label | +| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Labels | +| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrequest.md b/docs/models/operations/getlibraryitemsrequest.md index 7b6fa32..adfee89 100644 --- a/docs/models/operations/getlibraryitemsrequest.md +++ b/docs/models/operations/getlibraryitemsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `section_id` | *::Integer* | :heavy_check_mark: | the Id of the library to query | 1 | -| `tag` | [::OpenApiSDK::Operations::Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `section_id` | *::Object* | :heavy_check_mark: | the Id of the library to query | +| `tag` | [::OpenApiSDK::Operations::Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | \ No newline at end of file diff --git a/docs/models/operations/getlibrarytype.md b/docs/models/operations/getlibrarytype.md index ce72634..3c4404e 100644 --- a/docs/models/operations/getlibrarytype.md +++ b/docs/models/operations/getlibrarytype.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | movie | -| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Movies | -| `active` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | false | -| `filter` | T::Array<[::OpenApiSDK::Operations::Filter](../../models/operations/filter.md)> | :heavy_minus_sign: | N/A | | -| `sort` | T::Array<[::OpenApiSDK::Operations::Sort](../../models/operations/sort.md)> | :heavy_minus_sign: | N/A | | -| `field` | T::Array<[::OpenApiSDK::Operations::Field](../../models/operations/field.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | +| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | movie | +| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Movies | +| `active` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | false | +| `filter` | T::Array<[::OpenApiSDK::Operations::GetLibraryFilter](../../models/operations/getlibraryfilter.md)> | :heavy_minus_sign: | N/A | | +| `sort` | T::Array<[::OpenApiSDK::Operations::Sort](../../models/operations/sort.md)> | :heavy_minus_sign: | N/A | | +| `field` | T::Array<[::OpenApiSDK::Operations::Field](../../models/operations/field.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getpinrequest.md b/docs/models/operations/getpinrequest.md index 703c952..89a3afd 100644 --- a/docs/models/operations/getpinrequest.md +++ b/docs/models/operations/getpinrequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_product` | *::String* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `strong` | *T.nilable(T::Boolean)* | :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` | *T.nilable(::String)* | :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 diff --git a/docs/models/operations/getpinresponse.md b/docs/models/operations/getpinresponse.md index c243070..1d1b822 100644 --- a/docs/models/operations/getpinresponse.md +++ b/docs/models/operations/getpinresponse.md @@ -8,5 +8,5 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `two_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetPinResponseBody)](../../models/operations/getpinresponsebody.md) | :heavy_minus_sign: | The Pin | +| `two_hundred_and_one_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetPinResponseBody)](../../models/operations/getpinresponsebody.md) | :heavy_minus_sign: | The Pin | | `four_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetPinPlexResponseBody)](../../models/operations/getpinplexresponsebody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedmediacontainer.md b/docs/models/operations/getrecentlyaddedmediacontainer.md index 90b6e34..748856c 100644 --- a/docs/models/operations/getrecentlyaddedmediacontainer.md +++ b/docs/models/operations/getrecentlyaddedmediacontainer.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `size` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 50 | -| `allow_sync` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | -| `identifier` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `media_tag_prefix` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `media_tag_version` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1680021154 | -| `mixed_parents` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | -| `metadata` | T::Array<[::OpenApiSDK::Operations::Metadata](../../models/operations/metadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `size` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 50 | +| `allow_sync` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `identifier` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `media_tag_prefix` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `media_tag_version` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixed_parents` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `metadata` | T::Array<[::OpenApiSDK::Operations::GetRecentlyAddedMetadata](../../models/operations/getrecentlyaddedmetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedmetadata.md b/docs/models/operations/getrecentlyaddedmetadata.md new file mode 100644 index 0000000..eb2f391 --- /dev/null +++ b/docs/models/operations/getrecentlyaddedmetadata.md @@ -0,0 +1,39 @@ +# GetRecentlyAddedMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allow_sync` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `library_section_id` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1 | +| `library_section_title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Movies | +| `library_section_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `rating_key` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 59398 | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398 | +| `guid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | +| `studio` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Marvel Studios | +| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | movie | +| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | +| `content_rating` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | +| `rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 4.7 | +| `audience_rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 8.3 | +| `year` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 2023 | +| `tagline` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | +| `thumb` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | +| `art` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | +| `duration` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 7474422 | +| `originally_available_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | +| `added_at` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1681803215 | +| `updated_at` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1681888010 | +| `audience_rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapter_source` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | media | +| `primary_extra_key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59399 | +| `rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | +| `media` | T::Array<[::OpenApiSDK::Operations::Media](../../models/operations/media.md)> | :heavy_minus_sign: | N/A | | +| `genre` | T::Array<[::OpenApiSDK::Operations::Genre](../../models/operations/genre.md)> | :heavy_minus_sign: | N/A | | +| `director` | T::Array<[::OpenApiSDK::Operations::Director](../../models/operations/director.md)> | :heavy_minus_sign: | N/A | | +| `writer` | T::Array<[::OpenApiSDK::Operations::Writer](../../models/operations/writer.md)> | :heavy_minus_sign: | N/A | | +| `country` | T::Array<[::OpenApiSDK::Operations::Country](../../models/operations/country.md)> | :heavy_minus_sign: | N/A | | +| `role` | T::Array<[::OpenApiSDK::Operations::Role](../../models/operations/role.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettokenlocation.md b/docs/models/operations/gettokenlocation.md new file mode 100644 index 0000000..e10ef67 --- /dev/null +++ b/docs/models/operations/gettokenlocation.md @@ -0,0 +1,17 @@ +# GetTokenLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | US | +| `european_union_member` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `continent_code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | NA | +| `country` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | United States | +| `city` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Austin | +| `time_zone` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | America/Chicago | +| `postal_code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 78732 | +| `in_privacy_restricted_country` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `subdivisions` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Texas | +| `coordinates` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/models/operations/gettokenplexresponsebody.md b/docs/models/operations/gettokenplexresponsebody.md new file mode 100644 index 0000000..3eacc1f --- /dev/null +++ b/docs/models/operations/gettokenplexresponsebody.md @@ -0,0 +1,10 @@ +# GetTokenPlexResponseBody + +X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `errors` | T::Array<[::OpenApiSDK::Operations::GetTokenErrors](../../models/operations/gettokenerrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gettokenresponse.md b/docs/models/operations/gettokenresponse.md index 5f32202..3828ad5 100644 --- a/docs/models/operations/gettokenresponse.md +++ b/docs/models/operations/gettokenresponse.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody)](../../models/operations/gettokenresponsebody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `two_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody)](../../models/operations/gettokenresponsebody.md) | :heavy_minus_sign: | Access Token | +| `four_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetTokenPlexResponseBody)](../../models/operations/gettokenplexresponsebody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file diff --git a/docs/models/operations/gettokenresponsebody.md b/docs/models/operations/gettokenresponsebody.md index 8ba1fbb..31de693 100644 --- a/docs/models/operations/gettokenresponsebody.md +++ b/docs/models/operations/gettokenresponsebody.md @@ -1,10 +1,21 @@ # GetTokenResponseBody -X-Plex-Client-Identifier is missing +Access Token ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | T::Array<[::OpenApiSDK::Operations::GetTokenErrors](../../models/operations/gettokenerrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *T.nilable(::Float)* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | +| `product` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Plex Web | +| `trusted` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | +| `qr` | *T.nilable(::String)* | :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` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Postman | +| `location` | [T.nilable(::OpenApiSDK::Operations::GetTokenLocation)](../../models/operations/gettokenlocation.md) | :heavy_minus_sign: | N/A | | +| `expires_in` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1800 | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | +| `auth_token` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `new_registration` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getwatchlisterrors.md b/docs/models/operations/getwatchlisterrors.md new file mode 100644 index 0000000..3eee5b3 --- /dev/null +++ b/docs/models/operations/getwatchlisterrors.md @@ -0,0 +1,10 @@ +# GetWatchlistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistrequest.md b/docs/models/operations/getwatchlistrequest.md new file mode 100644 index 0000000..1cc7197 --- /dev/null +++ b/docs/models/operations/getwatchlistrequest.md @@ -0,0 +1,16 @@ +# GetWatchlistRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `filter` | [::OpenApiSDK::Operations::Filter](../../models/operations/filter.md) | :heavy_check_mark: | Filter | +| `sort` | *T.nilable(::String)* | :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` | [T.nilable(::OpenApiSDK::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` | *T.nilable(::Integer)* | :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` | [T.nilable(::OpenApiSDK::Operations::IncludeCollections)](../../models/operations/includecollections.md) | :heavy_minus_sign: | include collections in the results
| +| `include_external_media` | [T.nilable(::OpenApiSDK::Operations::IncludeExternalMedia)](../../models/operations/includeexternalmedia.md) | :heavy_minus_sign: | include external media in the results
| +| `x_plex_token` | *::String* | :heavy_check_mark: | User Token | +| `x_plex_container_start` | *T.nilable(::Integer)* | :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` | *T.nilable(::Integer)* | :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 diff --git a/docs/models/operations/getwatchlistresponse.md b/docs/models/operations/getwatchlistresponse.md new file mode 100644 index 0000000..2423c54 --- /dev/null +++ b/docs/models/operations/getwatchlistresponse.md @@ -0,0 +1,12 @@ +# GetWatchlistResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `two_hundred_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetWatchlistResponseBody)](../../models/operations/getwatchlistresponsebody.md) | :heavy_minus_sign: | Watchlist Data | +| `four_hundred_and_one_application_json_object` | [T.nilable(::OpenApiSDK::Operations::GetWatchlistWatchlistResponseBody)](../../models/operations/getwatchlistwatchlistresponsebody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistresponsebody.md b/docs/models/operations/getwatchlistresponsebody.md new file mode 100644 index 0000000..1bec650 --- /dev/null +++ b/docs/models/operations/getwatchlistresponsebody.md @@ -0,0 +1,16 @@ +# GetWatchlistResponseBody + +Watchlist Data + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `library_section_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `library_section_title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `offset` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `total_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `identifier` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `metadata` | T::Array<[::OpenApiSDK::Operations::Metadata](../../models/operations/metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistwatchlistresponsebody.md b/docs/models/operations/getwatchlistwatchlistresponsebody.md new file mode 100644 index 0000000..ceaaf6f --- /dev/null +++ b/docs/models/operations/getwatchlistwatchlistresponsebody.md @@ -0,0 +1,10 @@ +# GetWatchlistWatchlistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `errors` | T::Array<[::OpenApiSDK::Operations::GetWatchlistErrors](../../models/operations/getwatchlisterrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/image.md b/docs/models/operations/image.md new file mode 100644 index 0000000..bb0a39a --- /dev/null +++ b/docs/models/operations/image.md @@ -0,0 +1,10 @@ +# Image + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `alt` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/includecollections.md b/docs/models/operations/includecollections.md new file mode 100644 index 0000000..cc248df --- /dev/null +++ b/docs/models/operations/includecollections.md @@ -0,0 +1,12 @@ +# IncludeCollections + +include collections in the results + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ONE` | 1 | +| `ZERO` | 0 | \ No newline at end of file diff --git a/docs/models/operations/includeexternalmedia.md b/docs/models/operations/includeexternalmedia.md new file mode 100644 index 0000000..07bbeab --- /dev/null +++ b/docs/models/operations/includeexternalmedia.md @@ -0,0 +1,12 @@ +# IncludeExternalMedia + +include external media in the results + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ONE` | 1 | +| `ZERO` | 0 | \ No newline at end of file diff --git a/docs/models/operations/libtype.md b/docs/models/operations/libtype.md new file mode 100644 index 0000000..6828dfd --- /dev/null +++ b/docs/models/operations/libtype.md @@ -0,0 +1,12 @@ +# Libtype + +The type of library to filter. Can be "movie" or "show", or all if not present. + + + +## Values + +| Name | Value | +| ------- | ------- | +| `MOVIE` | movie | +| `SHOW` | show | \ No newline at end of file diff --git a/docs/models/operations/location.md b/docs/models/operations/location.md index 89f3113..5a70a36 100644 --- a/docs/models/operations/location.md +++ b/docs/models/operations/location.md @@ -11,7 +11,7 @@ | `country` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | United States | | `city` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Austin | | `time_zone` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | America/Chicago | -| `postal_code` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 78732 | +| `postal_code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 78732 | | `in_privacy_restricted_country` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | | `subdivisions` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Texas | | `coordinates` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/models/operations/metadata.md b/docs/models/operations/metadata.md index 02af775..e48626b 100644 --- a/docs/models/operations/metadata.md +++ b/docs/models/operations/metadata.md @@ -3,37 +3,40 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allow_sync` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | | -| `library_section_id` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1 | -| `library_section_title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Movies | -| `library_section_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `rating_key` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 59398 | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398 | -| `guid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | -| `studio` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Marvel Studios | -| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | movie | -| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | -| `content_rating` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | -| `rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 4.7 | -| `audience_rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 8.3 | -| `year` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 2023 | -| `tagline` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | -| `thumb` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | -| `art` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | -| `duration` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 7474422 | -| `originally_available_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | -| `added_at` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1681803215 | -| `updated_at` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | 1681888010 | -| `audience_rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `chapter_source` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | media | -| `primary_extra_key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | /library/metadata/59399 | -| `rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | -| `media` | T::Array<[::OpenApiSDK::Operations::Media](../../models/operations/media.md)> | :heavy_minus_sign: | N/A | | -| `genre` | T::Array<[::OpenApiSDK::Operations::Genre](../../models/operations/genre.md)> | :heavy_minus_sign: | N/A | | -| `director` | T::Array<[::OpenApiSDK::Operations::Director](../../models/operations/director.md)> | :heavy_minus_sign: | N/A | | -| `writer` | T::Array<[::OpenApiSDK::Operations::Writer](../../models/operations/writer.md)> | :heavy_minus_sign: | N/A | | -| `country` | T::Array<[::OpenApiSDK::Operations::Country](../../models/operations/country.md)> | :heavy_minus_sign: | N/A | | -| `role` | T::Array<[::OpenApiSDK::Operations::Role](../../models/operations/role.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `art` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `guid` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `rating_key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `studio` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `tagline` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `thumb` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `added_at` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `duration` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `public_pages_url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `user_state` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `content_rating` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `originally_available_at` | [DateTime](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html) | :heavy_minus_sign: | N/A | +| `year` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `image` | T::Array<[::OpenApiSDK::Operations::Image](../../models/operations/image.md)> | :heavy_minus_sign: | N/A | +| `banner` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | +| `expires_at` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `original_title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `audience_rating` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | +| `audience_rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `rating_image` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `imdb_rating_count` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `subtype` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `theme` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `leaf_count` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `child_count` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `is_continuing_series` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `skip_children` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `availability_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `streaming_media_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `playable_key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 9428f19..f313c70 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -296,7 +296,7 @@ s.config_security( ) -res = s.library.get_library_items(section_id=1, tag=::OpenApiSDK::Operations::Tag::GENRE) +res = s.library.get_library_items(section_id="", tag=::OpenApiSDK::Operations::Tag::GENRE) if ! res.two_hundred_application_json_object.nil? # handle response @@ -306,10 +306,10 @@ end ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `section_id` | *::Integer* | :heavy_check_mark: | the Id of the library to query | 1 | -| `tag` | [::OpenApiSDK::Operations::Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `section_id` | *::Object* | :heavy_check_mark: | the Id of the library to query | +| `tag` | [::OpenApiSDK::Operations::Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | ### Response diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 30486e4..4b089b5 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -8,9 +8,44 @@ API Calls that perform operations directly against https://Plex.tv ### Available Operations +* [get_home_data](#get_home_data) - Get Plex Home Data * [get_pin](#get_pin) - Get a Pin * [get_token](#get_token) - Get Access Token +## get_home_data + +Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + +### Example Usage + +```ruby +require 'plexruby' + + +s = ::OpenApiSDK::PlexAPI.new( + x_plex_client_identifier: "Postman", + ) +s.config_security( + ::OpenApiSDK::Shared::Security.new( + access_token: "", + ) +) + + +res = s.plex.get_home_data() + +if ! res.two_hundred_application_json_object.nil? + # handle response +end + +``` + + +### Response + +**[T.nilable(::OpenApiSDK::Operations::GetHomeDataResponse)](../../models/operations/gethomedataresponse.md)** + + ## get_pin Retrieve a Pin from Plex.tv for authentication flows @@ -26,9 +61,9 @@ s = ::OpenApiSDK::PlexAPI.new( ) -res = s.plex.get_pin(strong=false, x_plex_client_identifier="Postman") +res = s.plex.get_pin(x_plex_product="Postman", strong=false, x_plex_client_identifier="Postman") -if ! res.two_hundred_application_json_object.nil? +if ! res.two_hundred_and_one_application_json_object.nil? # handle response end @@ -38,6 +73,7 @@ end | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_plex_product` | *::String* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `strong` | *T::Boolean* | :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` | *::String* | :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 | | `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | @@ -65,7 +101,7 @@ s = ::OpenApiSDK::PlexAPI.new( res = s.plex.get_token(pin_id="", x_plex_client_identifier="Postman") -if res.status_code == 200 +if ! res.two_hundred_application_json_object.nil? # handle response end diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md new file mode 100644 index 0000000..d8aef2c --- /dev/null +++ b/docs/sdks/watchlist/README.md @@ -0,0 +1,57 @@ +# Watchlist + + +## Overview + +API Calls that perform operations with Plex Media Server Watchlists + + +### Available Operations + +* [get_watchlist](#get_watchlist) - Get User Watchlist + +## get_watchlist + +Get User Watchlist + +### Example Usage + +```ruby +require 'plexruby' + + +s = ::OpenApiSDK::PlexAPI.new( + x_plex_client_identifier: "Postman", + ) +s.config_security( + ::OpenApiSDK::Shared::Security.new( + access_token: "", + ) +) + + +req = ::OpenApiSDK::Operations::GetWatchlistRequest.new( + filter: ::OpenApiSDK::Operations::Filter::RELEASED, + x_plex_token: "", +) + +res = s.watchlist.get_watchlist(req) + +if ! res.two_hundred_application_json_object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [::OpenApiSDK::Operations::GetWatchlistRequest](../../models/operations/getwatchlistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | + + +### Response + +**[T.nilable(::OpenApiSDK::Operations::GetWatchlistResponse)](../../models/operations/getwatchlistresponse.md)** + diff --git a/lib/open_api_sdk/library.rb b/lib/open_api_sdk/library.rb index a987121..f8f03c4 100644 --- a/lib/open_api_sdk/library.rb +++ b/lib/open_api_sdk/library.rb @@ -271,7 +271,7 @@ module OpenApiSDK end - sig { params(section_id: ::Integer, tag: ::OpenApiSDK::Operations::Tag).returns(::OpenApiSDK::Operations::GetLibraryItemsResponse) } + sig { params(section_id: ::Object, tag: ::OpenApiSDK::Operations::Tag).returns(::OpenApiSDK::Operations::GetLibraryItemsResponse) } def get_library_items(section_id, tag) # get_library_items - 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: diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index a023dbf..8449bf5 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -105,6 +105,22 @@ module OpenApiSDK autoload :StopTaskErrors, 'open_api_sdk/models/operations/stoptask_errors.rb' autoload :StopTaskResponseBody, 'open_api_sdk/models/operations/stoptask_responsebody.rb' autoload :StopTaskResponse, 'open_api_sdk/models/operations/stoptask_response.rb' + autoload :GetHomeDataErrors, 'open_api_sdk/models/operations/gethomedata_errors.rb' + autoload :GetHomeDataPlexResponseBody, 'open_api_sdk/models/operations/gethomedata_plex_responsebody.rb' + autoload :GetHomeDataResponseBody, 'open_api_sdk/models/operations/gethomedata_responsebody.rb' + autoload :GetHomeDataResponse, 'open_api_sdk/models/operations/gethomedata_response.rb' + autoload :GetPinRequest, 'open_api_sdk/models/operations/getpin_request.rb' + autoload :GetPinErrors, 'open_api_sdk/models/operations/getpin_errors.rb' + autoload :GetPinPlexResponseBody, 'open_api_sdk/models/operations/getpin_plex_responsebody.rb' + autoload :Location, 'open_api_sdk/models/operations/location.rb' + autoload :GetPinResponseBody, 'open_api_sdk/models/operations/getpin_responsebody.rb' + autoload :GetPinResponse, 'open_api_sdk/models/operations/getpin_response.rb' + autoload :GetTokenRequest, 'open_api_sdk/models/operations/gettoken_request.rb' + autoload :GetTokenErrors, 'open_api_sdk/models/operations/gettoken_errors.rb' + autoload :GetTokenPlexResponseBody, 'open_api_sdk/models/operations/gettoken_plex_responsebody.rb' + autoload :GetTokenLocation, 'open_api_sdk/models/operations/gettoken_location.rb' + autoload :GetTokenResponseBody, 'open_api_sdk/models/operations/gettoken_responsebody.rb' + autoload :GetTokenResponse, 'open_api_sdk/models/operations/gettoken_response.rb' autoload :OnlyTransient, 'open_api_sdk/models/operations/onlytransient.rb' autoload :GetGlobalHubsRequest, 'open_api_sdk/models/operations/getglobalhubs_request.rb' autoload :GetGlobalHubsErrors, 'open_api_sdk/models/operations/getglobalhubs_errors.rb' @@ -166,7 +182,7 @@ module OpenApiSDK autoload :Writer, 'open_api_sdk/models/operations/writer.rb' autoload :Country, 'open_api_sdk/models/operations/country.rb' autoload :Role, 'open_api_sdk/models/operations/role.rb' - autoload :Metadata, 'open_api_sdk/models/operations/metadata.rb' + autoload :GetRecentlyAddedMetadata, 'open_api_sdk/models/operations/getrecentlyadded_metadata.rb' autoload :GetRecentlyAddedMediaContainer, 'open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb' autoload :GetRecentlyAddedResponseBody, 'open_api_sdk/models/operations/getrecentlyadded_responsebody.rb' autoload :GetRecentlyAddedResponse, 'open_api_sdk/models/operations/getrecentlyadded_response.rb' @@ -182,7 +198,7 @@ module OpenApiSDK autoload :GetLibraryErrors, 'open_api_sdk/models/operations/getlibrary_errors.rb' autoload :GetLibraryLibraryResponseBody, 'open_api_sdk/models/operations/getlibrary_library_responsebody.rb' autoload :GetLibraryDirectory, 'open_api_sdk/models/operations/getlibrary_directory.rb' - autoload :Filter, 'open_api_sdk/models/operations/filter.rb' + autoload :GetLibraryFilter, 'open_api_sdk/models/operations/getlibrary_filter.rb' autoload :Sort, 'open_api_sdk/models/operations/sort.rb' autoload :Field, 'open_api_sdk/models/operations/field.rb' autoload :GetLibraryType, 'open_api_sdk/models/operations/getlibrary_type.rb' @@ -269,16 +285,6 @@ module OpenApiSDK autoload :EnablePaperTrailErrors, 'open_api_sdk/models/operations/enablepapertrail_errors.rb' autoload :EnablePaperTrailResponseBody, 'open_api_sdk/models/operations/enablepapertrail_responsebody.rb' autoload :EnablePaperTrailResponse, 'open_api_sdk/models/operations/enablepapertrail_response.rb' - autoload :GetPinRequest, 'open_api_sdk/models/operations/getpin_request.rb' - autoload :GetPinErrors, 'open_api_sdk/models/operations/getpin_errors.rb' - autoload :GetPinPlexResponseBody, 'open_api_sdk/models/operations/getpin_plex_responsebody.rb' - autoload :Location, 'open_api_sdk/models/operations/location.rb' - autoload :GetPinResponseBody, 'open_api_sdk/models/operations/getpin_responsebody.rb' - autoload :GetPinResponse, 'open_api_sdk/models/operations/getpin_response.rb' - autoload :GetTokenRequest, 'open_api_sdk/models/operations/gettoken_request.rb' - autoload :GetTokenErrors, 'open_api_sdk/models/operations/gettoken_errors.rb' - autoload :GetTokenResponseBody, 'open_api_sdk/models/operations/gettoken_responsebody.rb' - autoload :GetTokenResponse, 'open_api_sdk/models/operations/gettoken_response.rb' autoload :QueryParamType, 'open_api_sdk/models/operations/queryparam_type.rb' autoload :Smart, 'open_api_sdk/models/operations/smart.rb' autoload :CreatePlaylistRequest, 'open_api_sdk/models/operations/createplaylist_request.rb' @@ -406,5 +412,16 @@ module OpenApiSDK autoload :ApplyUpdatesErrors, 'open_api_sdk/models/operations/applyupdates_errors.rb' autoload :ApplyUpdatesResponseBody, 'open_api_sdk/models/operations/applyupdates_responsebody.rb' autoload :ApplyUpdatesResponse, 'open_api_sdk/models/operations/applyupdates_response.rb' + autoload :Filter, 'open_api_sdk/models/operations/filter.rb' + autoload :Libtype, 'open_api_sdk/models/operations/libtype.rb' + autoload :IncludeCollections, 'open_api_sdk/models/operations/includecollections.rb' + autoload :IncludeExternalMedia, 'open_api_sdk/models/operations/includeexternalmedia.rb' + autoload :GetWatchlistRequest, 'open_api_sdk/models/operations/getwatchlist_request.rb' + autoload :GetWatchlistErrors, 'open_api_sdk/models/operations/getwatchlist_errors.rb' + autoload :GetWatchlistWatchlistResponseBody, 'open_api_sdk/models/operations/getwatchlist_watchlist_responsebody.rb' + autoload :Image, 'open_api_sdk/models/operations/image.rb' + autoload :Metadata, 'open_api_sdk/models/operations/metadata.rb' + autoload :GetWatchlistResponseBody, 'open_api_sdk/models/operations/getwatchlist_responsebody.rb' + autoload :GetWatchlistResponse, 'open_api_sdk/models/operations/getwatchlist_response.rb' end end diff --git a/lib/open_api_sdk/models/operations/filter.rb b/lib/open_api_sdk/models/operations/filter.rb index a1a223f..b12e8d0 100644 --- a/lib/open_api_sdk/models/operations/filter.rb +++ b/lib/open_api_sdk/models/operations/filter.rb @@ -6,31 +6,18 @@ module OpenApiSDK module Operations + FILTER_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze - - class Filter < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :filter, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filter') } } - - field :filter_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filterType') } } - - field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } - - field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } - - field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } - - - sig { params(filter: T.nilable(::String), filter_type: T.nilable(::String), key: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String)).void } - def initialize(filter: nil, filter_type: nil, key: nil, title: nil, type: nil) - @filter = filter - @filter_type = filter_type - @key = key - @title = title - @type = type + # Filter - Filter + class Filter < T::Enum + enums do + ALL = new('all') + AVAILABLE = new('available') + RELEASED = new('released') end end + end end diff --git a/lib/open_api_sdk/models/operations/gethomedata_errors.rb b/lib/open_api_sdk/models/operations/gethomedata_errors.rb new file mode 100644 index 0000000..c86caf1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/gethomedata_errors.rb @@ -0,0 +1,30 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetHomeDataErrors < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :code, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } + + field :status, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } } + + + sig { params(code: T.nilable(::Float), message: T.nilable(::String), status: T.nilable(::Float)).void } + def initialize(code: nil, message: nil, status: nil) + @code = code + @message = message + @status = status + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gethomedata_plex_responsebody.rb b/lib/open_api_sdk/models/operations/gethomedata_plex_responsebody.rb new file mode 100644 index 0000000..82cbdf7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/gethomedata_plex_responsebody.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + class GetHomeDataPlexResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :errors, T.nilable(T::Array[::OpenApiSDK::Operations::GetHomeDataErrors]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('errors') } } + + + sig { params(errors: T.nilable(T::Array[::OpenApiSDK::Operations::GetHomeDataErrors])).void } + def initialize(errors: nil) + @errors = errors + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gethomedata_response.rb b/lib/open_api_sdk/models/operations/gethomedata_response.rb new file mode 100644 index 0000000..62b7f4e --- /dev/null +++ b/lib/open_api_sdk/models/operations/gethomedata_response.rb @@ -0,0 +1,36 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetHomeDataResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Home Data + field :two_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetHomeDataResponseBody) + # Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + field :four_hundred_and_one_application_json_object, T.nilable(::OpenApiSDK::Operations::GetHomeDataPlexResponseBody) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetHomeDataResponseBody), four_hundred_and_one_application_json_object: T.nilable(::OpenApiSDK::Operations::GetHomeDataPlexResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_application_json_object: nil, four_hundred_and_one_application_json_object: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @two_hundred_application_json_object = two_hundred_application_json_object + @four_hundred_and_one_application_json_object = four_hundred_and_one_application_json_object + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gethomedata_responsebody.rb b/lib/open_api_sdk/models/operations/gethomedata_responsebody.rb new file mode 100644 index 0000000..ccede07 --- /dev/null +++ b/lib/open_api_sdk/models/operations/gethomedata_responsebody.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # Home Data + class GetHomeDataResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :guest_enabled, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guestEnabled') } } + + field :guest_user_id, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guestUserID') } } + + field :guest_user_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guestUserUUID') } } + + field :id, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :subscription, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription') } } + + + sig { params(guest_enabled: T.nilable(T::Boolean), guest_user_id: T.nilable(::Float), guest_user_uuid: T.nilable(::String), id: T.nilable(::Float), name: T.nilable(::String), subscription: T.nilable(T::Boolean)).void } + def initialize(guest_enabled: nil, guest_user_id: nil, guest_user_uuid: nil, id: nil, name: nil, subscription: nil) + @guest_enabled = guest_enabled + @guest_user_id = guest_user_id + @guest_user_uuid = guest_user_uuid + @id = id + @name = name + @subscription = subscription + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getlibrary_filter.rb b/lib/open_api_sdk/models/operations/getlibrary_filter.rb new file mode 100644 index 0000000..75b023f --- /dev/null +++ b/lib/open_api_sdk/models/operations/getlibrary_filter.rb @@ -0,0 +1,36 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetLibraryFilter < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :filter, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filter') } } + + field :filter_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filterType') } } + + field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } + + field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(filter: T.nilable(::String), filter_type: T.nilable(::String), key: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String)).void } + def initialize(filter: nil, filter_type: nil, key: nil, title: nil, type: nil) + @filter = filter + @filter_type = filter_type + @key = key + @title = title + @type = type + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getlibrary_type.rb b/lib/open_api_sdk/models/operations/getlibrary_type.rb index 701c217..51bd7fa 100644 --- a/lib/open_api_sdk/models/operations/getlibrary_type.rb +++ b/lib/open_api_sdk/models/operations/getlibrary_type.rb @@ -16,7 +16,7 @@ module OpenApiSDK field :field, T.nilable(T::Array[::OpenApiSDK::Operations::Field]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Field') } } - field :filter, T.nilable(T::Array[::OpenApiSDK::Operations::Filter]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Filter') } } + field :filter, T.nilable(T::Array[::OpenApiSDK::Operations::GetLibraryFilter]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Filter') } } field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } @@ -27,7 +27,7 @@ module OpenApiSDK field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } - sig { params(active: T.nilable(T::Boolean), field: T.nilable(T::Array[::OpenApiSDK::Operations::Field]), filter: T.nilable(T::Array[::OpenApiSDK::Operations::Filter]), key: T.nilable(::String), sort: T.nilable(T::Array[::OpenApiSDK::Operations::Sort]), title: T.nilable(::String), type: T.nilable(::String)).void } + sig { params(active: T.nilable(T::Boolean), field: T.nilable(T::Array[::OpenApiSDK::Operations::Field]), filter: T.nilable(T::Array[::OpenApiSDK::Operations::GetLibraryFilter]), key: T.nilable(::String), sort: T.nilable(T::Array[::OpenApiSDK::Operations::Sort]), title: T.nilable(::String), type: T.nilable(::String)).void } def initialize(active: nil, field: nil, filter: nil, key: nil, sort: nil, title: nil, type: nil) @active = active @field = field diff --git a/lib/open_api_sdk/models/operations/getlibraryitems_request.rb b/lib/open_api_sdk/models/operations/getlibraryitems_request.rb index cd2a853..883b5e7 100644 --- a/lib/open_api_sdk/models/operations/getlibraryitems_request.rb +++ b/lib/open_api_sdk/models/operations/getlibraryitems_request.rb @@ -12,12 +12,12 @@ module OpenApiSDK extend T::Sig # the Id of the library to query - field :section_id, ::Integer, { 'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': false } } + field :section_id, ::Object, { 'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': false } } # A key representing a specific tag within the section. field :tag, ::OpenApiSDK::Operations::Tag, { 'path_param': { 'field_name': 'tag', 'style': 'simple', 'explode': false } } - sig { params(section_id: ::Integer, tag: ::OpenApiSDK::Operations::Tag).void } + sig { params(section_id: ::Object, tag: ::OpenApiSDK::Operations::Tag).void } def initialize(section_id: nil, tag: nil) @section_id = section_id @tag = tag diff --git a/lib/open_api_sdk/models/operations/getpin_request.rb b/lib/open_api_sdk/models/operations/getpin_request.rb index 463a5ef..e008f4c 100644 --- a/lib/open_api_sdk/models/operations/getpin_request.rb +++ b/lib/open_api_sdk/models/operations/getpin_request.rb @@ -14,6 +14,9 @@ module OpenApiSDK class GetPinRequest < ::OpenApiSDK::Utils::FieldAugmented extend T::Sig + # Product name of the application shown in the list of devices + # + field :x_plex_product, ::String, { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } } # 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` @@ -26,8 +29,9 @@ module OpenApiSDK field :x_plex_client_identifier, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } } - sig { params(strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String)).void } - def initialize(strong: nil, x_plex_client_identifier: nil) + sig { params(x_plex_product: ::String, strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String)).void } + def initialize(x_plex_product: nil, strong: nil, x_plex_client_identifier: nil) + @x_plex_product = x_plex_product @strong = strong @x_plex_client_identifier = x_plex_client_identifier end diff --git a/lib/open_api_sdk/models/operations/getpin_response.rb b/lib/open_api_sdk/models/operations/getpin_response.rb index eb39f06..a93a9d5 100644 --- a/lib/open_api_sdk/models/operations/getpin_response.rb +++ b/lib/open_api_sdk/models/operations/getpin_response.rb @@ -21,17 +21,17 @@ module OpenApiSDK # HTTP response status code for this operation field :status_code, ::Integer # The Pin - field :two_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetPinResponseBody) + field :two_hundred_and_one_application_json_object, T.nilable(::OpenApiSDK::Operations::GetPinResponseBody) # X-Plex-Client-Identifier is missing field :four_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetPinPlexResponseBody) - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetPinResponseBody), four_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetPinPlexResponseBody)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_application_json_object: nil, four_hundred_application_json_object: nil) + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_hundred_and_one_application_json_object: T.nilable(::OpenApiSDK::Operations::GetPinResponseBody), four_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetPinPlexResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_and_one_application_json_object: nil, four_hundred_application_json_object: nil) @content_type = content_type @raw_response = raw_response @status_code = status_code - @two_hundred_application_json_object = two_hundred_application_json_object + @two_hundred_and_one_application_json_object = two_hundred_and_one_application_json_object @four_hundred_application_json_object = four_hundred_application_json_object end end diff --git a/lib/open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb b/lib/open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb index 1613352..d181803 100644 --- a/lib/open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb +++ b/lib/open_api_sdk/models/operations/getrecentlyadded_mediacontainer.rb @@ -20,14 +20,14 @@ module OpenApiSDK field :media_tag_version, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mediaTagVersion') } } - field :metadata, T.nilable(T::Array[::OpenApiSDK::Operations::Metadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Metadata') } } + field :metadata, T.nilable(T::Array[::OpenApiSDK::Operations::GetRecentlyAddedMetadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Metadata') } } field :mixed_parents, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mixedParents') } } field :size, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } - sig { params(allow_sync: T.nilable(T::Boolean), identifier: T.nilable(::String), media_tag_prefix: T.nilable(::String), media_tag_version: T.nilable(::Float), metadata: T.nilable(T::Array[::OpenApiSDK::Operations::Metadata]), mixed_parents: T.nilable(T::Boolean), size: T.nilable(::Float)).void } + sig { params(allow_sync: T.nilable(T::Boolean), identifier: T.nilable(::String), media_tag_prefix: T.nilable(::String), media_tag_version: T.nilable(::Float), metadata: T.nilable(T::Array[::OpenApiSDK::Operations::GetRecentlyAddedMetadata]), mixed_parents: T.nilable(T::Boolean), size: T.nilable(::Float)).void } def initialize(allow_sync: nil, identifier: nil, media_tag_prefix: nil, media_tag_version: nil, metadata: nil, mixed_parents: nil, size: nil) @allow_sync = allow_sync @identifier = identifier diff --git a/lib/open_api_sdk/models/operations/getrecentlyadded_metadata.rb b/lib/open_api_sdk/models/operations/getrecentlyadded_metadata.rb new file mode 100644 index 0000000..6ea1471 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getrecentlyadded_metadata.rb @@ -0,0 +1,117 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetRecentlyAddedMetadata < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :added_at, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('addedAt') } } + + field :allow_sync, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowSync') } } + + field :art, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('art') } } + + field :audience_rating, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('audienceRating') } } + + field :audience_rating_image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('audienceRatingImage') } } + + field :chapter_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chapterSource') } } + + field :content_rating, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('contentRating') } } + + field :country, T.nilable(T::Array[::OpenApiSDK::Operations::Country]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Country') } } + + field :director, T.nilable(T::Array[::OpenApiSDK::Operations::Director]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Director') } } + + field :duration, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration') } } + + field :genre, T.nilable(T::Array[::OpenApiSDK::Operations::Genre]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Genre') } } + + field :guid, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guid') } } + + field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :library_section_id, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionID') } } + + field :library_section_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionTitle') } } + + field :library_section_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionUUID') } } + + field :media, T.nilable(T::Array[::OpenApiSDK::Operations::Media]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Media') } } + + field :originally_available_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('originallyAvailableAt'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :primary_extra_key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('primaryExtraKey') } } + + field :rating, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rating') } } + + field :rating_image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingImage') } } + + field :rating_key, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingKey') } } + + field :role, T.nilable(T::Array[::OpenApiSDK::Operations::Role]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Role') } } + + field :studio, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('studio') } } + + field :summary, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('summary') } } + + field :tagline, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagline') } } + + field :thumb, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('thumb') } } + + field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } + + field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + field :updated_at, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } } + + field :writer, T.nilable(T::Array[::OpenApiSDK::Operations::Writer]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Writer') } } + + field :year, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('year') } } + + + sig { params(added_at: T.nilable(::Float), allow_sync: T.nilable(T::Boolean), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), chapter_source: T.nilable(::String), content_rating: T.nilable(::String), country: T.nilable(T::Array[::OpenApiSDK::Operations::Country]), director: T.nilable(T::Array[::OpenApiSDK::Operations::Director]), duration: T.nilable(::Float), genre: T.nilable(T::Array[::OpenApiSDK::Operations::Genre]), guid: T.nilable(::String), key: T.nilable(::String), library_section_id: T.nilable(::Float), library_section_title: T.nilable(::String), library_section_uuid: T.nilable(::String), media: T.nilable(T::Array[::OpenApiSDK::Operations::Media]), originally_available_at: T.nilable(::DateTime), primary_extra_key: T.nilable(::String), rating: T.nilable(::Float), rating_image: T.nilable(::String), rating_key: T.nilable(::Float), role: T.nilable(T::Array[::OpenApiSDK::Operations::Role]), studio: T.nilable(::String), summary: T.nilable(::String), tagline: T.nilable(::String), thumb: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String), updated_at: T.nilable(::Float), writer: T.nilable(T::Array[::OpenApiSDK::Operations::Writer]), year: T.nilable(::Float)).void } + def initialize(added_at: nil, allow_sync: nil, art: nil, audience_rating: nil, audience_rating_image: nil, chapter_source: nil, content_rating: nil, country: nil, director: nil, duration: nil, genre: nil, guid: nil, key: nil, library_section_id: nil, library_section_title: nil, library_section_uuid: nil, media: nil, originally_available_at: nil, primary_extra_key: nil, rating: nil, rating_image: nil, rating_key: nil, role: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, writer: nil, year: nil) + @added_at = added_at + @allow_sync = allow_sync + @art = art + @audience_rating = audience_rating + @audience_rating_image = audience_rating_image + @chapter_source = chapter_source + @content_rating = content_rating + @country = country + @director = director + @duration = duration + @genre = genre + @guid = guid + @key = key + @library_section_id = library_section_id + @library_section_title = library_section_title + @library_section_uuid = library_section_uuid + @media = media + @originally_available_at = originally_available_at + @primary_extra_key = primary_extra_key + @rating = rating + @rating_image = rating_image + @rating_key = rating_key + @role = role + @studio = studio + @summary = summary + @tagline = tagline + @thumb = thumb + @title = title + @type = type + @updated_at = updated_at + @writer = writer + @year = year + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gettoken_location.rb b/lib/open_api_sdk/models/operations/gettoken_location.rb new file mode 100644 index 0000000..302c4cd --- /dev/null +++ b/lib/open_api_sdk/models/operations/gettoken_location.rb @@ -0,0 +1,54 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_TOKEN_LOCATION_SERVERS = [ + 'https://plex.tv/api/v2' + ].freeze + + + class GetTokenLocation < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :city, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('city') } } + + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :continent_code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continent_code') } } + + field :coordinates, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('coordinates') } } + + field :country, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country') } } + + field :european_union_member, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('european_union_member') } } + + field :in_privacy_restricted_country, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('in_privacy_restricted_country') } } + + field :postal_code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('postal_code') } } + + field :subdivisions, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subdivisions') } } + + field :time_zone, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('time_zone') } } + + + sig { params(city: T.nilable(::String), code: T.nilable(::String), continent_code: T.nilable(::String), coordinates: T.nilable(::String), country: T.nilable(::String), european_union_member: T.nilable(T::Boolean), in_privacy_restricted_country: T.nilable(T::Boolean), postal_code: T.nilable(::String), subdivisions: T.nilable(::String), time_zone: T.nilable(::String)).void } + def initialize(city: nil, code: nil, continent_code: nil, coordinates: nil, country: nil, european_union_member: nil, in_privacy_restricted_country: nil, postal_code: nil, subdivisions: nil, time_zone: nil) + @city = city + @code = code + @continent_code = continent_code + @coordinates = coordinates + @country = country + @european_union_member = european_union_member + @in_privacy_restricted_country = in_privacy_restricted_country + @postal_code = postal_code + @subdivisions = subdivisions + @time_zone = time_zone + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gettoken_plex_responsebody.rb b/lib/open_api_sdk/models/operations/gettoken_plex_responsebody.rb new file mode 100644 index 0000000..5f1dd7a --- /dev/null +++ b/lib/open_api_sdk/models/operations/gettoken_plex_responsebody.rb @@ -0,0 +1,27 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_TOKEN_PLEX_RESPONSE_BODY_SERVERS = [ + 'https://plex.tv/api/v2' + ].freeze + + # X-Plex-Client-Identifier is missing + class GetTokenPlexResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :errors, T.nilable(T::Array[::OpenApiSDK::Operations::GetTokenErrors]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('errors') } } + + + sig { params(errors: T.nilable(T::Array[::OpenApiSDK::Operations::GetTokenErrors])).void } + def initialize(errors: nil) + @errors = errors + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gettoken_response.rb b/lib/open_api_sdk/models/operations/gettoken_response.rb index e6f5dae..fc54d92 100644 --- a/lib/open_api_sdk/models/operations/gettoken_response.rb +++ b/lib/open_api_sdk/models/operations/gettoken_response.rb @@ -20,16 +20,19 @@ module OpenApiSDK field :raw_response, ::Faraday::Response # HTTP response status code for this operation field :status_code, ::Integer + # Access Token + field :two_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody) # X-Plex-Client-Identifier is missing - field :object, T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody) + field :four_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetTokenPlexResponseBody) - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil) + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetTokenResponseBody), four_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetTokenPlexResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_application_json_object: nil, four_hundred_application_json_object: nil) @content_type = content_type @raw_response = raw_response @status_code = status_code - @object = object + @two_hundred_application_json_object = two_hundred_application_json_object + @four_hundred_application_json_object = four_hundred_application_json_object end end end diff --git a/lib/open_api_sdk/models/operations/gettoken_responsebody.rb b/lib/open_api_sdk/models/operations/gettoken_responsebody.rb index ab3074d..38920bd 100644 --- a/lib/open_api_sdk/models/operations/gettoken_responsebody.rb +++ b/lib/open_api_sdk/models/operations/gettoken_responsebody.rb @@ -10,17 +10,53 @@ module OpenApiSDK 'https://plex.tv/api/v2' ].freeze - # X-Plex-Client-Identifier is missing + # Access Token class GetTokenResponseBody < ::OpenApiSDK::Utils::FieldAugmented extend T::Sig - field :errors, T.nilable(T::Array[::OpenApiSDK::Operations::GetTokenErrors]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('errors') } } + field :auth_token, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('authToken') } } + + field :client_identifier, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clientIdentifier') } } + + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :expires_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :expires_in, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresIn') } } + # PinID for use with authentication + field :id, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :location, T.nilable(::OpenApiSDK::Operations::GetTokenLocation), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('location') } } + + field :new_registration, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('newRegistration') } } + + field :product, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + # 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 + # + field :qr, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('qr') } } + + field :trusted, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trusted') } } - sig { params(errors: T.nilable(T::Array[::OpenApiSDK::Operations::GetTokenErrors])).void } - def initialize(errors: nil) - @errors = errors + sig { params(auth_token: T.nilable(::String), client_identifier: T.nilable(::String), code: T.nilable(::String), created_at: T.nilable(::DateTime), expires_at: T.nilable(::DateTime), expires_in: T.nilable(::Float), id: T.nilable(::Float), location: T.nilable(::OpenApiSDK::Operations::GetTokenLocation), new_registration: T.nilable(::String), product: T.nilable(::String), qr: T.nilable(::String), trusted: T.nilable(T::Boolean)).void } + def initialize(auth_token: nil, client_identifier: nil, code: nil, created_at: nil, expires_at: nil, expires_in: nil, id: nil, location: nil, new_registration: nil, product: nil, qr: nil, trusted: nil) + @auth_token = auth_token + @client_identifier = client_identifier + @code = code + @created_at = created_at + @expires_at = expires_at + @expires_in = expires_in + @id = id + @location = location + @new_registration = new_registration + @product = product + @qr = qr + @trusted = trusted end end end diff --git a/lib/open_api_sdk/models/operations/getwatchlist_errors.rb b/lib/open_api_sdk/models/operations/getwatchlist_errors.rb new file mode 100644 index 0000000..980e7f0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getwatchlist_errors.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_WATCHLIST_ERRORS_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + + class GetWatchlistErrors < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :code, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } + + field :status, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } } + + + sig { params(code: T.nilable(::Float), message: T.nilable(::String), status: T.nilable(::Float)).void } + def initialize(code: nil, message: nil, status: nil) + @code = code + @message = message + @status = status + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getwatchlist_request.rb b/lib/open_api_sdk/models/operations/getwatchlist_request.rb new file mode 100644 index 0000000..edb81bb --- /dev/null +++ b/lib/open_api_sdk/models/operations/getwatchlist_request.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_WATCHLIST_REQUEST_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + + class GetWatchlistRequest < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # Filter + field :filter, ::OpenApiSDK::Operations::Filter, { 'path_param': { 'field_name': 'filter', 'style': 'simple', 'explode': false } } + # User Token + field :x_plex_token, ::String, { 'query_param': { 'field_name': 'X-Plex-Token', 'style': 'form', 'explode': true } } + # include collections in the results + # + field :include_collections, T.nilable(::OpenApiSDK::Operations::IncludeCollections), { 'query_param': { 'field_name': 'includeCollections', 'style': 'form', 'explode': true } } + # include external media in the results + # + field :include_external_media, T.nilable(::OpenApiSDK::Operations::IncludeExternalMedia), { 'query_param': { 'field_name': 'includeExternalMedia', 'style': 'form', 'explode': true } } + # The type of library to filter. Can be "movie" or "show", or all if not present. + # + field :libtype, T.nilable(::OpenApiSDK::Operations::Libtype), { 'query_param': { 'field_name': 'libtype', 'style': 'form', 'explode': true } } + # 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. + # + field :maxresults, T.nilable(::Integer), { 'query_param': { 'field_name': 'maxresults', 'style': 'form', 'explode': true } } + # 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" + # + field :sort, T.nilable(::String), { 'query_param': { 'field_name': 'sort', 'style': 'form', 'explode': true } } + # 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. + # + field :x_plex_container_size, T.nilable(::Integer), { 'query_param': { 'field_name': 'X-Plex-Container-Size', 'style': 'form', 'explode': true } } + # 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. + # + field :x_plex_container_start, T.nilable(::Integer), { 'query_param': { 'field_name': 'X-Plex-Container-Start', 'style': 'form', 'explode': true } } + + + sig { params(filter: ::OpenApiSDK::Operations::Filter, x_plex_token: ::String, include_collections: T.nilable(::OpenApiSDK::Operations::IncludeCollections), include_external_media: T.nilable(::OpenApiSDK::Operations::IncludeExternalMedia), libtype: T.nilable(::OpenApiSDK::Operations::Libtype), maxresults: T.nilable(::Integer), sort: T.nilable(::String), x_plex_container_size: T.nilable(::Integer), x_plex_container_start: T.nilable(::Integer)).void } + def initialize(filter: nil, x_plex_token: nil, include_collections: nil, include_external_media: nil, libtype: nil, maxresults: nil, sort: nil, x_plex_container_size: nil, x_plex_container_start: nil) + @filter = filter + @x_plex_token = x_plex_token + @include_collections = include_collections + @include_external_media = include_external_media + @libtype = libtype + @maxresults = maxresults + @sort = sort + @x_plex_container_size = x_plex_container_size + @x_plex_container_start = x_plex_container_start + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getwatchlist_response.rb b/lib/open_api_sdk/models/operations/getwatchlist_response.rb new file mode 100644 index 0000000..197b559 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getwatchlist_response.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_WATCHLIST_RESPONSE_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + + class GetWatchlistResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Watchlist Data + field :two_hundred_application_json_object, T.nilable(::OpenApiSDK::Operations::GetWatchlistResponseBody) + # Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + field :four_hundred_and_one_application_json_object, T.nilable(::OpenApiSDK::Operations::GetWatchlistWatchlistResponseBody) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_hundred_application_json_object: T.nilable(::OpenApiSDK::Operations::GetWatchlistResponseBody), four_hundred_and_one_application_json_object: T.nilable(::OpenApiSDK::Operations::GetWatchlistWatchlistResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_application_json_object: nil, four_hundred_and_one_application_json_object: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @two_hundred_application_json_object = two_hundred_application_json_object + @four_hundred_and_one_application_json_object = four_hundred_and_one_application_json_object + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getwatchlist_responsebody.rb b/lib/open_api_sdk/models/operations/getwatchlist_responsebody.rb new file mode 100644 index 0000000..a5e7da9 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getwatchlist_responsebody.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_WATCHLIST_RESPONSE_BODY_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + # Watchlist Data + class GetWatchlistResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :identifier, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('identifier') } } + + field :library_section_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionID') } } + + field :library_section_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionTitle') } } + + field :metadata, T.nilable(T::Array[::OpenApiSDK::Operations::Metadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Metadata') } } + + field :offset, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('offset') } } + + field :size, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :total_size, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalSize') } } + + + sig { params(identifier: T.nilable(::String), library_section_id: T.nilable(::String), library_section_title: T.nilable(::String), metadata: T.nilable(T::Array[::OpenApiSDK::Operations::Metadata]), offset: T.nilable(::Integer), size: T.nilable(::Integer), total_size: T.nilable(::Integer)).void } + def initialize(identifier: nil, library_section_id: nil, library_section_title: nil, metadata: nil, offset: nil, size: nil, total_size: nil) + @identifier = identifier + @library_section_id = library_section_id + @library_section_title = library_section_title + @metadata = metadata + @offset = offset + @size = size + @total_size = total_size + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getwatchlist_watchlist_responsebody.rb b/lib/open_api_sdk/models/operations/getwatchlist_watchlist_responsebody.rb new file mode 100644 index 0000000..073e424 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getwatchlist_watchlist_responsebody.rb @@ -0,0 +1,27 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + GET_WATCHLIST_WATCHLIST_RESPONSE_BODY_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + # Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + class GetWatchlistWatchlistResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :errors, T.nilable(T::Array[::OpenApiSDK::Operations::GetWatchlistErrors]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('errors') } } + + + sig { params(errors: T.nilable(T::Array[::OpenApiSDK::Operations::GetWatchlistErrors])).void } + def initialize(errors: nil) + @errors = errors + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/image.rb b/lib/open_api_sdk/models/operations/image.rb new file mode 100644 index 0000000..c0e175a --- /dev/null +++ b/lib/open_api_sdk/models/operations/image.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + IMAGE_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + + class Image < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :alt, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('alt') } } + + field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + field :url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(alt: T.nilable(::String), type: T.nilable(::String), url: T.nilable(::String)).void } + def initialize(alt: nil, type: nil, url: nil) + @alt = alt + @type = type + @url = url + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/includecollections.rb b/lib/open_api_sdk/models/operations/includecollections.rb new file mode 100644 index 0000000..a7034c5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/includecollections.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + INCLUDE_COLLECTIONS_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + # IncludeCollections - include collections in the results + # + class IncludeCollections < T::Enum + enums do + ONE = new(1) + ZERO = new(0) + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/includeexternalmedia.rb b/lib/open_api_sdk/models/operations/includeexternalmedia.rb new file mode 100644 index 0000000..91d0180 --- /dev/null +++ b/lib/open_api_sdk/models/operations/includeexternalmedia.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + INCLUDE_EXTERNAL_MEDIA_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + # IncludeExternalMedia - include external media in the results + # + class IncludeExternalMedia < T::Enum + enums do + ONE = new(1) + ZERO = new(0) + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/libtype.rb b/lib/open_api_sdk/models/operations/libtype.rb new file mode 100644 index 0000000..0c548c4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/libtype.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + LIBTYPE_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze + + # Libtype - The type of library to filter. Can be "movie" or "show", or all if not present. + # + class Libtype < T::Enum + enums do + MOVIE = new('movie') + SHOW = new('show') + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/location.rb b/lib/open_api_sdk/models/operations/location.rb index ff59fb2..035a162 100644 --- a/lib/open_api_sdk/models/operations/location.rb +++ b/lib/open_api_sdk/models/operations/location.rb @@ -29,14 +29,14 @@ module OpenApiSDK field :in_privacy_restricted_country, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('in_privacy_restricted_country') } } - field :postal_code, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('postal_code') } } + field :postal_code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('postal_code') } } field :subdivisions, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subdivisions') } } field :time_zone, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('time_zone') } } - sig { params(city: T.nilable(::String), code: T.nilable(::String), continent_code: T.nilable(::String), coordinates: T.nilable(::String), country: T.nilable(::String), european_union_member: T.nilable(T::Boolean), in_privacy_restricted_country: T.nilable(T::Boolean), postal_code: T.nilable(::Float), subdivisions: T.nilable(::String), time_zone: T.nilable(::String)).void } + sig { params(city: T.nilable(::String), code: T.nilable(::String), continent_code: T.nilable(::String), coordinates: T.nilable(::String), country: T.nilable(::String), european_union_member: T.nilable(T::Boolean), in_privacy_restricted_country: T.nilable(T::Boolean), postal_code: T.nilable(::String), subdivisions: T.nilable(::String), time_zone: T.nilable(::String)).void } def initialize(city: nil, code: nil, continent_code: nil, coordinates: nil, country: nil, european_union_member: nil, in_privacy_restricted_country: nil, postal_code: nil, subdivisions: nil, time_zone: nil) @city = city @code = code diff --git a/lib/open_api_sdk/models/operations/metadata.rb b/lib/open_api_sdk/models/operations/metadata.rb index fa9a0bc..2bf5fc8 100644 --- a/lib/open_api_sdk/models/operations/metadata.rb +++ b/lib/open_api_sdk/models/operations/metadata.rb @@ -6,15 +6,16 @@ module OpenApiSDK module Operations + METADATA_SERVERS = [ + 'https://metadata.provider.plex.tv' + ].freeze class Metadata < ::OpenApiSDK::Utils::FieldAugmented extend T::Sig - field :added_at, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('addedAt') } } - - field :allow_sync, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowSync') } } + field :added_at, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('addedAt') } } field :art, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('art') } } @@ -22,94 +23,105 @@ module OpenApiSDK field :audience_rating_image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('audienceRatingImage') } } - field :chapter_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chapterSource') } } + field :availability_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('availabilityId') } } + + field :banner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('banner') } } + + field :child_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('childCount') } } field :content_rating, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('contentRating') } } - field :country, T.nilable(T::Array[::OpenApiSDK::Operations::Country]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Country') } } + field :duration, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration') } } - field :director, T.nilable(T::Array[::OpenApiSDK::Operations::Director]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Director') } } - - field :duration, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration') } } - - field :genre, T.nilable(T::Array[::OpenApiSDK::Operations::Genre]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Genre') } } + field :expires_at, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt') } } field :guid, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guid') } } + field :image, T.nilable(T::Array[::OpenApiSDK::Operations::Image]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Image') } } + + field :imdb_rating_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('imdbRatingCount') } } + + field :is_continuing_series, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('isContinuingSeries') } } + field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } - field :library_section_id, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionID') } } + field :leaf_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leafCount') } } - field :library_section_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionTitle') } } + field :originally_available_at, T.nilable(::Date), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('originallyAvailableAt'), 'decoder': Utils.date_from_iso_format(true) } } - field :library_section_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('librarySectionUUID') } } + field :original_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('originalTitle') } } - field :media, T.nilable(T::Array[::OpenApiSDK::Operations::Media]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Media') } } + field :playable_key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('playableKey') } } - field :originally_available_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('originallyAvailableAt'), 'decoder': Utils.datetime_from_iso_format(true) } } - - field :primary_extra_key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('primaryExtraKey') } } + field :public_pages_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicPagesURL') } } field :rating, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rating') } } field :rating_image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingImage') } } - field :rating_key, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingKey') } } + field :rating_key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingKey') } } - field :role, T.nilable(T::Array[::OpenApiSDK::Operations::Role]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Role') } } + field :skip_children, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('skipChildren') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :streaming_media_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('streamingMediaId') } } field :studio, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('studio') } } - field :summary, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('summary') } } + field :subtype, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subtype') } } field :tagline, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagline') } } + field :theme, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('theme') } } + field :thumb, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('thumb') } } field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } field :type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } - field :updated_at, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } } + field :user_state, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('userState') } } - field :writer, T.nilable(T::Array[::OpenApiSDK::Operations::Writer]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Writer') } } - - field :year, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('year') } } + field :year, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('year') } } - sig { params(added_at: T.nilable(::Float), allow_sync: T.nilable(T::Boolean), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), chapter_source: T.nilable(::String), content_rating: T.nilable(::String), country: T.nilable(T::Array[::OpenApiSDK::Operations::Country]), director: T.nilable(T::Array[::OpenApiSDK::Operations::Director]), duration: T.nilable(::Float), genre: T.nilable(T::Array[::OpenApiSDK::Operations::Genre]), guid: T.nilable(::String), key: T.nilable(::String), library_section_id: T.nilable(::Float), library_section_title: T.nilable(::String), library_section_uuid: T.nilable(::String), media: T.nilable(T::Array[::OpenApiSDK::Operations::Media]), originally_available_at: T.nilable(::DateTime), primary_extra_key: T.nilable(::String), rating: T.nilable(::Float), rating_image: T.nilable(::String), rating_key: T.nilable(::Float), role: T.nilable(T::Array[::OpenApiSDK::Operations::Role]), studio: T.nilable(::String), summary: T.nilable(::String), tagline: T.nilable(::String), thumb: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String), updated_at: T.nilable(::Float), writer: T.nilable(T::Array[::OpenApiSDK::Operations::Writer]), year: T.nilable(::Float)).void } - def initialize(added_at: nil, allow_sync: nil, art: nil, audience_rating: nil, audience_rating_image: nil, chapter_source: nil, content_rating: nil, country: nil, director: nil, duration: nil, genre: nil, guid: nil, key: nil, library_section_id: nil, library_section_title: nil, library_section_uuid: nil, media: nil, originally_available_at: nil, primary_extra_key: nil, rating: nil, rating_image: nil, rating_key: nil, role: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, writer: nil, year: nil) + sig { params(added_at: T.nilable(::Integer), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), availability_id: T.nilable(::String), banner: T.nilable(::String), child_count: T.nilable(::Integer), content_rating: T.nilable(::String), duration: T.nilable(::Integer), expires_at: T.nilable(::Integer), guid: T.nilable(::String), image: T.nilable(T::Array[::OpenApiSDK::Operations::Image]), imdb_rating_count: T.nilable(::Integer), is_continuing_series: T.nilable(T::Boolean), key: T.nilable(::String), leaf_count: T.nilable(::Integer), originally_available_at: T.nilable(::Date), original_title: T.nilable(::String), playable_key: T.nilable(::String), public_pages_url: T.nilable(::String), rating: T.nilable(::Float), rating_image: T.nilable(::String), rating_key: T.nilable(::String), skip_children: T.nilable(T::Boolean), slug: T.nilable(::String), streaming_media_id: T.nilable(::String), studio: T.nilable(::String), subtype: T.nilable(::String), tagline: T.nilable(::String), theme: T.nilable(::String), thumb: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String), user_state: T.nilable(T::Boolean), year: T.nilable(::Integer)).void } + def initialize(added_at: nil, art: nil, audience_rating: nil, audience_rating_image: nil, availability_id: nil, banner: nil, child_count: nil, content_rating: nil, duration: nil, expires_at: nil, guid: nil, image: nil, imdb_rating_count: nil, is_continuing_series: nil, key: nil, leaf_count: nil, originally_available_at: nil, original_title: nil, playable_key: nil, public_pages_url: nil, rating: nil, rating_image: nil, rating_key: nil, skip_children: nil, slug: nil, streaming_media_id: nil, studio: nil, subtype: nil, tagline: nil, theme: nil, thumb: nil, title: nil, type: nil, user_state: nil, year: nil) @added_at = added_at - @allow_sync = allow_sync @art = art @audience_rating = audience_rating @audience_rating_image = audience_rating_image - @chapter_source = chapter_source + @availability_id = availability_id + @banner = banner + @child_count = child_count @content_rating = content_rating - @country = country - @director = director @duration = duration - @genre = genre + @expires_at = expires_at @guid = guid + @image = image + @imdb_rating_count = imdb_rating_count + @is_continuing_series = is_continuing_series @key = key - @library_section_id = library_section_id - @library_section_title = library_section_title - @library_section_uuid = library_section_uuid - @media = media + @leaf_count = leaf_count @originally_available_at = originally_available_at - @primary_extra_key = primary_extra_key + @original_title = original_title + @playable_key = playable_key + @public_pages_url = public_pages_url @rating = rating @rating_image = rating_image @rating_key = rating_key - @role = role + @skip_children = skip_children + @slug = slug + @streaming_media_id = streaming_media_id @studio = studio - @summary = summary + @subtype = subtype @tagline = tagline + @theme = theme @thumb = thumb @title = title @type = type - @updated_at = updated_at - @writer = writer + @user_state = user_state @year = year end end diff --git a/lib/open_api_sdk/plex.rb b/lib/open_api_sdk/plex.rb index fcecebc..b6bff10 100644 --- a/lib/open_api_sdk/plex.rb +++ b/lib/open_api_sdk/plex.rb @@ -30,12 +30,50 @@ module OpenApiSDK end - sig { params(strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetPinResponse) } - def get_pin(strong = nil, x_plex_client_identifier = nil, server_url = nil) + sig { returns(::OpenApiSDK::Operations::GetHomeDataResponse) } + def get_home_data + # get_home_data - Get Plex Home Data + # Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/home" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.get(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::GetHomeDataResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetHomeDataResponseBody) + res.two_hundred_application_json_object = out + end + elsif r.status == 400 + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetHomeDataPlexResponseBody) + res.four_hundred_and_one_application_json_object = out + end + end + res + end + + + sig { params(x_plex_product: ::String, strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetPinResponse) } + def get_pin(x_plex_product, strong = nil, x_plex_client_identifier = nil, server_url = nil) # get_pin - Get a Pin # Retrieve a Pin from Plex.tv for authentication flows request = ::OpenApiSDK::Operations::GetPinRequest.new( + x_plex_product: x_plex_product, strong: strong, x_plex_client_identifier: x_plex_client_identifier ) @@ -58,10 +96,10 @@ module OpenApiSDK res = ::OpenApiSDK::Operations::GetPinResponse.new( status_code: r.status, content_type: content_type, raw_response: r ) - if r.status == 200 + if r.status == 201 if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetPinResponseBody) - res.two_hundred_application_json_object = out + res.two_hundred_and_one_application_json_object = out end elsif r.status == 400 if Utils.match_content_type(content_type, 'application/json') @@ -106,10 +144,14 @@ module OpenApiSDK status_code: r.status, content_type: content_type, raw_response: r ) if r.status == 200 - elsif r.status == 400 if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetTokenResponseBody) - res.object = out + res.two_hundred_application_json_object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetTokenPlexResponseBody) + res.four_hundred_application_json_object = out end end res diff --git a/lib/open_api_sdk/plex_api.rb b/lib/open_api_sdk/plex_api.rb index 4bccf3b..bbcb467 100644 --- a/lib/open_api_sdk/plex_api.rb +++ b/lib/open_api_sdk/plex_api.rb @@ -13,7 +13,7 @@ module OpenApiSDK class PlexAPI extend T::Sig - attr_accessor :server, :media, :video, :activities, :butler, :hubs, :search, :library, :log, :plex, :playlists, :authentication, :statistics, :sessions, :updater + attr_accessor :server, :media, :video, :activities, :butler, :plex, :hubs, :search, :library, :log, :playlists, :authentication, :statistics, :sessions, :updater, :watchlist sig do params(client: Faraday::Request, @@ -118,16 +118,17 @@ module OpenApiSDK @video = Video.new(@sdk_configuration) @activities = Activities.new(@sdk_configuration) @butler = Butler.new(@sdk_configuration) + @plex = Plex.new(@sdk_configuration) @hubs = Hubs.new(@sdk_configuration) @search = Search.new(@sdk_configuration) @library = Library.new(@sdk_configuration) @log = Log.new(@sdk_configuration) - @plex = Plex.new(@sdk_configuration) @playlists = Playlists.new(@sdk_configuration) @authentication = Authentication.new(@sdk_configuration) @statistics = Statistics.new(@sdk_configuration) @sessions = Sessions.new(@sdk_configuration) @updater = Updater.new(@sdk_configuration) + @watchlist = Watchlist.new(@sdk_configuration) end end end diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index 25452d5..9bbf65a 100644 --- a/lib/open_api_sdk/sdkconfiguration.rb +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -42,9 +42,9 @@ module OpenApiSDK @globals = globals.nil? ? {} : globals @language = 'ruby' @openapi_doc_version = '0.0.3' - @sdk_version = '0.1.6' - @gen_version = '2.338.12' - @user_agent = 'speakeasy-sdk/ruby 0.1.6 2.338.12 0.0.3 plexruby' + @sdk_version = '0.2.0' + @gen_version = '2.342.6' + @user_agent = 'speakeasy-sdk/ruby 0.2.0 2.342.6 0.0.3 plexruby' end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/open_api_sdk/watchlist.rb b/lib/open_api_sdk/watchlist.rb new file mode 100644 index 0000000..c9a059a --- /dev/null +++ b/lib/open_api_sdk/watchlist.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'sorbet-runtime' + +module OpenApiSDK + extend T::Sig + class Watchlist + extend T::Sig + + # GET_WATCHLIST_SERVERS contains the list of server urls available to the SDK. + GET_WATCHLIST_SERVERS = [ + 'https://metadata.provider.plex.tv', # The plex metadata provider server + ].freeze + # API Calls that perform operations with Plex Media Server Watchlists + # + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::GetWatchlistRequest), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetWatchlistResponse) } + def get_watchlist(request, server_url = nil) + # get_watchlist - Get User Watchlist + # Get User Watchlist + base_url = Utils.template_url(GET_WATCHLIST_SERVERS[0], { + }) + base_url = server_url if !server_url.nil? + url = Utils.generate_url( + ::OpenApiSDK::Operations::GetWatchlistRequest, + base_url, + '/library/sections/watchlist/{filter}', + request, + @sdk_configuration.globals + ) + headers = {} + query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetWatchlistRequest, request, @sdk_configuration.globals) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.get(url) do |req| + req.headers = headers + req.params = query_params + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::GetWatchlistResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetWatchlistResponseBody) + res.two_hundred_application_json_object = out + end + elsif r.status == 400 + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetWatchlistWatchlistResponseBody) + res.four_hundred_and_one_application_json_object = out + end + end + res + end + end +end diff --git a/lib/plexruby.rb b/lib/plexruby.rb index 0ef94b6..ff37a9e 100644 --- a/lib/plexruby.rb +++ b/lib/plexruby.rb @@ -13,16 +13,17 @@ module OpenApiSDK autoload :Video, 'open_api_sdk/video' autoload :Activities, 'open_api_sdk/activities' autoload :Butler, 'open_api_sdk/butler' + autoload :Plex, 'open_api_sdk/plex' autoload :Hubs, 'open_api_sdk/hubs' autoload :Search, 'open_api_sdk/search' autoload :Library, 'open_api_sdk/library' autoload :Log, 'open_api_sdk/log' - autoload :Plex, 'open_api_sdk/plex' autoload :Playlists, 'open_api_sdk/playlists' autoload :Authentication, 'open_api_sdk/authentication' autoload :Statistics, 'open_api_sdk/statistics' autoload :Sessions, 'open_api_sdk/sessions' autoload :Updater, 'open_api_sdk/updater' + autoload :Watchlist, 'open_api_sdk/watchlist' end require_relative 'open_api_sdk/utils/t' diff --git a/plexruby.gemspec b/plexruby.gemspec index 4ac1214..8e5a1bc 100644 --- a/plexruby.gemspec +++ b/plexruby.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'plexruby' - s.version = '0.1.6' + s.version = '0.2.0' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = ''