diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7e2247b..e313beb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,13 @@ -speakeasyVersion: 1.402.14 +speakeasyVersion: 1.509.0 sources: merge-code-samples-into-spec: sourceNamespace: merge-code-samples-into-spec - sourceRevisionDigest: sha256:152775604ae1abdda1426eab3c46f36d4ed6393898531b901a0ee6c535ae3ac6 - sourceBlobDigest: sha256:57a64aef5317a4620d6d429a780bda8884f3c457829920d1249d744ab8840a78 + sourceRevisionDigest: sha256:b28c0b9e22357a682f336b10552700fc8a8094798cbfcca03dafeeaf2f045ce2 + sourceBlobDigest: sha256:930f342a125400a8bc5ea62a4dfc5fbd47fdfae7ce9f0aff42137f533b32e1de tags: - latest - - main + - speakeasy-sdk-regen-1727310453 + - 0.0.3 targets: {} workflow: workflowVersion: 1.0.0 diff --git a/openapi-with-code-samples.yaml b/openapi-with-code-samples.yaml index dc9ee58..3526f7e 100644 --- a/openapi-with-code-samples.yaml +++ b/openapi-with-code-samples.yaml @@ -2,7 +2,32 @@ openapi: 3.1.0 info: version: 0.0.3 title: Plex-API - description: An Open API Spec for interacting with Plex.tv and Plex Media Server + summary: An Open API Spec for interacting with Plex.tv and Plex Media Server + description: | + # Plex Media Server OpenAPI Specification + + An Open Source OpenAPI Specification for Plex Media Server + + Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) + + ## Documentation + + [API Documentation](https://plexapi.dev) + + ## SDKs + + The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). + + | Language | Repository | Releases | Other | + | --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | + | Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | + | JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | + | Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | + | Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | + | Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | + | PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | + | Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | + | C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - contact: name: Luke Hagar url: 'https://www.LukeHagar.com' @@ -23,47 +48,6 @@ servers: default: 10.10.10.47 port: default: '32400' -x-speakeasy-globals: - parameters: - - name: X-Plex-Client-Identifier - x-speakeasy-name-override: ClientID - description: | - 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) - in: query - schema: - type: string - example: gcgzw5rz2xovp84b4vha3a40 - required: true - - name: X-Plex-Product - x-speakeasy-name-override: ClientName - in: query - required: false - schema: - type: string - example: Plex Web - - name: X-Plex-Version - x-speakeasy-name-override: ClientVersion - in: query - required: false - schema: - type: string - example: 4.133.0 - - name: X-Plex-Platform - x-speakeasy-name-override: ClientPlatform - in: query - required: false - schema: - type: string - example: Chrome - - name: X-Plex-Device - x-speakeasy-name-override: DeviceName - in: query - required: false - schema: - type: string - example: Linux security: - accessToken: [] components: @@ -262,62 +246,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getServerCapabilities(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getServerCapabilities( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getServerCapabilities - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getServerCapabilities - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetServerCapabilities(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetServerCapabilities(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getServerCapabilities source: |- @@ -335,11 +285,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -352,7 +297,21 @@ paths: } - lang: typescript label: getServerCapabilities - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getServerCapabilities();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getServerCapabilities(); + + // Handle the result + console.log(result); + } + + run(); '/:/prefs': get: tags: @@ -469,62 +428,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getServerPreferences(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getServerPreferences( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getServerPreferences - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_preferences()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_preferences()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getServerPreferences - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetServerPreferences(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetServerPreferences(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getServerPreferences source: |- @@ -542,11 +467,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerPreferencesResponse res = sdk.server().getServerPreferences() @@ -559,7 +479,21 @@ paths: } - lang: typescript label: getServerPreferences - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getServerPreferences();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getServerPreferences(); + + // Handle the result + console.log(result); + } + + run(); '/:/scrobble': get: tags: @@ -637,63 +571,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->media->markPlayed(59398); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->media->markPlayed( + key: 59398 + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: markPlayed - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: markPlayed - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Media.MarkPlayed(ctx, 59398) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Media.MarkPlayed(ctx, 59398)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: markPlayed source: |- @@ -711,11 +610,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); MarkPlayedResponse res = sdk.media().markPlayed() @@ -727,7 +621,21 @@ paths: } - lang: typescript label: markPlayed - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.media.markPlayed(59398);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.media.markPlayed(59398); + + // Handle the result + console.log(result); + } + + run(); '/:/unscrobble': get: tags: @@ -805,63 +713,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->media->markUnplayed(59398); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->media->markUnplayed( + key: 59398 + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: markUnplayed - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: markUnplayed - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Media.MarkUnplayed(ctx, 59398) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Media.MarkUnplayed(ctx, 59398)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: markUnplayed source: |- @@ -879,11 +752,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); MarkUnplayedResponse res = sdk.media().markUnplayed() @@ -895,7 +763,21 @@ paths: } - lang: typescript label: markUnplayed - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.media.markUnplayed(59398);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.media.markUnplayed(59398); + + // Handle the result + console.log(result); + } + + run(); '/:/progress': post: tags: @@ -987,63 +869,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->media->updatePlayProgress('', 90000, 'played'); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->media->updatePlayProgress( + key: '', + time: 90000, + state: 'played' + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: updatePlayProgress - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: updatePlayProgress - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Media.UpdatePlayProgress(ctx, "", 90000, "played") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Media.UpdatePlayProgress(ctx, \"\", 90000, \"played\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: updatePlayProgress source: |- @@ -1061,11 +911,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() @@ -1079,7 +924,21 @@ paths: } - lang: typescript label: updatePlayProgress - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.media.updatePlayProgress(\"\", 90000, \"played\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); + + // Handle the result + console.log(result); + } + + run(); '/:/timeline': get: tags: @@ -1224,87 +1083,40 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetTimelineRequest( + ratingKey: 23409, + key: '/library/metadata/23409', + state: Operations\State::Playing, + hasMDE: 1, + time: 2000, + duration: 10000, + context: 'home:hub.continueWatching', + playQueueItemID: 1, + playBackTime: 2000, + row: 1, ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->video->getTimeline( + request: $request + ); - try { - $request = new Operations\GetTimelineRequest( - ratingKey: 23409, - key: '/library/metadata/23409', - state: Operations\State::Playing, - hasMDE: 1, - time: 2000, - duration: 10000, - context: 'home:hub.continueWatching', - playQueueItemID: 1, - playBackTime: 2000, - row: 1, - ); - $response = $sdk->video->getTimeline($request); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: getTimeline - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetTimelineRequest.new(\n rating_key: 23409.0,\n key: \"/library/metadata/23409\",\n state: ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetTimelineRequest.new(\n rating_key: 23409.0,\n key: \"/library/metadata/23409\",\n state: ::PlexRubySDK::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" - lang: go label: getTimeline - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{ - RatingKey: 23409, - Key: "/library/metadata/23409", - State: operations.StatePlaying, - HasMDE: 1, - Time: 2000, - Duration: 10000, - Context: "home:hub.continueWatching", - PlayQueueItemID: 1, - PlayBackTime: 2000, - Row: 1, - }) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{\n RatingKey: 23409,\n Key: \"/library/metadata/23409\",\n State: operations.StatePlaying,\n HasMDE: 1,\n Time: 2000,\n Duration: 10000,\n Context: \"home:hub.continueWatching\",\n PlayQueueItemID: 1,\n PlayBackTime: 2000,\n Row: 1,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: getTimeline source: |- @@ -1324,11 +1136,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetTimelineRequest req = GetTimelineRequest.builder() @@ -1353,7 +1160,33 @@ paths: } - lang: typescript label: getTimeline - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { State } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.video.getTimeline({\n ratingKey: 23409,\n key: \"/library/metadata/23409\",\n state: State.Playing,\n hasMDE: 1,\n time: 2000,\n duration: 10000,\n context: \"home:hub.continueWatching\",\n playQueueItemID: 1,\n playBackTime: 2000,\n row: 1,\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { State } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.video.getTimeline({ + ratingKey: 23409, + key: "/library/metadata/23409", + state: State.Playing, + hasMDE: 1, + time: 2000, + duration: 10000, + context: "home:hub.continueWatching", + playQueueItemID: 1, + playBackTime: 2000, + row: 1, + }); + + // Handle the result + console.log(result); + } + + run(); /activities: get: tags: @@ -1457,62 +1290,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->activities->getServerActivities(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->activities->getServerActivities( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getServerActivities - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.get_server_activities()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.activities.get_server_activities()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getServerActivities - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Activities.GetServerActivities(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Activities.GetServerActivities(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getServerActivities source: |- @@ -1530,11 +1329,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerActivitiesResponse res = sdk.activities().getServerActivities() @@ -1547,7 +1341,21 @@ paths: } - lang: typescript label: getServerActivities - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.activities.getServerActivities();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.activities.getServerActivities(); + + // Handle the result + console.log(result); + } + + run(); '/activities/{activityUUID}': delete: tags: @@ -1625,63 +1433,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->activities->cancelServerActivities('25b71ed5-0f9d-461c-baa7-d404e9e10d3e'); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->activities->cancelServerActivities( + activityUUID: '25b71ed5-0f9d-461c-baa7-d404e9e10d3e' + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: cancelServerActivities - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: cancelServerActivities - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Activities.CancelServerActivities(ctx, "25b71ed5-0f9d-461c-baa7-d404e9e10d3e") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Activities.CancelServerActivities(ctx, \"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: cancelServerActivities source: |- @@ -1699,11 +1472,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() @@ -1715,7 +1483,21 @@ paths: } - lang: typescript label: cancelServerActivities - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.activities.cancelServerActivities(\"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + + // Handle the result + console.log(result); + } + + run(); /butler: get: tags: @@ -1814,62 +1596,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->butler->getButlerTasks(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->butler->getButlerTasks( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getButlerTasks - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.get_butler_tasks()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.get_butler_tasks()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getButlerTasks - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Butler.GetButlerTasks(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Butler.GetButlerTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getButlerTasks source: |- @@ -1887,11 +1635,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetButlerTasksResponse res = sdk.butler().getButlerTasks() @@ -1904,7 +1647,21 @@ paths: } - lang: typescript label: getButlerTasks - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.butler.getButlerTasks();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.butler.getButlerTasks(); + + // Handle the result + console.log(result); + } + + run(); post: tags: - Butler @@ -1978,62 +1735,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->butler->startAllTasks(); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->butler->startAllTasks( + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: startAllTasks - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: startAllTasks - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Butler.StartAllTasks(ctx) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Butler.StartAllTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: startAllTasks source: |- @@ -2051,11 +1774,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StartAllTasksResponse res = sdk.butler().startAllTasks() @@ -2066,7 +1784,21 @@ paths: } - lang: typescript label: startAllTasks - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.butler.startAllTasks();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.butler.startAllTasks(); + + // Handle the result + console.log(result); + } + + run(); delete: tags: - Butler @@ -2136,62 +1868,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->butler->stopAllTasks(); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->butler->stopAllTasks( + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: stopAllTasks - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: stopAllTasks - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Butler.StopAllTasks(ctx) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Butler.StopAllTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: stopAllTasks source: |- @@ -2209,11 +1907,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StopAllTasksResponse res = sdk.butler().stopAllTasks() @@ -2224,7 +1917,21 @@ paths: } - lang: typescript label: stopAllTasks - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.butler.stopAllTasks();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.butler.stopAllTasks(); + + // Handle the result + console.log(result); + } + + run(); '/butler/{taskName}': post: tags: @@ -2323,65 +2030,29 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->butler->startTask( + taskName: Operations\TaskName::CleanOldBundles ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->butler->startTask(Operations\TaskName::CleanOldBundles); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: startTask - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_task(task_name=::PlexRubySDK::Operations::TaskName::CLEAN_OLD_BUNDLES)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.start_task(task_name=::PlexRubySDK::Operations::TaskName::CLEAN_OLD_BUNDLES)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: startTask - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Butler.StartTask(ctx, operations.TaskNameCleanOldBundles) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Butler.StartTask(ctx, operations.TaskNameCleanOldBundles)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: startTask source: |- @@ -2400,11 +2071,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StartTaskResponse res = sdk.butler().startTask() @@ -2416,7 +2082,22 @@ paths: } - lang: typescript label: startTask - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { TaskName } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { TaskName } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); + + // Handle the result + console.log(result); + } + + run(); delete: tags: - Butler @@ -2510,65 +2191,29 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->butler->stopTask( + taskName: Operations\PathParamTaskName::BackupDatabase ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->butler->stopTask(Operations\PathParamTaskName::BackupDatabase); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: stopTask - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_task(task_name=::PlexRubySDK::Operations::PathParamTaskName::BACKUP_DATABASE)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.butler.stop_task(task_name=::PlexRubySDK::Operations::PathParamTaskName::BACKUP_DATABASE)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: stopTask - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameBackupDatabase) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameBackupDatabase)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: stopTask source: |- @@ -2587,11 +2232,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StopTaskResponse res = sdk.butler().stopTask() @@ -2603,7 +2243,22 @@ paths: } - lang: typescript label: stopTask - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { PathParamTaskName } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase); + + // Handle the result + console.log(result); + } + + run(); /clients: get: tags: @@ -2722,62 +2377,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getAvailableClients(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getAvailableClients( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getAvailableClients - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_available_clients()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_available_clients()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getAvailableClients - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetAvailableClients(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetAvailableClients(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getAvailableClients source: |- @@ -2795,11 +2416,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetAvailableClientsResponse res = sdk.server().getAvailableClients() @@ -2812,7 +2428,21 @@ paths: } - lang: typescript label: getAvailableClients - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getAvailableClients();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getAvailableClients(); + + // Handle the result + console.log(result); + } + + run(); /devices: get: tags: @@ -2915,62 +2545,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getDevices(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getDevices( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getDevices - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_devices()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_devices()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getDevices - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetDevices(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetDevices(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getDevices source: |- @@ -2988,11 +2584,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetDevicesResponse res = sdk.server().getDevices() @@ -3005,11 +2596,25 @@ paths: } - lang: typescript label: getDevices - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getDevices();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getDevices(); + + // Handle the result + console.log(result); + } + + run(); /companions: get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' tags: - Plex summary: Get Companions Data @@ -3110,62 +2715,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->plex->getCompanionsData(); - if ($response->responseBodies !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->plex->getCompanionsData( + + ); + + if ($response->responseBodies !== null) { + // handle response } - lang: ruby label: getCompanionsData - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_companions_data()\n\nif ! res.response_bodies.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_companions_data()\n\nif ! res.response_bodies.nil?\n # handle response\nend" - lang: go label: getCompanionsData - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetCompanionsData(ctx) - if err != nil { - log.Fatal(err) - } - if res.ResponseBodies != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Plex.GetCompanionsData(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.ResponseBodies != nil {\n // handle response\n }\n}" - lang: java label: getCompanionsData source: |- @@ -3183,11 +2754,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() @@ -3200,11 +2766,25 @@ paths: } - lang: typescript label: getCompanionsData - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getCompanionsData();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.plex.getCompanionsData(); + + // Handle the result + console.log(result); + } + + run(); /friends: get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' tags: - Plex summary: Get list of friends of the user logged in @@ -3361,62 +2941,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->plex->getUserFriends(); - if ($response->friends !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->plex->getUserFriends( + + ); + + if ($response->friends !== null) { + // handle response } - lang: ruby label: getUserFriends - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_user_friends()\n\nif ! res.friends.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_user_friends()\n\nif ! res.friends.nil?\n # handle response\nend" - lang: go label: getUserFriends - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetUserFriends(ctx) - if err != nil { - log.Fatal(err) - } - if res.Friends != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Plex.GetUserFriends(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Friends != nil {\n // handle response\n }\n}" - lang: java label: getUserFriends source: |- @@ -3434,11 +2980,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetUserFriendsResponse res = sdk.plex().getUserFriends() @@ -3451,11 +2992,25 @@ paths: } - lang: typescript label: getUserFriends - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getUserFriends();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.plex.getUserFriends(); + + // Handle the result + console.log(result); + } + + run(); /geoip: get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' security: [] tags: - Plex @@ -3603,55 +3158,23 @@ paths: use LukeHagar\Plex_API; - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->build(); + $sdk = Plex_API\PlexAPI::builder()->build(); - try { - $response = $sdk->plex->getGeoData(); - if ($response->geoData !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->plex->getGeoData( + + ); + + if ($response->geoData !== null) { + // handle response } - lang: ruby label: getGeoData - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\n\n \nres = s.plex.get_geo_data()\n\nif ! res.geo_data.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n \nres = s.plex.get_geo_data()\n\nif ! res.geo_data.nil?\n # handle response\nend" - lang: go label: getGeoData - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetGeoData(ctx) - if err != nil { - log.Fatal(err) - } - if res.GeoData != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Plex.GetGeoData(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.GeoData != nil {\n // handle response\n }\n}" - lang: java label: getGeoData source: |- @@ -3668,11 +3191,6 @@ paths: public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetGeoDataResponse res = sdk.plex().getGeoData() @@ -3685,7 +3203,19 @@ paths: } - lang: typescript label: getGeoData - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getGeoData();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.plex.getGeoData(); + + // Handle the result + console.log(result); + } + + run(); /home: get: tags: @@ -3776,62 +3306,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->plex->getHomeData(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->plex->getHomeData( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getHomeData - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_home_data()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_home_data()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getHomeData - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetHomeData(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Plex.GetHomeData(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getHomeData source: |- @@ -3849,11 +3345,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetHomeDataResponse res = sdk.plex().getHomeData() @@ -3866,7 +3357,21 @@ paths: } - lang: typescript label: getHomeData - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getHomeData();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.plex.getHomeData(); + + // Handle the result + console.log(result); + } + + run(); /hubs: get: tags: @@ -4068,64 +3573,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->hubs->getGlobalHubs( + count: 1262.49, + onlyTransient: Operations\OnlyTransient::One + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->hubs->getGlobalHubs(1262.49, Operations\OnlyTransient::One); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getGlobalHubs - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_global_hubs(count=1262.49, only_transient=::PlexRubySDK::Operations::OnlyTransient::ONE)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_global_hubs(count=1262.49, only_transient=::PlexRubySDK::Operations::OnlyTransient::ONE)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getGlobalHubs - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Hubs.GetGlobalHubs(ctx, nil, nil) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Hubs.GetGlobalHubs(ctx, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getGlobalHubs source: |- @@ -4144,11 +3616,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() @@ -4163,7 +3630,21 @@ paths: } - lang: typescript label: getGlobalHubs - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.hubs.getGlobalHubs();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.hubs.getGlobalHubs(); + + // Handle the result + console.log(result); + } + + run(); /hubs/home/recentlyAdded: get: tags: @@ -4195,7 +3676,7 @@ paths: - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season @@ -4208,12 +3689,18 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK required: true - name: includeMeta in: query @@ -4269,7 +3756,7 @@ paths: - size properties: size: - type: number + type: integer example: 50 offset: type: integer @@ -4282,6 +3769,7 @@ paths: example: com.plexapp.plugins.library allowSync: type: boolean + example: false - type: object properties: Meta: @@ -4304,7 +3792,10 @@ paths: example: /library/sections/2/all?type=2 type: type: string - example: show + example: filter + subtype: + type: string + example: clip title: type: string example: TV Shows @@ -4337,6 +3828,9 @@ paths: type: type: string example: filter + advanced: + type: boolean + example: true Sort: type: array items: @@ -4482,6 +3976,8 @@ paths: - show - season - episode + - artist + - album example: movie description: | The type of media content @@ -4490,6 +3986,8 @@ paths: - TV_SHOW - SEASON - EPISODE + - ARTIST + - ALBUM title: type: string example: 'Avatar: The Way of Water' @@ -4521,17 +4019,47 @@ paths: example: Return to Pandora. flattenSeasons: type: string + description: 'Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).' enum: + - '-1' - '0' - '1' - example: '1' - default: '0' x-speakeasy-enums: - - false - - true + - LIBRARY_DEFAULT + - HIDE + - SHOW + example: '1' + episodeSort: + type: string + description: 'Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).' + enum: + - '-1' + - '0' + - '1' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - OLDEST_FIRST + - NEWEST_FIRST + example: '0' + enableCreditsMarkerGeneration: + type: string + description: 'Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).' + enum: + - '-1' + - '0' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - DISABLED + example: '-1' showOrdering: type: string - description: "Setting that indicates the episode ordering for the show \nNone = Library default, \ntmdbAiring = The Movie Database (Aired), \naired = TheTVDB (Aired), \ndvd = TheTVDB (DVD), \nabsolute = TheTVDB (Absolute)).\n" + description: | + Setting that indicates the episode ordering for the show. + None = Library default, + tmdbAiring = The Movie Database (Aired), + aired = TheTVDB (Aired), + dvd = TheTVDB (DVD), + absolute = TheTVDB (Absolute)). enum: - None - tmdbAiring @@ -4541,10 +4069,10 @@ paths: x-speakeasy-enums: - NONE - TMDB_AIRING - - AIRED - - DVD - - ABSOLUTE - example: dvd + - TVDB_AIRED + - TVDB_DVD + - TVDB_ABSOLUTE + example: absolute thumb: type: string example: /library/metadata/58683/thumb/1703239236 @@ -4621,18 +4149,7 @@ paths: type: object required: - id - - duration - - bitrate - - width - - height - - aspectRatio - - audioChannels - - audioCodec - - videoCodec - - videoResolution - container - - videoFrameRate - - videoProfile - Part properties: id: @@ -4708,11 +4225,9 @@ paths: required: - id - key - - duration - file - size - container - - videoProfile properties: id: type: integer @@ -4989,6 +4504,14 @@ paths: type: string description: The role of the actor or tag in the media. example: Self + Location: + type: array + items: + type: object + properties: + path: + type: string + example: /TV Shows/House Guid: x-speakeasy-name-override: MediaGuid description: | @@ -5153,6 +4676,98 @@ paths: description: 'Bad request, invalid parameters.' '401': description: 'Unauthorized, invalid Plex token.' + x-codeSamples: + - lang: php + label: added + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetRecentlyAddedRequest( + contentDirectoryID: 470161, + sectionID: 2, + type: Operations\Type::TvShow, + ); + + $response = $sdk->hubs->getRecentlyAdded( + request: $request + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: added + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetRecentlyAddedRequest.new(\n content_directory_id: 470161,\n section_id: 2,\n type: ::PlexRubySDK::Operations::Type::TV_SHOW,\n include_meta: ::PlexRubySDK::Operations::IncludeMeta::ENABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n)\n \nres = s.hubs.get_recently_added(req)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: added + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{\n ContentDirectoryID: 470161,\n SectionID: plexgo.Int64(2),\n Type: operations.TypeTvShow,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: added + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedRequest; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedResponse; + import dev.plexapi.plexapi.models.operations.Type; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() + .contentDirectoryID(470161L) + .type(Type.TvShow) + .sectionID(2L) + .build(); + + GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: added + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Type } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.hubs.getRecentlyAdded({ + contentDirectoryID: 470161, + sectionID: 2, + type: Type.TvShow, + }); + + // Handle the result + console.log(result); + } + + run(); /hubs/search: get: tags: @@ -5257,63 +4872,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->search->performSearch('dylan', 5838.67, 5); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->search->performSearch( + query: 'dylan', + sectionId: 9372.7, + limit: 5 + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: performSearch - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_search(query=\"dylan\", section_id=5838.67, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_search(query=\"dylan\", section_id=9372.7, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: performSearch - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Search.PerformSearch(ctx, "dylan", nil, plexgo.Float64(5)) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Search.PerformSearch(ctx, \"dylan\", nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: performSearch source: |- @@ -5331,16 +4914,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); PerformSearchResponse res = sdk.search().performSearch() .query("dylan") - .sectionId(5838.67d) + .sectionId(9487.88d) .limit(5d) .call(); @@ -5349,7 +4927,21 @@ paths: } - lang: typescript label: performSearch - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.search.performSearch(\"dylan\", 5);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.search.performSearch("dylan"); + + // Handle the result + console.log(result); + } + + run(); /hubs/search/voice: get: tags: @@ -5442,63 +5034,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->search->performVoiceSearch('dead+poop', 4094.80, 5); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->search->performVoiceSearch( + query: 'dead+poop', + sectionId: 4094.8, + limit: 5 + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: performVoiceSearch - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.perform_voice_search(query=\"dead+poop\", section_id=4094.80, limit=5.0)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: performVoiceSearch - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, plexgo.Float64(5)) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Search.PerformVoiceSearch(ctx, \"dead+poop\", nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: performVoiceSearch source: |- @@ -5516,16 +5076,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() .query("dead+poop") - .sectionId(4094.80d) + .sectionId(4094.8d) .limit(5d) .call(); @@ -5534,7 +5089,21 @@ paths: } - lang: typescript label: performVoiceSearch - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.search.performVoiceSearch(\"dead+poop\", 5);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.search.performVoiceSearch("dead+poop"); + + // Handle the result + console.log(result); + } + + run(); '/hubs/sections/{sectionId}': get: tags: @@ -5930,64 +5499,32 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->hubs->getLibraryHubs( + sectionId: 6728.76, + count: 639.24, + onlyTransient: Operations\QueryParamOnlyTransient::One + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->hubs->getLibraryHubs(6728.76, 639.24, Operations\QueryParamOnlyTransient::One); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getLibraryHubs - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_library_hubs(section_id=6728.76, count=639.24, only_transient=::PlexRubySDK::Operations::QueryParamOnlyTransient::ONE)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.hubs.get_library_hubs(section_id=6728.76, count=639.24, only_transient=::PlexRubySDK::Operations::QueryParamOnlyTransient::ONE)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getLibraryHubs - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Hubs.GetLibraryHubs(ctx, 6728.76, nil, nil) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Hubs.GetLibraryHubs(ctx, 6728.76, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getLibraryHubs source: |- @@ -6006,17 +5543,12 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() .sectionId(6728.76d) - .count(639.24d) - .onlyTransient(QueryParamOnlyTransient.ONE) + .count(6728.76d) + .onlyTransient(QueryParamOnlyTransient.ZERO) .call(); if (res.object().isPresent()) { @@ -6026,7 +5558,21 @@ paths: } - lang: typescript label: getLibraryHubs - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.hubs.getLibraryHubs(6728.76);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.hubs.getLibraryHubs(6728.76); + + // Handle the result + console.log(result); + } + + run(); /identity: get: tags: @@ -6083,55 +5629,23 @@ paths: use LukeHagar\Plex_API; - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->build(); + $sdk = Plex_API\PlexAPI::builder()->build(); - try { - $response = $sdk->server->getServerIdentity(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getServerIdentity( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: identity - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\n\n \nres = s.server.get_server_identity()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n \nres = s.server.get_server_identity()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: identity - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetServerIdentity(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Server.GetServerIdentity(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: identity source: |- @@ -6147,11 +5661,6 @@ paths: public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception { PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerIdentityResponse res = sdk.server().getServerIdentity() @@ -6164,7 +5673,19 @@ paths: } - lang: typescript label: identity - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getServerIdentity();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.server.getServerIdentity(); + + // Handle the result + console.log(result); + } + + run(); /library/hashes: get: tags: @@ -6248,63 +5769,30 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->library->getFileHash('file://C:\Image.png&type=13', 4462.17); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->library->getFileHash( + url: 'file://C:\Image.png&type=13', + type: 4462.17 + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: getFileHash - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: getFileHash - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetFileHash(ctx, "file://C:\Image.png&type=13", nil) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetFileHash(ctx, \"file://C:\\Image.png&type=13\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: getFileHash source: |- @@ -6322,11 +5810,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetFileHashResponse res = sdk.library().getFileHash() @@ -6339,7 +5822,21 @@ paths: } - lang: typescript label: getFileHash - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getFileHash(\"file://C:\\Image.png&type=13\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13"); + + // Handle the result + console.log(result); + } + + run(); /library/recentlyAdded: get: tags: @@ -6385,7 +5882,7 @@ paths: - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season @@ -6398,12 +5895,18 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK required: true - name: includeMeta in: query @@ -6473,7 +5976,10 @@ paths: example: /library/sections/2/all?type=2 type: type: string - example: show + example: filter + subtype: + type: string + example: clip title: type: string example: TV Shows @@ -6506,6 +6012,9 @@ paths: type: type: string example: filter + advanced: + type: boolean + example: true Sort: type: array items: @@ -6878,97 +6387,97 @@ paths: example: 401 x-codeSamples: - lang: php - label: getRecentlyAdded + label: library source: |- declare(strict_types=1); require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); + use LukeHagar\Plex_API\Models\Operations; $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { + $request = new Operations\GetRecentlyAddedLibraryRequest( + contentDirectoryID: 2, + pinnedContentDirectoryID: [ + 3, + 5, + 7, + 13, + 12, + 1, + 6, + 14, + 2, + 10, + 16, + 17, + ], + sectionID: 2, + type: Operations\QueryParamType::TvShow, + ); - $response = $sdk->library->getRecentlyAdded(0, 50); + $response = $sdk->library->getRecentlyAddedLibrary( + request: $request + ); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby - label: getRecentlyAdded - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_recently_added(x_plex_container_start=0, x_plex_container_size=50)\n\nif ! res.object.nil?\n # handle response\nend" + label: library + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetRecentlyAddedLibraryRequest.new(\n content_directory_id: 2,\n pinned_content_directory_id: [\n 3,\n 5,\n 7,\n 13,\n 12,\n 1,\n 6,\n 14,\n 2,\n 10,\n 16,\n 17,\n ],\n section_id: 2,\n type: ::PlexRubySDK::Operations::QueryParamType::TV_SHOW,\n include_meta: ::PlexRubySDK::Operations::QueryParamIncludeMeta::ENABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n)\n \nres = s.library.get_recently_added_library(req)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go - label: getRecentlyAdded - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetRecentlyAdded(ctx, plexgo.Int(0), plexgo.Int(50)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + label: library + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetRecentlyAddedLibrary(ctx, operations.GetRecentlyAddedLibraryRequest{\n ContentDirectoryID: plexgo.Int64(2),\n PinnedContentDirectoryID: []int64{\n 3,\n 5,\n 7,\n 13,\n 12,\n 1,\n 6,\n 14,\n 2,\n 10,\n 16,\n 17,\n },\n SectionID: plexgo.Int64(2),\n Type: operations.QueryParamTypeTvShow,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java - label: getRecentlyAdded + label: library source: |- package hello.world; import dev.plexapi.plexapi.PlexAPI; - import dev.plexapi.plexapi.models.errors.GetRecentlyAddedBadRequest; - import dev.plexapi.plexapi.models.errors.GetRecentlyAddedUnauthorized; - import dev.plexapi.plexapi.models.operations.GetRecentlyAddedResponse; + import dev.plexapi.plexapi.models.errors.GetRecentlyAddedLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetRecentlyAddedLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryRequest; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryResponse; + import dev.plexapi.plexapi.models.operations.QueryParamType; import java.lang.Exception; + import java.util.List; public class Application { - public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception { + public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); - GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded() - .xPlexContainerStart(0) - .xPlexContainerSize(50) + GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder() + .type(QueryParamType.TvShow) + .contentDirectoryID(2L) + .pinnedContentDirectoryID(List.of( + 3L, + 5L, + 7L, + 13L, + 12L, + 1L, + 6L, + 14L, + 2L, + 10L, + 16L, + 17L)) + .sectionID(2L) + .build(); + + GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() + .request(req) .call(); if (res.object().isPresent()) { @@ -6977,8 +6486,41 @@ paths: } } - lang: typescript - label: getRecentlyAdded - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getRecentlyAdded(0, 50);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + label: library + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getRecentlyAddedLibrary({ + contentDirectoryID: 2, + pinnedContentDirectoryID: [ + 3, + 5, + 7, + 13, + 12, + 1, + 6, + 14, + 2, + 10, + 16, + 17, + ], + sectionID: 2, + type: QueryParamType.TvShow, + }); + + // Handle the result + console.log(result); + } + + run(); /library/sections: get: tags: @@ -7188,62 +6730,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->library->getAllLibraries(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->library->getAllLibraries( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: libraries - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_all_libraries()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_all_libraries()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: libraries - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetAllLibraries(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetAllLibraries(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: libraries source: |- @@ -7261,11 +6769,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetAllLibrariesResponse res = sdk.library().getAllLibraries() @@ -7278,7 +6781,21 @@ paths: } - lang: typescript label: libraries - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getAllLibraries();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getAllLibraries(); + + // Handle the result + console.log(result); + } + + run(); '/library/sections/{sectionKey}': get: tags: @@ -7287,14 +6804,6 @@ paths: description: "## Library Details Endpoint\n\nThis endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. \n\nThe details include:\n\n### Directories\nOrganized into three categories:\n\n- **Primary Directories**: \n - Used in some clients for quick access to media subsets (e.g., \"All\", \"On Deck\").\n - Most can be replicated via media queries.\n - Customizable by users.\n\n- **Secondary Directories**:\n - Marked with `secondary=\"1\"`.\n - Used in older clients for structured navigation.\n\n- **Special Directories**:\n - Includes a \"By Folder\" entry for filesystem-based browsing.\n - Contains an obsolete `search=\"1\"` entry for on-the-fly search dialog creation.\n\n### Types\nEach type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:\n\n- **Type Object Attributes**:\n - `key`: Endpoint for the media list of this type.\n - `type`: Metadata type (if standard Plex type).\n - `title`: Title for this content type (e.g., \"Movies\").\n\n- **Filter Objects**:\n - Subset of the media query language.\n - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.\n\n- **Sort Objects**:\n - Description of sort fields.\n - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`.\n\n> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.\n" operationId: get-library-details parameters: - - name: sectionKey - description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" - in: path - schema: - type: integer - format: int32 - example: 9518 - required: true - name: includeDetails description: "Whether or not to include details for a section (types, filters, and sorts). \nOnly exists for backwards compatibility, media providers other than the server libraries have it on always.\n" in: query @@ -7305,6 +6814,14 @@ paths: - 1 default: 0 required: false + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" + in: path + schema: + type: integer + format: int32 + example: 9518 + required: true responses: '200': description: The details of the library @@ -7531,64 +7048,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getLibraryDetails( + sectionKey: 9518, + includeDetails: Operations\IncludeDetails::Zero + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->library->getLibraryDetails(9518, Operations\IncludeDetails::Zero); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: details - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library_details(section_key=9518, include_details=::PlexRubySDK::Operations::IncludeDetails::ZERO)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_library_details(section_key=9518, include_details=::PlexRubySDK::Operations::IncludeDetails::ZERO)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: details - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetLibraryDetails(ctx, 9518, nil) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetLibraryDetails(ctx, 9518, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: details source: |- @@ -7607,16 +7091,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() - .sectionKey(9518) .includeDetails(IncludeDetails.ZERO) + .sectionKey(9518) .call(); if (res.object().isPresent()) { @@ -7626,7 +7105,21 @@ paths: } - lang: typescript label: details - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getLibraryDetails(9518);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getLibraryDetails(9518); + + // Handle the result + console.log(result); + } + + run(); delete: tags: - Library @@ -7704,63 +7197,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->library->deleteLibrary(9518); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->library->deleteLibrary( + sectionKey: 9518 + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: deleteLibrary - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.delete_library(section_key=9518)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.delete_library(section_key=9518)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: deleteLibrary - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.DeleteLibrary(ctx, 9518) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.DeleteLibrary(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: deleteLibrary source: |- @@ -7778,11 +7236,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); DeleteLibraryResponse res = sdk.library().deleteLibrary() @@ -7794,7 +7247,21 @@ paths: } - lang: typescript label: deleteLibrary - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.deleteLibrary(9518);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.deleteLibrary(9518); + + // Handle the result + console.log(result); + } + + run(); '/library/sections/watchlist/{filter}': servers: - url: 'https://metadata.provider.plex.tv' @@ -7898,12 +7365,12 @@ paths: example: 50 required: false - name: X-Plex-Token - in: query - description: Plex Authentication Token + in: header + description: 'An authentication token, obtained from plex.tv' + required: true schema: type: string example: CV5xoxjTpFKUzBTShsaf - required: true responses: '200': description: Watchlist Data @@ -8078,75 +7545,32 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetWatchListRequest( + filter: Operations\Filter::Available, + xPlexToken: 'CV5xoxjTpFKUzBTShsaf', ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->watchlist->getWatchList( + request: $request + ); - try { - $request = new Operations\GetWatchListRequest( - filter: Operations\Filter::Available, - xPlexContainerStart: 0, - xPlexContainerSize: 50, - xPlexToken: 'CV5xoxjTpFKUzBTShsaf', - ); - $response = $sdk->watchlist->getWatchList($request); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: list - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetWatchListRequest.new(\n filter: ::PlexRubySDK::Operations::Filter::AVAILABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.watchlist.get_watch_list(req)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetWatchListRequest.new(\n filter: ::PlexRubySDK::Operations::Filter::AVAILABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.watchlist.get_watch_list(req)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: list - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{ - Filter: operations.FilterAvailable, - XPlexContainerStart: plexgo.Int(0), - XPlexContainerSize: plexgo.Int(50), - XPlexToken: "CV5xoxjTpFKUzBTShsaf", - }) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{\n Filter: operations.FilterAvailable,\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: list source: |- @@ -8166,18 +7590,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetWatchListRequest req = GetWatchListRequest.builder() .filter(Filter.AVAILABLE) .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .xPlexContainerStart(0) - .xPlexContainerSize(50) .build(); GetWatchListResponse res = sdk.watchlist().getWatchList() @@ -8191,7 +7608,25 @@ paths: } - lang: typescript label: list - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Filter } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.watchlist.getWatchList({\n filter: Filter.Available,\n xPlexContainerStart: 0,\n xPlexContainerSize: 50,\n xPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Filter } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.watchlist.getWatchList({ + filter: Filter.Available, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", + }); + + // Handle the result + console.log(result); + } + + run(); '/library/sections/{sectionKey}/{tag}': get: tags: @@ -8219,15 +7654,8 @@ paths: - `resolution`: Items categorized by resolution. - `firstCharacter`: Items categorized by the first letter. - `folder`: Items categorized by folder. + - `albums`: Items categorized by album. parameters: - - name: sectionKey - description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" - in: path - schema: - type: integer - format: int32 - example: 9518 - required: true - name: tag in: path required: true @@ -8235,7 +7663,6 @@ paths: schema: type: string enum: - - all - unwatched - newest - recentlyAdded @@ -8243,17 +7670,15 @@ paths: - onDeck - collection - edition - - genre - year - decade - director - - actor - - country - contentRating - rating - resolution - firstCharacter - folder + - albums - name: includeGuids in: query description: | @@ -8272,13 +7697,12 @@ paths: - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - required: false schema: type: integer enum: @@ -8286,12 +7710,27 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK + required: true + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" + in: path + schema: + type: integer + format: int32 + example: 9518 + required: true - name: includeMeta in: query description: | @@ -8369,7 +7808,10 @@ paths: example: /library/sections/2/all?type=2 type: type: string - example: show + example: filter + subtype: + type: string + example: clip title: type: string example: TV Shows @@ -8402,6 +7844,9 @@ paths: type: type: string example: filter + advanced: + type: boolean + example: true Sort: type: array items: @@ -8518,7 +7963,6 @@ paths: - title1 - title2 - viewGroup - - Metadata properties: size: type: integer @@ -8631,6 +8075,8 @@ paths: - show - season - episode + - artist + - album example: movie description: | The type of media content @@ -8639,6 +8085,8 @@ paths: - TV_SHOW - SEASON - EPISODE + - ARTIST + - ALBUM title: type: string example: 'Avatar: The Way of Water' @@ -8670,17 +8118,47 @@ paths: example: Return to Pandora. flattenSeasons: type: string + description: 'Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).' enum: + - '-1' - '0' - '1' - example: '1' - default: '0' x-speakeasy-enums: - - false - - true + - LIBRARY_DEFAULT + - HIDE + - SHOW + example: '1' + episodeSort: + type: string + description: 'Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).' + enum: + - '-1' + - '0' + - '1' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - OLDEST_FIRST + - NEWEST_FIRST + example: '0' + enableCreditsMarkerGeneration: + type: string + description: 'Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).' + enum: + - '-1' + - '0' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - DISABLED + example: '-1' showOrdering: type: string - description: "Setting that indicates the episode ordering for the show \nNone = Library default, \ntmdbAiring = The Movie Database (Aired), \naired = TheTVDB (Aired), \ndvd = TheTVDB (DVD), \nabsolute = TheTVDB (Absolute)).\n" + description: | + Setting that indicates the episode ordering for the show. + None = Library default, + tmdbAiring = The Movie Database (Aired), + aired = TheTVDB (Aired), + dvd = TheTVDB (DVD), + absolute = TheTVDB (Absolute)). enum: - None - tmdbAiring @@ -8690,10 +8168,10 @@ paths: x-speakeasy-enums: - NONE - TMDB_AIRING - - AIRED - - DVD - - ABSOLUTE - example: dvd + - TVDB_AIRED + - TVDB_DVD + - TVDB_ABSOLUTE + example: absolute thumb: type: string example: /library/metadata/58683/thumb/1703239236 @@ -8770,18 +8248,7 @@ paths: type: object required: - id - - duration - - bitrate - - width - - height - - aspectRatio - - audioChannels - - audioCodec - - videoCodec - - videoResolution - container - - videoFrameRate - - videoProfile - Part properties: id: @@ -8857,11 +8324,9 @@ paths: required: - id - key - - duration - file - size - container - - videoProfile properties: id: type: integer @@ -9138,6 +8603,14 @@ paths: type: string description: The role of the actor or tag in the media. example: Self + Location: + type: array + items: + type: object + properties: + path: + type: string + example: /TV Shows/House Guid: x-speakeasy-name-override: MediaGuid description: | @@ -9507,81 +8980,33 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetLibraryItemsRequest( + tag: Operations\Tag::Edition, + type: Operations\GetLibraryItemsQueryParamType::TvShow, + sectionKey: 9518, ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->library->getLibraryItems( + request: $request + ); - try { - $request = new Operations\GetLibraryItemsRequest( - sectionKey: 9518, - tag: Operations\Tag::Edition, - includeGuids: Operations\IncludeGuids::Enable, - includeMeta: Operations\IncludeMeta::Enable, - type: Operations\Type::TvShow, - xPlexContainerStart: 0, - xPlexContainerSize: 50, - ); - $response = $sdk->library->getLibraryItems($request); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: items - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetLibraryItemsRequest.new(\n section_key: 9518,\n tag: ::PlexRubySDK::Operations::Tag::EDITION,\n include_guids: ::PlexRubySDK::Operations::IncludeGuids::ENABLE,\n include_meta: ::PlexRubySDK::Operations::IncludeMeta::ENABLE,\n type: ::PlexRubySDK::Operations::Type::TV_SHOW,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n)\n \nres = s.library.get_library_items(req)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetLibraryItemsRequest.new(\n tag: ::PlexRubySDK::Operations::Tag::EDITION,\n include_guids: ::PlexRubySDK::Operations::IncludeGuids::ENABLE,\n type: ::PlexRubySDK::Operations::GetLibraryItemsQueryParamType::TV_SHOW,\n section_key: 9518,\n include_meta: ::PlexRubySDK::Operations::GetLibraryItemsQueryParamIncludeMeta::ENABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n)\n \nres = s.library.get_library_items(req)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: items - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{ - SectionKey: 9518, - Tag: operations.TagEdition, - IncludeGuids: operations.IncludeGuidsEnable.ToPointer(), - IncludeMeta: operations.IncludeMetaEnable.ToPointer(), - Type: operations.TypeTvShow.ToPointer(), - XPlexContainerStart: plexgo.Int(0), - XPlexContainerSize: plexgo.Int(50), - }) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{\n Tag: operations.TagEdition,\n Type: operations.GetLibraryItemsQueryParamTypeTvShow,\n SectionKey: 9518,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: items source: |- @@ -9590,12 +9015,10 @@ paths: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.GetLibraryItemsBadRequest; import dev.plexapi.plexapi.models.errors.GetLibraryItemsUnauthorized; + import dev.plexapi.plexapi.models.operations.GetLibraryItemsQueryParamType; import dev.plexapi.plexapi.models.operations.GetLibraryItemsRequest; import dev.plexapi.plexapi.models.operations.GetLibraryItemsResponse; - import dev.plexapi.plexapi.models.operations.IncludeGuids; - import dev.plexapi.plexapi.models.operations.IncludeMeta; import dev.plexapi.plexapi.models.operations.Tag; - import dev.plexapi.plexapi.models.operations.Type; import java.lang.Exception; public class Application { @@ -9604,21 +9027,12 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() - .sectionKey(9518) .tag(Tag.EDITION) - .includeGuids(IncludeGuids.Enable) - .includeMeta(IncludeMeta.Enable) - .type(Type.TvShow) - .xPlexContainerStart(0) - .xPlexContainerSize(50) + .type(GetLibraryItemsQueryParamType.TvShow) + .sectionKey(9518) .build(); GetLibraryItemsResponse res = sdk.library().getLibraryItems() @@ -9632,15 +9046,34 @@ paths: } - lang: typescript label: items - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { IncludeGuids, IncludeMeta, Tag, Type } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getLibraryItems({\n sectionKey: 9518,\n tag: Tag.Edition,\n includeGuids: IncludeGuids.One,\n includeMeta: IncludeMeta.One,\n type: Type.Two,\n xPlexContainerStart: 0,\n xPlexContainerSize: 50,\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - '/library/sections/{sectionKey}/refresh': + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetLibraryItemsQueryParamType, Tag } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getLibraryItems({ + tag: Tag.Edition, + type: GetLibraryItemsQueryParamType.TvShow, + sectionKey: 9518, + }); + + // Handle the result + console.log(result); + } + + run(); + '/library/sections/{sectionKey}/all': get: tags: - Library - summary: Refresh Metadata Of The Library + summary: Get all media of library + operationId: get-all-media-library description: | - This endpoint Refreshes all the Metadata of the library. - operationId: get-refresh-library-metadata + Retrieves a list of all general media data for this library. parameters: - name: sectionKey description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" @@ -9650,6 +9083,1557 @@ paths: format: int32 example: 9518 required: true + - name: type + in: query + description: | + The type of media to retrieve or filter by. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + schema: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 8 + - 9 + - 10 + example: 2 + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - AUDIO + - ALBUM + - TRACK + required: true + - name: includeMeta + in: query + description: | + Adds the Meta object to the response + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + - name: includeGuids + in: query + description: | + Adds the Guid object to the response + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + - name: includeAdvanced + in: query + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + - name: includeCollections + in: query + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + - name: includeExternalMedia + in: query + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + - name: X-Plex-Container-Start + in: query + description: | + The index of the first item to return. If not specified, the first item will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 0 + schema: + type: integer + format: int32 + default: 0 + example: 0 + required: false + - name: X-Plex-Container-Size + in: query + description: | + The number of items to return. If not specified, all items will be returned. + If the number of items exceeds the limit, the response will be paginated. + By default this is 50 + schema: + type: integer + format: int32 + default: 50 + example: 50 + required: false + - name: Accept + in: header + required: false + schema: + type: string + enum: + - application/json + - application/xml + example: application/json + responses: + '200': + description: Successful response containing media container data. + content: + application/json: + schema: + type: object + properties: + MediaContainer: + allOf: + - type: object + required: + - size + properties: + size: + description: Number of media items returned in this response. + type: integer + format: int32 + example: 50 + - type: object + required: + - totalSize + properties: + totalSize: + description: Total number of media items in the library. + type: integer + format: int32 + example: 50 + - type: object + required: + - offset + properties: + offset: + type: integer + description: Offset value for pagination. + example: 0 + - type: object + required: + - allowSync + properties: + allowSync: + type: boolean + description: Indicates whether syncing is allowed. + example: false + - type: object + required: + - art + properties: + art: + type: string + description: URL for the background artwork of the media container. + example: '/:/resources/show-fanart.jpg' + - type: object + required: + - content + properties: + content: + type: string + description: The content type or mode. + example: secondary + - type: object + required: + - identifier + properties: + identifier: + type: string + description: An plugin identifier for the media container. + example: com.plexapp.plugins.library + - type: object + required: + - librarySectionID + properties: + librarySectionID: + type: integer + description: The unique identifier for the library section. + example: 2 + - type: object + required: + - librarySectionTitle + properties: + librarySectionTitle: + type: string + description: The title of the library section. + example: TV Series + - type: object + required: + - librarySectionTitle + properties: + librarySectionUUID: + type: string + description: The universally unique identifier for the library section. + example: e69655a2-ef48-4aba-bb19-0cc34d1e7d36 + - type: object + required: + - mediaTagPrefix + properties: + mediaTagPrefix: + type: string + description: The prefix used for media tag resource paths. + example: /system/bundle/media/flags/ + - type: object + required: + - mediaTagVersion + properties: + mediaTagVersion: + type: integer + description: The version number for media tags. + example: 1734362201 + - type: object + required: + - thumb + properties: + thumb: + type: string + description: URL for the thumbnail image of the media container. + example: '/:/resources/show.png' + - type: object + required: + - nocache + properties: + nocache: + type: boolean + description: Specifies whether caching is disabled. + example: true + - type: object + required: + - title1 + properties: + title1: + type: string + description: The primary title of the media container. + example: TV Series + - type: object + required: + - title2 + properties: + title2: + type: string + description: The secondary title of the media container. + example: By Starring Actor + - type: object + required: + - viewGroup + properties: + viewGroup: + type: string + description: Identifier for the view group layout. + example: secondary + - type: object + properties: + Meta: + type: object + description: | + The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + properties: + Type: + type: array + items: + type: object + required: + - key + - type + - title + - active + properties: + key: + type: string + example: /library/sections/2/all?type=2 + type: + type: string + example: filter + subtype: + type: string + example: clip + title: + type: string + example: TV Shows + active: + type: boolean + example: false + Filter: + type: array + items: + type: object + required: + - filter + - filterType + - key + - title + - type + properties: + filter: + type: string + example: genre + filterType: + type: string + example: string + key: + type: string + example: /library/sections/2/genre?type=2 + title: + type: string + example: Genre + type: + type: string + example: filter + advanced: + type: boolean + example: true + Sort: + type: array + items: + type: object + required: + - key + - title + - defaultDirection + properties: + default: + type: string + example: asc + active: + type: boolean + example: false + activeDirection: + type: string + enum: + - asc + - desc + example: asc + default: asc + description: | + The direction of the sort. Can be either `asc` or `desc`. + x-speakeasy-enums: + - ASCENDING + - DESCENDING + defaultDirection: + type: string + enum: + - asc + - desc + example: asc + default: asc + description: | + The direction of the sort. Can be either `asc` or `desc`. + x-speakeasy-enums: + - ASCENDING + - DESCENDING + descKey: + type: string + example: 'titleSort:desc' + firstCharacterKey: + type: string + example: /library/sections/2/firstCharacter + key: + type: string + example: titleSort + title: + type: string + example: Title + Field: + type: array + items: + type: object + required: + - key + - title + - type + properties: + key: + type: string + example: show.title + title: + type: string + example: Show Title + type: + type: string + example: string + subType: + type: string + example: rating + FieldType: + type: array + items: + type: object + required: + - type + - Operator + properties: + type: + type: string + example: tag + Operator: + type: array + items: + type: object + required: + - key + - title + properties: + key: + type: string + example: '=' + title: + type: string + example: is + Metadata: + type: array + description: An array of metadata items. + items: + required: + - type + allOf: + - type: object + required: + - ratingKey + properties: + ratingKey: + type: string + description: 'The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.' + example: '58683' + - type: object + required: + - key + properties: + key: + type: string + description: The unique key for the media item. + example: /library/metadata/58683 + - type: object + required: + - guid + properties: + guid: + type: string + description: The globally unique identifier for the media item. + example: 'plex://movie/5d7768ba96b655001fdc0408' + - type: object + required: + - slug + properties: + slug: + type: string + description: A URL‐friendly version of the media title. + example: 4-for-texas + - type: object + properties: + studio: + type: string + description: The studio that produced the media item. + example: 20th Century Studios + - type: object + required: + - type + properties: + type: + allOf: + - type: string + enum: + - movie + - show + - season + - episode + - artist + - album + example: movie + description: | + The type of media content + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - ARTIST + - ALBUM + - type: object + required: + - title + properties: + title: + type: string + description: The title of the media item. + example: 'Avatar: The Way of Water' + - type: object + required: + - titleSort + properties: + titleSort: + type: string + description: The sort title used for ordering media items. + example: Whale + - type: object + properties: + contentRating: + type: string + description: The content rating for the media item. + example: PG-13 + - type: object + required: + - summary + properties: + summary: + type: string + description: A synopsis of the media item. + example: | + Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. + Once a familiar threat returns to finish what was previously started, Jake must + work with Neytiri and the army of the Na'vi race to protect their home. + - type: object + required: + - rating + properties: + rating: + type: number + format: float + description: The critic rating for the media item. + example: 7.6 + - type: object + required: + - audienceRating + properties: + audienceRating: + type: number + description: The audience rating for the media item. + example: 9.2 + - type: object + required: + - year + properties: + year: + type: integer + format: int32 + description: The release year of the media item. + example: 2022 + - type: object + required: + - tagline + properties: + tagline: + type: string + description: A brief tagline for the media item. + example: Return to Pandora. + - type: object + required: + - thumb + properties: + thumb: + type: string + description: The thumbnail image URL for the media item. + example: /library/metadata/58683/thumb/1703239236 + - type: object + required: + - art + properties: + art: + type: string + description: The art image URL for the media item. + example: /library/metadata/58683/art/1703239236 + - type: object + required: + - theme + properties: + theme: + type: string + description: The theme URL for the media item. + example: /library/metadata/1/theme/1705636920 + - type: object + required: + - index + properties: + index: + type: integer + format: int32 + description: The index position of the media item. + example: 1 + - type: object + properties: + leafCount: + type: integer + format: int32 + description: The number of leaf items (end nodes) under this media item. + example: 14 + - type: object + properties: + viewedLeafCount: + type: integer + format: int32 + description: The number of leaf items that have been viewed. + example: 0 + - type: object + required: + - childCount + properties: + childCount: + type: integer + format: int32 + description: The number of child items associated with this media item. + example: 1 + - type: object + required: + - seasonCount + properties: + seasonCount: + type: integer + format: int32 + description: The total number of seasons (for TV shows). + example: 2022 + - type: object + required: + - duration + properties: + duration: + type: integer + format: int32 + description: The duration of the media item in milliseconds. + example: 11558112 + - type: object + required: + - originallyAvailableAt + properties: + originallyAvailableAt: + type: string + format: date + description: The original release date of the media item. + example: '2022-12-14' + - type: object + required: + - addedAt + properties: + addedAt: + allOf: + - description: Unix timestamp when the item was added. + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: object + properties: + updatedAt: + type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: object + properties: + audienceRatingImage: + type: string + description: The URL for the audience rating image. + example: 'rottentomatoes://image.rating.upright' + - type: object + properties: + chapterSource: + type: string + description: The source from which chapter data is derived. + example: media + - type: object + properties: + primaryExtraKey: + type: string + description: The primary extra key associated with this media item. + example: /library/metadata/58684 + - type: object + properties: + originalTitle: + type: string + description: The original title of the media item (if different). + example: 映画 ブラッククローバー 魔法帝の剣 + - type: object + properties: + parentRatingKey: + type: string + description: The rating key of the parent media item. + example: '66' + - type: object + properties: + grandparentRatingKey: + type: string + description: The rating key of the grandparent media item. + example: '66' + - type: object + properties: + parentGuid: + type: string + description: The GUID of the parent media item. + example: 'plex://show/5d9c081b170e24001f2a7be4' + - type: object + properties: + grandparentGuid: + type: string + description: The GUID of the grandparent media item. + example: 'plex://show/5d9c081b170e24001f2a7be4' + - type: object + properties: + grandparentSlug: + type: string + description: The slug for the grandparent media item. + example: alice-in-borderland-2020 + - type: object + properties: + grandparentKey: + type: string + description: The key of the grandparent media item. + example: /library/metadata/66 + - type: object + properties: + parentKey: + type: string + description: The key of the parent media item. + example: /library/metadata/66 + - type: object + properties: + grandparentTitle: + type: string + description: The title of the grandparent media item. + example: Caprica + - type: object + properties: + grandparentThumb: + type: string + description: The thumbnail URL for the grandparent media item. + example: /library/metadata/66/thumb/1705716261 + - type: object + properties: + grandparentTheme: + type: string + description: The theme URL for the grandparent media item. + example: /library/metadata/66/theme/1705716261 + - type: object + properties: + grandparentArt: + type: string + description: The art URL for the grandparent media item. + example: /library/metadata/66/art/1705716261 + - type: object + properties: + parentTitle: + type: string + description: The title of the parent media item. + example: Caprica + - type: object + properties: + parentIndex: + type: integer + format: int32 + description: The index position of the parent media item. + example: 1 + - type: object + properties: + parentThumb: + type: string + description: The thumbnail URL for the parent media item. + example: /library/metadata/66/thumb/1705716261 + - type: object + properties: + ratingImage: + type: string + description: The URL for the rating image. + example: 'rottentomatoes://image.rating.ripe' + - type: object + properties: + viewCount: + type: integer + format: int32 + description: The number of times this media item has been viewed. + example: 1 + - type: object + properties: + viewOffset: + type: integer + format: int32 + description: The current playback offset (in milliseconds). + example: 5222500 + - type: object + properties: + skipCount: + type: integer + format: int32 + description: The number of times this media item has been skipped. + example: 1 + - type: object + properties: + subtype: + type: string + description: 'A classification that further describes the type of media item. For example, ''clip'' indicates that the item is a short video clip.' + example: clip + - type: object + properties: + lastRatedAt: + type: integer + format: int64 + description: The Unix timestamp representing the last time the item was rated. + example: 1721813113 + - type: object + properties: + createdAtAccuracy: + type: string + description: 'The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, ''epoch,local'' means both epoch and local time formats are available).' + example: 'epoch,local' + - type: object + properties: + createdAtTZOffset: + type: string + description: 'The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.' + example: '0' + - type: object + properties: + lastViewedAt: + type: integer + format: int32 + description: Unix timestamp for when the media item was last viewed. + example: 1682752242 + - type: object + properties: + userRating: + type: number + format: float + description: The rating provided by a user for the item. This value is expressed as a decimal number. + example: 10 + - type: object + description: | + The available images for this media item + properties: + Image: + type: array + items: + type: object + required: + - alt + - type + - url + properties: + alt: + type: string + example: Episode 1 + type: + type: string + enum: + - coverPoster + - background + - snapshot + - clearLogo + example: background + url: + type: string + example: /library/metadata/45521/thumb/1644710589 + - type: object + description: | + Unknown + properties: + UltraBlurColors: + type: object + required: + - topLeft + - topRight + - bottomRight + - bottomLeft + properties: + topLeft: + type: string + example: 11333b + topRight: + type: string + example: 0a232d + bottomRight: + type: string + example: 073958 + bottomLeft: + type: string + example: 1f5066 + - type: object + properties: + Media: + allOf: + - type: array + description: An array of media file data items. + items: + type: object + required: + - id + - hasVoiceActivity + - Part + properties: + id: + type: integer + description: Unique media identifier. + example: 387322 + duration: + type: integer + format: int32 + description: Duration of the media in milliseconds. + example: 9610350 + bitrate: + type: integer + format: int32 + description: Bitrate in bits per second. + example: 25512 + width: + type: integer + description: Video width in pixels. + example: 3840 + format: int32 + height: + type: integer + description: Video height in pixels. + example: 1602 + format: int32 + aspectRatio: + type: number + format: float + description: Aspect ratio of the video. + example: 2.35 + audioChannels: + type: integer + description: Number of audio channels. + example: 6 + format: int32 + displayOffset: + type: integer + format: int32 + example: 50 + audioCodec: + type: string + description: Audio codec used. + example: eac3 + videoCodec: + type: string + description: Video codec used. + example: hevc + videoResolution: + type: string + description: 'Video resolution (e.g., 4k).' + example: 4k + container: + type: string + description: File container type. + example: mkv + videoFrameRate: + type: string + description: | + Frame rate of the video. Values found include NTSC, PAL, 24p + example: 24p + videoProfile: + type: string + description: 'Video profile (e.g., main 10).' + example: main 10 + hasVoiceActivity: + type: boolean + description: Indicates whether voice activity is detected. + example: false + audioProfile: + type: string + description: 'The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).' + example: dts + optimizedForStreaming: + description: 'Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true' + oneOf: + - type: integer + format: int32 + enum: + - 0 + - 1 + - type: boolean + enum: + - true + - false + has64bitOffsets: + type: boolean + example: false + Part: + type: array + description: An array of parts for this media item. + items: + type: object + required: + - id + - key + - file + - size + properties: + accessible: + type: boolean + description: Indicates if the part is accessible. + example: true + exists: + type: boolean + description: Indicates if the part exists. + example: true + id: + type: integer + description: Unique part identifier. + example: 418385 + key: + type: string + description: Key to access this part. + example: /library/parts/418385/1735864239/file.mkv + indexes: + type: string + example: sd + duration: + type: integer + format: int32 + description: Duration of the part in milliseconds. + example: 9610350 + file: + type: string + description: File path for the part. + example: /mnt/Movies_1/W/Wicked (2024).mkv + size: + description: File size in bytes. + type: integer + example: 30649952104 + packetLength: + type: integer + format: int32 + example: 188 + container: + type: string + description: Container format of the part. + example: mkv + videoProfile: + type: string + description: Video profile for the part. + example: main 10 + audioProfile: + type: string + description: 'The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).' + example: dts + has64bitOffsets: + type: boolean + example: false + optimizedForStreaming: + description: 'Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true' + oneOf: + - type: integer + format: int32 + enum: + - 0 + - 1 + - type: boolean + enum: + - true + - false + hasThumbnail: + allOf: + - description: Indicates if the part has a thumbnail. + - type: string + enum: + - '0' + - '1' + example: '1' + default: '0' + x-speakeasy-enums: + - false + - true + Stream: + type: array + description: An array of streams for this part. + items: + type: object + required: + - id + - streamType + - codec + - index + - language + - languageTag + - languageCode + - displayTitle + - extendedDisplayTitle + properties: + id: + type: integer + description: Unique stream identifier. + example: 1002625 + streamType: + type: integer + format: int32 + description: 'Stream type (1=video, 2=audio, 3=subtitle).' + example: 1 + default: + type: boolean + description: Indicates if this stream is default. + example: true + codec: + type: string + description: Codec used by the stream. + example: hevc + index: + type: integer + format: int32 + description: Index of the stream. + example: 0 + bitrate: + type: integer + format: int32 + description: Bitrate of the stream. + example: 24743 + language: + type: string + description: Language of the stream. + example: English + languageTag: + type: string + description: 'Language tag (e.g., en).' + example: en + languageCode: + type: string + description: ISO language code. + example: eng + headerCompression: + type: boolean + description: Indicates whether header compression is enabled. + example: true + DOVIBLCompatID: + type: integer + format: int32 + description: Dolby Vision BL compatibility ID. + example: 1 + DOVIBLPresent: + type: boolean + description: Indicates if Dolby Vision BL is present. + example: true + DOVIELPresent: + type: boolean + description: Indicates if Dolby Vision EL is present. + example: false + DOVILevel: + type: integer + format: int32 + description: Dolby Vision level. + example: 6 + DOVIPresent: + type: boolean + description: Indicates if Dolby Vision is present. + example: true + DOVIProfile: + type: integer + format: int32 + description: Dolby Vision profile. + example: 8 + DOVIRPUPresent: + type: boolean + description: Indicates if Dolby Vision RPU is present. + example: true + DOVIVersion: + type: string + description: Dolby Vision version. + example: '1.0' + bitDepth: + type: integer + format: int32 + description: Bit depth of the video stream. + example: 10 + chromaLocation: + type: string + description: Chroma sample location. + example: topleft + chromaSubsampling: + type: string + description: Chroma subsampling format. + example: '4:2:0' + codedHeight: + type: integer + format: int32 + description: Coded video height. + example: 1608 + codedWidth: + type: integer + format: int32 + description: Coded video width. + example: 3840 + colorPrimaries: + type: string + description: Color primaries used. + example: bt2020 + colorRange: + type: string + description: 'Color range (e.g., tv).' + example: tv + colorSpace: + type: string + description: Color space. + example: bt2020nc + colorTrc: + type: string + description: Color transfer characteristics. + example: smpte2084 + frameRate: + type: number + format: float + description: Frame rate of the stream. + example: 23.976 + height: + type: integer + format: int32 + description: Height of the video stream. + example: 1602 + level: + type: integer + format: int32 + description: Video level. + example: 150 + original: + type: boolean + description: Indicates if this is the original stream. + example: true + hasScalingMatrix: + type: boolean + example: false + profile: + type: string + description: Video profile. + example: main 10 + scanType: + type: string + example: progressive + refFrames: + type: integer + format: int32 + description: Number of reference frames. + example: 1 + width: + type: integer + format: int32 + description: Width of the video stream. + example: 3840 + displayTitle: + type: string + description: Display title for the stream. + example: 4K DoVi/HDR10 (HEVC Main 10) + extendedDisplayTitle: + type: string + description: Extended display title for the stream. + example: 4K DoVi/HDR10 (HEVC Main 10) + selected: + type: boolean + description: Indicates if this stream is selected (applicable for audio streams). + example: true + forced: + type: boolean + example: true + channels: + type: integer + format: int32 + description: Number of audio channels (for audio streams). + example: 6 + audioChannelLayout: + type: string + description: Audio channel layout. + example: 5.1(side) + samplingRate: + type: integer + format: int32 + description: Sampling rate for the audio stream. + example: 48000 + canAutoSync: + type: boolean + description: Indicates if the stream can auto-sync. + example: false + hearingImpaired: + type: boolean + description: Indicates if the stream is for the hearing impaired. + example: true + dub: + type: boolean + description: Indicates if the stream is a dub. + example: true + title: + type: string + description: 'Optional title for the stream (e.g., language variant).' + example: SDH + Genre: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The country of origin of this media item + example: United States of America + Country: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The country of origin of this media item + example: United States of America + Director: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The role of Director + example: Danny Boyle + Writer: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The role of Writer + example: Danny Boyle + Role: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The name of the actor for this role + example: Danny Boyle + Guid: + x-speakeasy-name-override: guids + type: array + items: + type: object + properties: + id: + type: string + description: | + The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337 + example: 'tvdb://2337' + Collection: + type: array + items: + allOf: + - type: object + required: + - tag + properties: + tag: + type: string + description: The user-made collection this media item belongs to + example: My Awesome Collection + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + '404': + description: Not Found - Returned if the resource could not be found + content: + text/html: + example: | + + + + Not Found + + +

404 Not Found

+ + + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetAllMediaLibraryRequest( + sectionKey: 9518, + type: Operations\GetAllMediaLibraryQueryParamType::TvShow, + ); + + $response = $sdk->library->getAllMediaLibrary( + request: $request + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: library + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetAllMediaLibraryRequest.new(\n section_key: 9518,\n type: ::PlexRubySDK::Operations::GetAllMediaLibraryQueryParamType::TV_SHOW,\n include_meta: ::PlexRubySDK::Operations::GetAllMediaLibraryQueryParamIncludeMeta::ENABLE,\n include_guids: ::PlexRubySDK::Operations::QueryParamIncludeGuids::ENABLE,\n include_advanced: ::PlexRubySDK::Operations::IncludeAdvanced::ENABLE,\n include_collections: ::PlexRubySDK::Operations::QueryParamIncludeCollections::ENABLE,\n include_external_media: ::PlexRubySDK::Operations::QueryParamIncludeExternalMedia::ENABLE,\n x_plex_container_start: 0,\n x_plex_container_size: 50,\n)\n \nres = s.library.get_all_media_library(req)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: library + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetAllMediaLibrary(ctx, operations.GetAllMediaLibraryRequest{\n SectionKey: 9518,\n Type: operations.GetAllMediaLibraryQueryParamTypeTvShow,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: library + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetAllMediaLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetAllMediaLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetAllMediaLibraryQueryParamType; + import dev.plexapi.plexapi.models.operations.GetAllMediaLibraryRequest; + import dev.plexapi.plexapi.models.operations.GetAllMediaLibraryResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetAllMediaLibraryBadRequest, GetAllMediaLibraryUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetAllMediaLibraryRequest req = GetAllMediaLibraryRequest.builder() + .sectionKey(9518) + .type(GetAllMediaLibraryQueryParamType.TvShow) + .build(); + + GetAllMediaLibraryResponse res = sdk.library().getAllMediaLibrary() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: library + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetAllMediaLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getAllMediaLibrary({ + sectionKey: 9518, + type: GetAllMediaLibraryQueryParamType.TvShow, + }); + + // Handle the result + console.log(result); + } + + run(); + '/library/sections/{sectionKey}/refresh': + get: + tags: + - Library + summary: Refresh Metadata Of The Library + description: | + This endpoint Refreshes all the Metadata of the library. + operationId: get-refresh-library-metadata + parameters: - name: force description: Force the refresh even if the library is already being refreshed. in: query @@ -9660,6 +10644,14 @@ paths: - 0 - 1 required: false + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" + in: path + schema: + type: integer + format: int32 + example: 9518 + required: true responses: '200': description: The library is refreshing @@ -9722,65 +10714,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getRefreshLibraryMetadata( + sectionKey: 9518, + force: Operations\Force::One + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->library->getRefreshLibraryMetadata(9518, Operations\Force::One); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: metadata - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_refresh_library_metadata(section_key=9518, force=::PlexRubySDK::Operations::Force::ONE)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_refresh_library_metadata(section_key=9518, force=::PlexRubySDK::Operations::Force::ONE)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: metadata - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceOne.ToPointer()) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceOne.ToPointer())\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: metadata source: |- @@ -9799,16 +10757,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() - .sectionKey(9518) .force(Force.ONE) + .sectionKey(9518) .call(); // handle response @@ -9816,7 +10769,22 @@ paths: } - lang: typescript label: metadata - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Force } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getRefreshLibraryMetadata(9518, Force.One);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Force } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getRefreshLibraryMetadata(9518, Force.One); + + // Handle the result + console.log(result); + } + + run(); '/library/sections/{sectionKey}/search': get: tags: @@ -9845,7 +10813,7 @@ paths: - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season @@ -9858,12 +10826,18 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK required: true responses: '200': @@ -10044,65 +11018,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getSearchLibrary( + sectionKey: 9518, + type: Operations\GetSearchLibraryQueryParamType::TvShow + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->library->getSearchLibrary(9518, Operations\QueryParamType::TvShow); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: library - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_search_library(section_key=9518, type=::PlexRubySDK::Operations::QueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_search_library(section_key=9518, type=::PlexRubySDK::Operations::GetSearchLibraryQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: library - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetSearchLibrary(ctx, 9518, operations.QueryParamTypeTvShow) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetSearchLibrary(ctx, 9518, operations.GetSearchLibraryQueryParamTypeTvShow)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: library source: |- @@ -10111,8 +11051,8 @@ paths: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.GetSearchLibraryBadRequest; import dev.plexapi.plexapi.models.errors.GetSearchLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetSearchLibraryQueryParamType; import dev.plexapi.plexapi.models.operations.GetSearchLibraryResponse; - import dev.plexapi.plexapi.models.operations.QueryParamType; import java.lang.Exception; public class Application { @@ -10121,16 +11061,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetSearchLibraryResponse res = sdk.library().getSearchLibrary() .sectionKey(9518) - .type(QueryParamType.TvShow) + .type(GetSearchLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { @@ -10140,498 +11075,1867 @@ paths: } - lang: typescript label: library - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { QueryParamType } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getSearchLibrary(9518, QueryParamType.Two);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - '/library/metadata/{ratingKey}': + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getSearchLibrary(9518, GetSearchLibraryQueryParamType.TvShow); + + // Handle the result + console.log(result); + } + + run(); + '/library/sections/{sectionKey}/genre': get: tags: - Library - summary: Get Metadata by RatingKey + summary: Get Genres of library media + operationId: get-genres-library description: | - This endpoint will return the metadata of a library item specified with the ratingKey. - operationId: get-meta-data-by-rating-key + Retrieves a list of all the genres that are found for the media in this library. parameters: - - name: ratingKey + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" in: path - description: the id of the library item to return the children of. schema: type: integer + format: int32 example: 9518 required: true + - name: type + in: query + description: | + The type of media to retrieve or filter by. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + schema: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 8 + - 9 + - 10 + example: 2 + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - AUDIO + - ALBUM + - TRACK + required: true + - name: Accept + in: header + required: false + schema: + type: string + enum: + - application/json + - application/xml + example: application/json responses: '200': - description: The metadata of the library item. + description: Successful response containing media container data. content: application/json: schema: type: object + properties: + MediaContainer: + allOf: + - type: object + required: + - size + properties: + size: + description: Number of media items returned in this response. + type: integer + format: int32 + example: 50 + - type: object + required: + - allowSync + properties: + allowSync: + type: boolean + description: Indicates whether syncing is allowed. + example: false + - type: object + required: + - art + properties: + art: + type: string + description: URL for the background artwork of the media container. + example: '/:/resources/show-fanart.jpg' + - type: object + required: + - content + properties: + content: + type: string + description: The content type or mode. + example: secondary + - type: object + required: + - identifier + properties: + identifier: + type: string + description: An plugin identifier for the media container. + example: com.plexapp.plugins.library + - type: object + required: + - mediaTagPrefix + properties: + mediaTagPrefix: + type: string + description: The prefix used for media tag resource paths. + example: /system/bundle/media/flags/ + - type: object + required: + - mediaTagVersion + properties: + mediaTagVersion: + type: integer + description: The version number for media tags. + example: 1734362201 + - type: object + required: + - nocache + properties: + nocache: + type: boolean + description: Specifies whether caching is disabled. + example: true + - type: object + required: + - thumb + properties: + thumb: + type: string + description: URL for the thumbnail image of the media container. + example: '/:/resources/show.png' + - type: object + required: + - title1 + properties: + title1: + type: string + description: The primary title of the media container. + example: TV Series + - type: object + required: + - title2 + properties: + title2: + type: string + description: The secondary title of the media container. + example: By Starring Actor + - type: object + required: + - viewGroup + properties: + viewGroup: + type: string + description: Identifier for the view group layout. + example: secondary + - type: object + properties: + Directory: + type: array + items: + type: object + required: + - fastKey + - key + - title + - type + properties: + fastKey: + type: string + example: /library/sections/10/all?genre=89 + key: + type: string + example: '89' + title: + type: string + example: Action + type: + type: string + example: genre + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + '404': + description: Not Found - Returned if the resource could not be found + content: + text/html: + example: | + + + + Not Found + + +

404 Not Found

+ + + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getGenresLibrary( + sectionKey: 9518, + type: Operations\GetGenresLibraryQueryParamType::TvShow + + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: library + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_genres_library(section_key=9518, type=::PlexRubySDK::Operations::GetGenresLibraryQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: library + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetGenresLibrary(ctx, 9518, operations.GetGenresLibraryQueryParamTypeTvShow)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: library + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetGenresLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetGenresLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetGenresLibraryQueryParamType; + import dev.plexapi.plexapi.models.operations.GetGenresLibraryResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetGenresLibraryResponse res = sdk.library().getGenresLibrary() + .sectionKey(9518) + .type(GetGenresLibraryQueryParamType.TvShow) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: library + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetGenresLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getGenresLibrary(9518, GetGenresLibraryQueryParamType.TvShow); + + // Handle the result + console.log(result); + } + + run(); + '/library/sections/{sectionKey}/country': + get: + tags: + - Library + summary: Get Countries of library media + operationId: get-countries-library + description: | + Retrieves a list of all the countries that are found for the media in this library. + parameters: + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" + in: path + schema: + type: integer + format: int32 + example: 9518 + required: true + - name: type + in: query + description: | + The type of media to retrieve or filter by. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + schema: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 8 + - 9 + - 10 + example: 2 + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - AUDIO + - ALBUM + - TRACK + required: true + - name: Accept + in: header + required: false + schema: + type: string + enum: + - application/json + - application/xml + example: application/json + responses: + '200': + description: Successful response containing media container data. + content: + application/json: + schema: + type: object + properties: + MediaContainer: + allOf: + - type: object + required: + - size + properties: + size: + description: Number of media items returned in this response. + type: integer + format: int32 + example: 50 + - type: object + required: + - allowSync + properties: + allowSync: + type: boolean + description: Indicates whether syncing is allowed. + example: false + - type: object + required: + - art + properties: + art: + type: string + description: URL for the background artwork of the media container. + example: '/:/resources/show-fanart.jpg' + - type: object + required: + - content + properties: + content: + type: string + description: The content type or mode. + example: secondary + - type: object + required: + - identifier + properties: + identifier: + type: string + description: An plugin identifier for the media container. + example: com.plexapp.plugins.library + - type: object + required: + - mediaTagPrefix + properties: + mediaTagPrefix: + type: string + description: The prefix used for media tag resource paths. + example: /system/bundle/media/flags/ + - type: object + required: + - mediaTagVersion + properties: + mediaTagVersion: + type: integer + description: The version number for media tags. + example: 1734362201 + - type: object + required: + - nocache + properties: + nocache: + type: boolean + description: Specifies whether caching is disabled. + example: true + - type: object + required: + - thumb + properties: + thumb: + type: string + description: URL for the thumbnail image of the media container. + example: '/:/resources/show.png' + - type: object + required: + - title1 + properties: + title1: + type: string + description: The primary title of the media container. + example: TV Series + - type: object + required: + - title2 + properties: + title2: + type: string + description: The secondary title of the media container. + example: By Starring Actor + - type: object + required: + - viewGroup + properties: + viewGroup: + type: string + description: Identifier for the view group layout. + example: secondary + - type: object + properties: + Directory: + type: array + items: + type: object + required: + - fastKey + - key + - title + properties: + fastKey: + type: string + example: /library/sections/2/all?country=15491 + key: + type: string + example: '15491' + title: + type: string + example: Japan + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + '404': + description: Not Found - Returned if the resource could not be found + content: + text/html: + example: | + + + + Not Found + + +

404 Not Found

+ + + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getCountriesLibrary( + sectionKey: 9518, + type: Operations\GetCountriesLibraryQueryParamType::TvShow + + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: library + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_countries_library(section_key=9518, type=::PlexRubySDK::Operations::GetCountriesLibraryQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: library + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetCountriesLibrary(ctx, 9518, operations.GetCountriesLibraryQueryParamTypeTvShow)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: library + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetCountriesLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetCountriesLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetCountriesLibraryQueryParamType; + import dev.plexapi.plexapi.models.operations.GetCountriesLibraryResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary() + .sectionKey(9518) + .type(GetCountriesLibraryQueryParamType.TvShow) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: library + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetCountriesLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getCountriesLibrary(9518, GetCountriesLibraryQueryParamType.TvShow); + + // Handle the result + console.log(result); + } + + run(); + '/library/sections/{sectionKey}/actor': + get: + tags: + - Library + summary: Get Actors of library media + operationId: get-actors-library + description: | + Retrieves a list of all the actors that are found for the media in this library. + parameters: + - name: sectionKey + description: "The unique key of the Plex library. \nNote: This is unique in the context of the Plex server.\n" + in: path + schema: + type: integer + format: int32 + example: 9518 + required: true + - name: type + in: query + description: | + The type of media to retrieve or filter by. + 1 = movie + 2 = show + 3 = season + 4 = episode + E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + schema: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 8 + - 9 + - 10 + example: 2 + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - AUDIO + - ALBUM + - TRACK + required: true + - name: Accept + in: header + required: false + schema: + type: string + enum: + - application/json + - application/xml + example: application/json + responses: + '200': + description: Successful response containing media container data. + content: + application/json: + schema: + type: object + properties: + MediaContainer: + allOf: + - type: object + required: + - size + properties: + size: + description: Number of media items returned in this response. + type: integer + format: int32 + example: 50 + - type: object + required: + - allowSync + properties: + allowSync: + type: boolean + description: Indicates whether syncing is allowed. + example: false + - type: object + required: + - art + properties: + art: + type: string + description: URL for the background artwork of the media container. + example: '/:/resources/show-fanart.jpg' + - type: object + required: + - identifier + properties: + identifier: + type: string + description: An plugin identifier for the media container. + example: com.plexapp.plugins.library + - type: object + required: + - mediaTagPrefix + properties: + mediaTagPrefix: + type: string + description: The prefix used for media tag resource paths. + example: /system/bundle/media/flags/ + - type: object + required: + - mediaTagVersion + properties: + mediaTagVersion: + type: integer + description: The version number for media tags. + example: 1734362201 + - type: object + required: + - nocache + properties: + nocache: + type: boolean + description: Specifies whether caching is disabled. + example: true + - type: object + required: + - thumb + properties: + thumb: + type: string + description: URL for the thumbnail image of the media container. + example: '/:/resources/show.png' + - type: object + required: + - title1 + properties: + title1: + type: string + description: The primary title of the media container. + example: TV Series + - type: object + required: + - title2 + properties: + title2: + type: string + description: The secondary title of the media container. + example: By Starring Actor + - type: object + required: + - viewGroup + properties: + viewGroup: + type: string + description: Identifier for the view group layout. + example: secondary + - type: object + required: + - viewMode + properties: + viewMode: + type: string + description: Identifier for the view mode. + example: '131131' + - type: object + properties: + Directory: + type: array + description: An array of actor entries for media items. + items: + type: object + required: + - fastKey + - thumb + - key + - title + properties: + fastKey: + type: string + description: A fast lookup key for the actor relative url. + example: /library/sections/2/all?actor=134671 + thumb: + type: string + description: URL for the thumbnail image of the actor. + example: 'https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg' + key: + type: string + description: A unique key representing the actor. + example: '134671' + title: + type: string + description: The name of the actor. + example: Aaron Paul + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + '404': + description: Not Found - Returned if the resource could not be found + content: + text/html: + example: | + + + + Not Found + + +

404 Not Found

+ + + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getActorsLibrary( + sectionKey: 9518, + type: Operations\GetActorsLibraryQueryParamType::TvShow + + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: library + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_actors_library(section_key=9518, type=::PlexRubySDK::Operations::GetActorsLibraryQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: library + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetActorsLibrary(ctx, 9518, operations.GetActorsLibraryQueryParamTypeTvShow)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: library + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetActorsLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetActorsLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetActorsLibraryQueryParamType; + import dev.plexapi.plexapi.models.operations.GetActorsLibraryResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetActorsLibraryBadRequest, GetActorsLibraryUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetActorsLibraryResponse res = sdk.library().getActorsLibrary() + .sectionKey(9518) + .type(GetActorsLibraryQueryParamType.TvShow) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: library + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetActorsLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getActorsLibrary(9518, GetActorsLibraryQueryParamType.TvShow); + + // Handle the result + console.log(result); + } + + run(); + /library/search: + get: + tags: + - Library + summary: Search All Libraries + operationId: get-search-all-libraries + description: | + Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. + parameters: + - name: query + in: query + required: true + schema: + type: string + description: The search query term. + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 + - name: limit + in: query + required: false + schema: + type: integer + description: Limit the number of results returned. + - name: searchTypes + in: query + required: false + schema: + type: array + items: + type: string + enum: + - movies + - music + - otherVideos + - people + - tv + example: 'movies,music,otherVideos,people,tv' + style: form + explode: false + description: | + A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. + - name: includeCollections + in: query + required: false + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + description: Whether to include collections in the search results. + - name: includeExternalMedia + in: query + required: false + schema: + type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + description: Whether to include external media in the search results. + responses: + '200': + description: The libraries available on the Server + content: + application/json: + schema: + type: object + required: + - MediaContainer properties: MediaContainer: type: object + required: + - size + - SearchResult properties: size: - type: integer - format: int32 - example: 1 - allowSync: - type: boolean - example: true - identifier: - type: string - example: com.plexapp.plugins.library - librarySectionID: - type: integer - format: int32 - example: 1 - librarySectionTitle: - type: string - example: Movies - librarySectionUUID: - type: string - example: cfc899d7-3000-46f6-8489-b9592714ada5 - mediaTagPrefix: - type: string - example: /system/bundle/media/flags/ - mediaTagVersion: - type: integer - format: int32 - example: 1698860922 - Metadata: + type: number + SearchResult: type: array items: type: object + required: + - score + - Metadata properties: - ratingKey: - type: string - example: '17' - key: - type: string - example: /library/metadata/17 - guid: - type: string - example: 'plex://movie/5d77683f6f4521001ea9dc53' - studio: - type: string - example: Universal Pictures - type: - type: string - example: movie - title: - type: string - example: Serenity - librarySectionTitle: - type: string - example: Movies - librarySectionID: - type: integer - format: int32 - example: 1 - librarySectionKey: - type: string - example: /library/sections/1 - contentRating: - type: string - example: PG-13 - summary: - type: string - example: 'Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she''s not even aware - so dangerous, no one''s safe, as an Alliance operative''s sent to capture her, and all others are considered irrelevant to his job.' - rating: + score: type: number - example: 8.2 - audienceRating: - type: number - example: 9.1 - year: - type: integer - format: int32 - example: 2005 - tagline: - type: string - example: They aim to misbehave. - thumb: - type: string - example: /library/metadata/17/thumb/1705637165 - art: - type: string - example: /library/metadata/17/art/1705637165 - duration: - type: integer - format: int32 - example: 141417 - originallyAvailableAt: - type: string - format: date - example: 2005-09-29T00:00:00.000Z - addedAt: - type: integer - format: int32 - example: 1705637164 - updatedAt: - type: integer - format: int32 - example: 1705637165 - audienceRatingImage: - type: string - example: 'rottentomatoes://image.rating.upright' - hasPremiumPrimaryExtra: - type: string - example: '1' - ratingImage: - type: string - example: 'rottentomatoes://image.rating.ripe' - Media: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 15 - duration: - type: integer - format: int32 - example: 141417 - bitrate: - type: integer - format: int32 - example: 2278 - width: - type: integer - format: int32 - example: 1920 - height: - type: integer - format: int32 - example: 814 - aspectRatio: - type: number - example: 2.35 - audioChannels: - type: integer - format: int32 - example: 2 - audioCodec: - type: string - example: aac - videoCodec: - type: string - example: h264 - videoResolution: - type: string - example: '1080' - container: - type: string - example: mp4 - videoFrameRate: - type: string - example: 24p - optimizedForStreaming: - type: integer - format: int32 - example: 0 - audioProfile: - type: string - example: lc - has64bitOffsets: - type: boolean - example: false - videoProfile: - type: string - example: high - Part: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 15 - key: - type: string - example: /library/parts/15/1705637151/file.mp4 - duration: - type: integer - format: int32 - example: 141417 - file: - type: string - example: /movies/Serenity (2005)/Serenity (2005).mp4 - size: - type: integer - format: int32 - example: 40271948 - audioProfile: - type: string - example: lc - container: - type: string - example: mp4 - has64bitOffsets: - type: boolean - example: false - optimizedForStreaming: - type: boolean - example: false - videoProfile: - type: string - example: high - Stream: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 29 - streamType: - type: integer - format: int32 - example: 2 - default: - type: boolean - example: true - codec: - type: string - example: aac - index: - type: integer - format: int32 - example: 0 - bitrate: - type: integer - format: int32 - example: 128 - bitDepth: - type: integer - format: int32 - example: 8 - chromaLocation: - type: string - example: left - chromaSubsampling: - type: string - example: 14520 - codedHeight: - type: integer - format: int32 - example: 816 - codedWidth: - type: integer - format: int32 - example: 1920 - colorPrimaries: - type: string - example: bt709 - colorRange: - type: string - example: tv - colorSpace: - type: string - example: bt709 - colorTrc: - type: string - example: bt709 - frameRate: - type: integer - format: int32 - example: 24 - hasScalingMatrix: - type: boolean - example: false - height: - type: integer - format: int32 - example: 814 - level: - type: integer - format: int32 - example: 40 - profile: - type: string - example: lc - refFrames: - type: integer - format: int32 - example: 4 - scanType: - type: string - example: progressive - streamIdentifier: - type: string - example: '1' - width: - type: integer - format: int32 - example: 1920 - displayTitle: - type: string - example: English (AAC Stereo) - extendedDisplayTitle: - type: string - example: English (AAC Stereo) - selected: - type: boolean - example: true - channels: - type: integer - format: int32 - example: 2 - language: - type: string - example: English - languageTag: - type: string - example: en - languageCode: - type: string - example: eng - samplingRate: - type: integer - format: int32 - example: 44100 - Genre: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 184 - filter: - type: string - example: genre=184 - tag: - type: string - example: Thriller - Country: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 116 - filter: - type: string - example: country=116 - tag: - type: string - example: United States of America - Guid: - x-speakeasy-name-override: guids - type: array - items: - type: object - properties: - id: - type: string - example: 'tvdb://2337' - Rating: - x-speakeasy-name-override: ratings - type: array - items: - type: object - properties: - image: - type: string - example: 'themoviedb://image.rating' - value: - type: number - example: 7.4 + format: float + Metadata: + type: object + required: + - ratingKey + - key + - guid + - title + - type + - addedAt + - summary + properties: + ratingKey: + type: string + example: '58683' + description: | + The rating key (Media ID) of this media item. + Note: This is always an integer, but is represented as a string in the API. + key: + type: string + example: /library/metadata/58683 + guid: + type: string + example: 'plex://movie/5d7768ba96b655001fdc0408' + studio: + type: string + example: 20th Century Studios + skipChildren: + type: boolean + example: false + librarySectionID: + type: integer + examples: + - 1 + librarySectionTitle: + type: string + example: Movies + librarySectionKey: + type: string + example: /library/sections/1 + type: + type: string + enum: + - movie + - show + - season + - episode + - artist + - album + example: movie + description: | + The type of media content + x-speakeasy-enums: + - MOVIE + - TV_SHOW + - SEASON + - EPISODE + - ARTIST + - ALBUM + title: + type: string + example: 'Avatar: The Way of Water' + slug: + type: string + example: 4-for-texas + contentRating: + type: string + example: PG-13 + summary: + type: string + example: 'Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na''vi race to protect their home.' + rating: + type: number + example: 7.6 + audienceRating: + type: number + example: 9.2 + year: + type: integer + format: int32 + example: 2022 + seasonCount: + type: integer + format: int32 + example: 2022 + tagline: + type: string + example: Return to Pandora. + flattenSeasons: + type: string + description: 'Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).' + enum: + - '-1' + - '0' + - '1' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - HIDE + - SHOW + example: '1' + episodeSort: + type: string + description: 'Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).' + enum: + - '-1' + - '0' + - '1' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - OLDEST_FIRST + - NEWEST_FIRST + example: '0' + enableCreditsMarkerGeneration: + type: string + description: 'Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).' + enum: + - '-1' + - '0' + x-speakeasy-enums: + - LIBRARY_DEFAULT + - DISABLED + example: '-1' + showOrdering: + type: string + description: | + Setting that indicates the episode ordering for the show. + None = Library default, + tmdbAiring = The Movie Database (Aired), + aired = TheTVDB (Aired), + dvd = TheTVDB (DVD), + absolute = TheTVDB (Absolute)). + enum: + - None + - tmdbAiring + - aired + - dvd + - absolute + x-speakeasy-enums: + - NONE + - TMDB_AIRING + - TVDB_AIRED + - TVDB_DVD + - TVDB_ABSOLUTE + example: absolute + thumb: + type: string + example: /library/metadata/58683/thumb/1703239236 + art: + type: string + example: /library/metadata/58683/art/1703239236 + banner: + type: string + example: /library/metadata/58683/banner/1703239236 + duration: + type: integer + format: int32 + example: 11558112 + originallyAvailableAt: + type: string + format: date + example: 2022-12-14T00:00:00.000Z + addedAt: type: - type: string - example: audience - Director: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 130 - filter: - type: string - example: director=130 - tag: - type: string - example: Joss Whedon - tagKey: - type: string - example: 5d776828880197001ec90e8f - thumb: - type: string - example: 'https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg' - Writer: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 132 - filter: - type: string - example: writer=132 - tag: - type: string - example: Joss Whedon - tagKey: - type: string - example: 5d776828880197001ec90e8f - thumb: - type: string - example: 'https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg' - Role: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 220 - filter: - type: string - example: actor=220 - tag: - type: string - example: Dennis Keiffer - tagKey: - type: string - example: 5d77683554f42c001f8c4708 - role: - type: string - example: Bar Guy (uncredited) - thumb: - type: string - example: 'https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg' - Producer: - type: array - items: - type: object - properties: - id: - type: integer - format: int32 - example: 221 - filter: - type: string - example: producer=221 - tag: - type: string - example: Barry Mendel - tagKey: - type: string - example: 5d776826961905001eb90e2b - thumb: - type: string - example: 'https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg' + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + updatedAt: + type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + audienceRatingImage: + type: string + example: 'rottentomatoes://image.rating.upright' + chapterSource: + type: string + example: media + primaryExtraKey: + type: string + example: /library/metadata/58684 + ratingImage: + type: string + example: 'rottentomatoes://image.rating.ripe' + grandparentRatingKey: + type: string + example: '66' + grandparentGuid: + type: string + example: 'plex://show/5d9c081b170e24001f2a7be4' + grandparentKey: + type: string + example: /library/metadata/66 + grandparentTitle: + type: string + example: Caprica + grandparentThumb: + type: string + example: /library/metadata/66/thumb/1705716261 + parentSlug: + type: string + example: alice-in-borderland-2020 + grandparentSlug: + type: string + example: alice-in-borderland-2020 + grandparentArt: + type: string + example: /library/metadata/66/art/1705716261 + grandparentTheme: + type: string + example: /library/metadata/66/theme/1705716261 + Media: + description: | + The Media object is only included when type query is `4` or higher. + type: array + items: + type: object + required: + - id + - container + - Part + properties: + id: + type: integer + format: int32 + example: 119534 + duration: + type: integer + format: int32 + example: 11558112 + bitrate: + type: integer + format: int32 + example: 25025 + width: + type: integer + format: int32 + example: 3840 + height: + type: integer + format: int32 + example: 2072 + aspectRatio: + type: number + example: 1.85 + audioProfile: + type: string + example: dts + audioChannels: + type: integer + format: int32 + example: 6 + audioCodec: + type: string + example: eac3 + videoCodec: + type: string + example: hevc + videoResolution: + type: string + example: 4k + container: + type: string + example: mkv + videoFrameRate: + type: string + example: 24p + videoProfile: + type: string + example: main 10 + hasVoiceActivity: + type: boolean + example: false + optimizedForStreaming: + allOf: + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + has64bitOffsets: + type: boolean + example: false + Part: + type: array + items: + type: object + required: + - id + - key + - file + - size + - container + properties: + id: + type: integer + format: int32 + example: 119542 + key: + type: string + example: /library/parts/119542/1680457526/file.mkv + duration: + type: integer + format: int32 + example: 11558112 + file: + type: string + example: /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv + size: + type: integer + format: int64 + example: 36158371307 + container: + type: string + description: | + The container format of the media file. + example: mkv + audioProfile: + type: string + example: dts + has64bitOffsets: + type: boolean + example: false + optimizedForStreaming: + type: boolean + example: false + videoProfile: + type: string + example: main 10 + indexes: + type: string + example: sd + hasThumbnail: + type: string + enum: + - '0' + - '1' + example: '1' + default: '0' + x-speakeasy-enums: + - false + - true + Stream: + type: array + items: + type: object + required: + - id + - streamType + - codec + - index + properties: + id: + type: integer + example: 272796 + streamType: + type: integer + description: 'Type of stream (1 = video, 2 = audio, 3 = subtitle)' + example: 1 + default: + type: boolean + description: Indicates if this is the default stream + example: true + selected: + type: boolean + description: Indicates if the stream is selected + example: true + codec: + type: string + description: Codec used by the stream + example: h264 + index: + type: integer + description: The index of the stream + example: 0 + bitrate: + type: integer + description: The bitrate of the stream in kbps + example: 6273 + colorPrimaries: + type: string + description: The color primaries of the video stream + example: bt709 + colorRange: + type: string + description: The color range of the video stream + example: tv + colorSpace: + type: string + description: The color space of the video stream + example: bt709 + colorTrc: + type: string + description: The transfer characteristics (TRC) of the video stream + example: bt709 + bitDepth: + type: integer + description: The bit depth of the video stream + example: 8 + chromaLocation: + type: string + description: The chroma location of the video stream + example: left + streamIdentifier: + type: string + description: The identifier of the video stream + example: '2' + chromaSubsampling: + type: string + description: The chroma subsampling format + example: '4:2:0' + codedHeight: + type: integer + description: The coded height of the video stream + example: 1088 + codedWidth: + type: integer + description: The coded width of the video stream + example: 1920 + frameRate: + type: number + description: The frame rate of the video stream + example: 29.97 + hasScalingMatrix: + type: boolean + description: Indicates if the stream has a scaling matrix + example: false + hearingImpaired: + type: boolean + example: false + closedCaptions: + type: boolean + example: false + embeddedInVideo: + type: string + example: '1' + height: + type: integer + description: The height of the video stream + example: 1080 + level: + type: integer + description: The level of the video codec + example: 40 + profile: + type: string + description: The profile of the video codec + example: main + refFrames: + type: integer + description: Number of reference frames + example: 4 + scanType: + type: string + description: The scan type (progressive or interlaced) + example: progressive + width: + type: integer + description: The width of the video stream + example: 1920 + displayTitle: + type: string + description: Display title of the stream + example: 1080p (H.264) + extendedDisplayTitle: + type: string + description: Extended display title of the stream + example: 1080p (H.264) + channels: + type: integer + description: Number of audio channels (for audio streams) + example: 2 + language: + type: string + description: The language of the stream (for audio/subtitle streams) + example: English + languageTag: + type: string + description: Language tag of the stream + example: en + languageCode: + type: string + description: Language code of the stream + example: eng + audioChannelLayout: + type: string + description: The audio channel layout + example: stereo + samplingRate: + type: integer + description: Sampling rate of the audio stream in Hz + example: 48000 + title: + type: string + description: Title of the subtitle track (for subtitle streams) + example: English + canAutoSync: + type: boolean + description: Indicates if the subtitle stream can auto-sync + example: false + Genre: + type: array + items: + type: object + properties: + tag: + type: string + example: Adventure + Country: + type: array + items: + type: object + properties: + tag: + type: string + example: United States of America + Director: + type: array + items: + type: object + properties: + tag: + type: string + example: James Cameron + Writer: + type: array + items: + type: object + properties: + tag: + type: string + example: James Cameron + Collection: + type: array + items: + type: object + properties: + tag: + type: string + example: Working NL Subs + Role: + type: array + items: + type: object + properties: + id: + type: integer + description: The ID of the tag or actor. + example: 294129 + filter: + type: string + description: The filter used to find the actor or tag. + example: actor=294129 + thumb: + type: string + description: The thumbnail of the actor + example: 'https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg' + tag: + type: string + description: The name of the tag or actor. + example: Mike Smith + tagKey: + type: string + description: Unique identifier for the tag. + example: 668e7e7b22bcad9064350c91 + role: + type: string + description: The role of the actor or tag in the media. + example: Self + Location: + type: array + items: + type: object + properties: + path: + type: string + example: /TV Shows/House + Guid: + x-speakeasy-name-override: MediaGuid + description: | + The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. + type: array + items: + type: object + required: + - id + properties: + id: + type: string + description: | + Can be one of the following formats: + imdb://tt13015952, tmdb://2434012, tvdb://7945991 + example: 'imdb://tt13015952' + UltraBlurColors: + type: object + required: + - topLeft + - topRight + - bottomRight + - bottomLeft + properties: + topLeft: + type: string + example: 11333b + topRight: + type: string + example: 0a232d + bottomRight: + type: string + example: 073958 + bottomLeft: + type: string + example: 1f5066 + Rating: + x-speakeasy-name-override: MetaDataRating + type: array + items: + type: object + required: + - image + - value + - type + properties: + image: + type: string + description: A URI or path to the rating image. + example: 'themoviedb://image.rating' + value: + type: number + format: float + description: The value of the rating. + example: 3 + type: + type: string + description: 'The type of rating (e.g., audience, critic).' + example: audience + Image: + type: array + items: + type: object + required: + - alt + - type + - url + properties: + alt: + type: string + example: Episode 1 + type: + type: string + enum: + - coverPoster + - background + - snapshot + - clearLogo + example: background + url: + type: string + example: /library/metadata/45521/thumb/1644710589 + titleSort: + type: string + example: Whale + viewCount: + type: integer + format: int32 + example: 1 + lastViewedAt: + type: integer + format: int32 + example: 1682752242 + originalTitle: + type: string + example: 映画 ブラッククローバー 魔法帝の剣 + viewOffset: + type: integer + format: int32 + example: 5222500 + skipCount: + type: integer + format: int32 + example: 1 + index: + type: integer + format: int32 + example: 1 + theme: + type: string + example: /library/metadata/1/theme/1705636920 + leafCount: + type: integer + format: int32 + example: 14 + viewedLeafCount: + type: integer + format: int32 + example: 0 + childCount: + type: integer + format: int32 + example: 1 + hasPremiumExtras: + type: string + example: '1' + hasPremiumPrimaryExtra: + type: string + example: '1' + parentRatingKey: + type: string + description: | + The rating key of the parent item. + example: '66' + parentGuid: + type: string + example: 'plex://show/5d9c081b170e24001f2a7be4' + parentStudio: + type: string + example: UCP + parentKey: + type: string + example: /library/metadata/66 + parentTitle: + type: string + example: Caprica + parentIndex: + type: integer + format: int32 + example: 1 + parentYear: + type: integer + format: int32 + example: 2010 + parentThumb: + type: string + example: /library/metadata/66/thumb/1705716261 + parentTheme: + type: string + example: /library/metadata/66/theme/1705716261 '400': description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' content: @@ -10684,96 +12988,73 @@ paths: example: 401 x-codeSamples: - lang: php - label: key + label: libraries source: |- declare(strict_types=1); require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); + use LukeHagar\Plex_API\Models\Operations; $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { + $request = new Operations\GetSearchAllLibrariesRequest( + query: '', + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + searchTypes: [ + Operations\SearchTypes::People, + ], + ); - $response = $sdk->library->getMetaDataByRatingKey(9518); + $response = $sdk->library->getSearchAllLibraries( + request: $request + ); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby - label: key - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_meta_data_by_rating_key(rating_key=9518)\n\nif ! res.object.nil?\n # handle response\nend" + label: libraries + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetSearchAllLibrariesRequest.new(\n query: \"\",\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n search_types: [\n ::PlexRubySDK::Operations::SearchTypes::PEOPLE,\n ],\n include_collections: ::PlexRubySDK::Operations::GetSearchAllLibrariesQueryParamIncludeCollections::ENABLE,\n include_external_media: ::PlexRubySDK::Operations::GetSearchAllLibrariesQueryParamIncludeExternalMedia::ENABLE,\n)\n \nres = s.library.get_search_all_libraries(req)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go - label: key - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetMetaDataByRatingKey(ctx, 9518) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + label: libraries + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{\n Query: \"\",\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n SearchTypes: []operations.SearchTypes{\n operations.SearchTypesPeople,\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java - label: key + label: libraries source: |- package hello.world; import dev.plexapi.plexapi.PlexAPI; - import dev.plexapi.plexapi.models.errors.GetMetaDataByRatingKeyBadRequest; - import dev.plexapi.plexapi.models.errors.GetMetaDataByRatingKeyUnauthorized; - import dev.plexapi.plexapi.models.operations.GetMetaDataByRatingKeyResponse; + import dev.plexapi.plexapi.models.errors.GetSearchAllLibrariesBadRequest; + import dev.plexapi.plexapi.models.errors.GetSearchAllLibrariesUnauthorized; + import dev.plexapi.plexapi.models.operations.GetSearchAllLibrariesRequest; + import dev.plexapi.plexapi.models.operations.GetSearchAllLibrariesResponse; + import dev.plexapi.plexapi.models.operations.SearchTypes; import java.lang.Exception; + import java.util.List; public class Application { - public static void main(String[] args) throws GetMetaDataByRatingKeyBadRequest, GetMetaDataByRatingKeyUnauthorized, Exception { + public static void main(String[] args) throws GetSearchAllLibrariesBadRequest, GetSearchAllLibrariesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); - GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey() - .ratingKey(9518L) + GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder() + .query("") + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + .searchTypes(List.of( + SearchTypes.PEOPLE)) + .build(); + + GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries() + .request(req) .call(); if (res.object().isPresent()) { @@ -10782,8 +13063,1334 @@ paths: } } - lang: typescript - label: key - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getMetaDataByRatingKey(9518);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + label: libraries + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { SearchTypes } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getSearchAllLibraries({ + query: "", + clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", + searchTypes: [ + SearchTypes.People, + ], + }); + + // Handle the result + console.log(result); + } + + run(); + '/library/metadata/{ratingKey}': + get: + tags: + - Library + summary: Get Media Metadata + description: | + This endpoint will return all the (meta)data of a library item specified with by the ratingKey. + operationId: get-media-meta-data + parameters: + - name: ratingKey + in: path + description: the id of the library item to return the children of. + schema: + type: integer + example: 9518 + required: true + - name: includeConcerts + in: query + description: Include concerts data if set to true. + required: false + schema: + type: boolean + example: true + - name: includeExtras + in: query + description: Include extra content (e.g. bonus features). + required: false + schema: + type: boolean + example: true + - name: includeOnDeck + in: query + description: Include on-deck items. + required: false + schema: + type: boolean + example: true + - name: includePopularLeaves + in: query + description: Include popular leaves (episodes/chapters). + required: false + schema: + type: boolean + example: true + - name: includePreferences + in: query + description: Include preferences information. + required: false + schema: + type: boolean + example: true + - name: includeReviews + in: query + description: Include reviews for the content. + required: false + schema: + type: boolean + example: true + - name: includeChapters + in: query + description: Include chapter details. + required: false + schema: + type: boolean + example: true + - name: includeStations + in: query + description: Include station data. + required: false + schema: + type: boolean + example: true + - name: includeExternalMedia + in: query + description: Include external media data. + required: false + schema: + type: boolean + example: true + - name: asyncAugmentMetadata + in: query + description: Trigger asynchronous metadata augmentation. + required: false + schema: + type: boolean + example: true + - name: asyncCheckFiles + in: query + description: Trigger asynchronous file checking. + required: false + schema: + type: boolean + example: true + - name: asyncRefreshAnalysis + in: query + description: Trigger asynchronous refresh of analysis. + required: false + schema: + type: boolean + example: true + - name: asyncRefreshLocalMediaAgent + in: query + description: Trigger asynchronous refresh of the local media agent. + required: false + schema: + type: boolean + example: true + responses: + '200': + description: The metadata of the library item. + content: + application/json: + schema: + type: object + properties: + MediaContainer: + allOf: + - type: object + required: + - size + properties: + size: + description: Number of media items returned in this response. + type: integer + format: int32 + example: 50 + - type: object + required: + - allowSync + properties: + allowSync: + type: boolean + description: Indicates whether syncing is allowed. + example: false + - type: object + required: + - identifier + properties: + identifier: + type: string + description: An plugin identifier for the media container. + example: com.plexapp.plugins.library + - type: object + required: + - librarySectionID + properties: + librarySectionID: + type: integer + description: The unique identifier for the library section. + example: 2 + - type: object + required: + - librarySectionTitle + properties: + librarySectionTitle: + type: string + description: The title of the library section. + example: TV Series + - type: object + required: + - librarySectionTitle + properties: + librarySectionUUID: + type: string + description: The universally unique identifier for the library section. + example: e69655a2-ef48-4aba-bb19-0cc34d1e7d36 + - type: object + required: + - mediaTagPrefix + properties: + mediaTagPrefix: + type: string + description: The prefix used for media tag resource paths. + example: /system/bundle/media/flags/ + - type: object + required: + - mediaTagVersion + properties: + mediaTagVersion: + type: integer + description: The version number for media tags. + example: 1734362201 + - type: object + required: + - Metadata + properties: + Metadata: + type: array + description: An array of metadata items. + items: + type: object + required: + - ratingKey + - key + - guid + - type + - title + - librarySectionTitle + - librarySectionID + - librarySectionKey + - summary + - year + - thumb + - art + - duration + - addedAt + - updatedAt + - Image + - UltraBlurColors + properties: + ratingKey: + type: string + description: The rating key of the metadata item. + example: '44288' + parentRatingKey: + type: string + description: The rating key of the parent of this metadata item. + example: '48047' + grandparentRatingKey: + type: string + description: The rating key of the grandparent of this metadata item. + example: '45520' + parentGuid: + type: string + description: 'A GUID identifying the parent entity (e.g., season) for the item.' + example: 'plex://season/618b89208dde18df707ad15c' + grandparentGuid: + type: string + description: 'A GUID identifying the grandparent entity (e.g., show).' + example: 'plex://show/5e16253691c20300412003a8' + grandparentSlug: + type: string + description: A URL-friendly identifier (slug) for the grandparent entity. + example: alice-in-borderland-2020 + grandparentKey: + type: string + description: A key identifying the grandparent metadata in the library. + example: /library/metadata/45520 + parentKey: + type: string + description: A key identifying the parent metadata in the library. + example: /library/metadata/48047 + key: + type: string + description: The API key to access metadata details. + example: /library/metadata/44288/children + guid: + type: string + description: The globally unique identifier for the item. + example: 'plex://show/5d9c08254eefaa001f5d6dcb' + slug: + type: string + description: A URL-friendly identifier for the item. + example: better-call-saul + studio: + type: string + description: The studio that produced the content. + example: Sony Pictures Television + type: + type: string + description: 'The type of content (e.g., show, movie).' + example: show + title: + type: string + description: The title of the content. + example: Better Call Saul + originalTitle: + type: string + description: The original title of the content. + example: 'Wicked: Part I' + librarySectionTitle: + type: string + description: The title of the library section. + example: 'TV Series ' + librarySectionID: + type: integer + description: The ID of the library section. + example: 2 + librarySectionKey: + type: string + description: The key of the library section. + example: /library/sections/2 + contentRating: + type: string + description: 'The content rating (e.g., TV-MA).' + example: TV-MA + summary: + type: string + description: A summary of the content. + example: 'Before Saul Goodman, he was Jimmy McGill. And if you''re calling Jimmy, you''re in real trouble. The prequel to "Breaking Bad" follows small-time attorney, Jimmy McGill, as he transforms into Walter White''s morally challenged lawyer, Saul Goodman.' + index: + type: integer + description: The index or order of the item. + example: 1 + grandparentTitle: + type: string + description: The title of the grandparent entity (typically the show's title). + example: Alice in Borderland + parentTitle: + type: string + description: The title of the parent entity (typically the season's title). + example: Season 2 + audienceRating: + type: number + format: float + description: The audience rating for the content. + example: 8.7 + viewCount: + type: integer + description: The number of times the item has been viewed. + example: 4 + skipCount: + type: integer + description: The number of times the item has been skipped. + example: 1 + lastViewedAt: + type: integer + description: Unix timestamp of when the item was last viewed. + example: 1625764795 + year: + type: integer + description: The release year. + format: int32 + example: 2015 + rating: + type: number + format: float + description: The general rating + example: 6 + ratingImage: + type: string + description: 'The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).' + example: 'rottentomatoes://image.rating.ripe' + tagline: + type: string + description: The tagline of the content. + example: Make the call + chapterSource: + type: string + example: media + primaryExtraKey: + type: string + example: /library/metadata/134704 + thumb: + type: string + description: URL of the thumbnail image. + example: /library/metadata/44288/thumb/1736487993 + art: + type: string + description: URL of the art image. + example: /library/metadata/44288/art/1736487993 + theme: + type: string + description: URL of the theme image. + example: /library/metadata/44288/theme/1736487993 + duration: + type: integer + description: Duration of the content in milliseconds. + example: 2700000 + format: int32 + originallyAvailableAt: + type: string + format: date + description: The original release date. + example: '2015-02-08' + leafCount: + type: integer + description: The total number of episodes (or leaves). + example: 63 + viewedLeafCount: + type: integer + description: The number of episodes that have been viewed. + example: 4 + childCount: + type: integer + description: The number of child items. + format: int32 + example: 6 + addedAt: + allOf: + - description: Unix timestamp when the item was added. + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + updatedAt: + allOf: + - description: Unix timestamp when the item was last updated. + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + audienceRatingImage: + type: string + description: The URL for the audience rating image. + example: 'themoviedb://image.rating' + parentIndex: + type: integer + description: 'The index number of the parent entity, which could indicate its order or position.' + example: 2 + parentThumb: + type: string + description: The URL of the parent's thumbnail image. + example: /library/metadata/48047/thumb/1671800243 + grandparentThumb: + type: string + description: The URL of the grandparent's thumbnail image. + example: /library/metadata/45520/thumb/1736488003 + grandparentArt: + type: string + description: The URL of the grandparent's art image. + example: /library/metadata/45520/art/1736488003 + Media: + allOf: + - type: array + description: An array of media file data items. + items: + type: object + required: + - id + - hasVoiceActivity + - Part + properties: + id: + type: integer + description: Unique media identifier. + example: 387322 + duration: + type: integer + format: int32 + description: Duration of the media in milliseconds. + example: 9610350 + bitrate: + type: integer + format: int32 + description: Bitrate in bits per second. + example: 25512 + width: + type: integer + description: Video width in pixels. + example: 3840 + format: int32 + height: + type: integer + description: Video height in pixels. + example: 1602 + format: int32 + aspectRatio: + type: number + format: float + description: Aspect ratio of the video. + example: 2.35 + audioChannels: + type: integer + description: Number of audio channels. + example: 6 + format: int32 + displayOffset: + type: integer + format: int32 + example: 50 + audioCodec: + type: string + description: Audio codec used. + example: eac3 + videoCodec: + type: string + description: Video codec used. + example: hevc + videoResolution: + type: string + description: 'Video resolution (e.g., 4k).' + example: 4k + container: + type: string + description: File container type. + example: mkv + videoFrameRate: + type: string + description: | + Frame rate of the video. Values found include NTSC, PAL, 24p + example: 24p + videoProfile: + type: string + description: 'Video profile (e.g., main 10).' + example: main 10 + hasVoiceActivity: + type: boolean + description: Indicates whether voice activity is detected. + example: false + audioProfile: + type: string + description: 'The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).' + example: dts + optimizedForStreaming: + description: 'Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true' + oneOf: + - type: integer + format: int32 + enum: + - 0 + - 1 + - type: boolean + enum: + - true + - false + has64bitOffsets: + type: boolean + example: false + Part: + type: array + description: An array of parts for this media item. + items: + type: object + required: + - id + - key + - file + - size + properties: + accessible: + type: boolean + description: Indicates if the part is accessible. + example: true + exists: + type: boolean + description: Indicates if the part exists. + example: true + id: + type: integer + description: Unique part identifier. + example: 418385 + key: + type: string + description: Key to access this part. + example: /library/parts/418385/1735864239/file.mkv + indexes: + type: string + example: sd + duration: + type: integer + format: int32 + description: Duration of the part in milliseconds. + example: 9610350 + file: + type: string + description: File path for the part. + example: /mnt/Movies_1/W/Wicked (2024).mkv + size: + description: File size in bytes. + type: integer + example: 30649952104 + packetLength: + type: integer + format: int32 + example: 188 + container: + type: string + description: Container format of the part. + example: mkv + videoProfile: + type: string + description: Video profile for the part. + example: main 10 + audioProfile: + type: string + description: 'The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).' + example: dts + has64bitOffsets: + type: boolean + example: false + optimizedForStreaming: + description: 'Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true' + oneOf: + - type: integer + format: int32 + enum: + - 0 + - 1 + - type: boolean + enum: + - true + - false + hasThumbnail: + allOf: + - description: Indicates if the part has a thumbnail. + - type: string + enum: + - '0' + - '1' + example: '1' + default: '0' + x-speakeasy-enums: + - false + - true + Stream: + type: array + description: An array of streams for this part. + items: + type: object + required: + - id + - streamType + - codec + - index + - language + - languageTag + - languageCode + - displayTitle + - extendedDisplayTitle + properties: + id: + type: integer + description: Unique stream identifier. + example: 1002625 + streamType: + type: integer + format: int32 + description: 'Stream type (1=video, 2=audio, 3=subtitle).' + example: 1 + default: + type: boolean + description: Indicates if this stream is default. + example: true + codec: + type: string + description: Codec used by the stream. + example: hevc + index: + type: integer + format: int32 + description: Index of the stream. + example: 0 + bitrate: + type: integer + format: int32 + description: Bitrate of the stream. + example: 24743 + language: + type: string + description: Language of the stream. + example: English + languageTag: + type: string + description: 'Language tag (e.g., en).' + example: en + languageCode: + type: string + description: ISO language code. + example: eng + headerCompression: + type: boolean + description: Indicates whether header compression is enabled. + example: true + DOVIBLCompatID: + type: integer + format: int32 + description: Dolby Vision BL compatibility ID. + example: 1 + DOVIBLPresent: + type: boolean + description: Indicates if Dolby Vision BL is present. + example: true + DOVIELPresent: + type: boolean + description: Indicates if Dolby Vision EL is present. + example: false + DOVILevel: + type: integer + format: int32 + description: Dolby Vision level. + example: 6 + DOVIPresent: + type: boolean + description: Indicates if Dolby Vision is present. + example: true + DOVIProfile: + type: integer + format: int32 + description: Dolby Vision profile. + example: 8 + DOVIRPUPresent: + type: boolean + description: Indicates if Dolby Vision RPU is present. + example: true + DOVIVersion: + type: string + description: Dolby Vision version. + example: '1.0' + bitDepth: + type: integer + format: int32 + description: Bit depth of the video stream. + example: 10 + chromaLocation: + type: string + description: Chroma sample location. + example: topleft + chromaSubsampling: + type: string + description: Chroma subsampling format. + example: '4:2:0' + codedHeight: + type: integer + format: int32 + description: Coded video height. + example: 1608 + codedWidth: + type: integer + format: int32 + description: Coded video width. + example: 3840 + colorPrimaries: + type: string + description: Color primaries used. + example: bt2020 + colorRange: + type: string + description: 'Color range (e.g., tv).' + example: tv + colorSpace: + type: string + description: Color space. + example: bt2020nc + colorTrc: + type: string + description: Color transfer characteristics. + example: smpte2084 + frameRate: + type: number + format: float + description: Frame rate of the stream. + example: 23.976 + height: + type: integer + format: int32 + description: Height of the video stream. + example: 1602 + level: + type: integer + format: int32 + description: Video level. + example: 150 + original: + type: boolean + description: Indicates if this is the original stream. + example: true + hasScalingMatrix: + type: boolean + example: false + profile: + type: string + description: Video profile. + example: main 10 + scanType: + type: string + example: progressive + refFrames: + type: integer + format: int32 + description: Number of reference frames. + example: 1 + width: + type: integer + format: int32 + description: Width of the video stream. + example: 3840 + displayTitle: + type: string + description: Display title for the stream. + example: 4K DoVi/HDR10 (HEVC Main 10) + extendedDisplayTitle: + type: string + description: Extended display title for the stream. + example: 4K DoVi/HDR10 (HEVC Main 10) + selected: + type: boolean + description: Indicates if this stream is selected (applicable for audio streams). + example: true + forced: + type: boolean + example: true + channels: + type: integer + format: int32 + description: Number of audio channels (for audio streams). + example: 6 + audioChannelLayout: + type: string + description: Audio channel layout. + example: 5.1(side) + samplingRate: + type: integer + format: int32 + description: Sampling rate for the audio stream. + example: 48000 + canAutoSync: + type: boolean + description: Indicates if the stream can auto-sync. + example: false + hearingImpaired: + type: boolean + description: Indicates if the stream is for the hearing impaired. + example: true + dub: + type: boolean + description: Indicates if the stream is a dub. + example: true + title: + type: string + description: 'Optional title for the stream (e.g., language variant).' + example: SDH + Image: + type: array + description: An array of image objects. + items: + type: object + required: + - alt + - type + - url + properties: + alt: + type: string + description: Alternate text for the image. + example: Better Call Saul + type: + type: string + description: 'The type of image (e.g., coverPoster, background, clearLogo).' + example: coverPoster + url: + type: string + description: The URL of the image. + example: /library/metadata/44288/thumb/1736487993 + UltraBlurColors: + type: object + required: + - topLeft + - topRight + - bottomRight + - bottomLeft + properties: + topLeft: + type: string + description: The top-left color value. + example: 11333a + topRight: + type: string + description: The top-right color value. + example: 1d2721 + bottomRight: + type: string + description: The bottom-right color value. + example: 5c451d + bottomLeft: + type: string + description: The bottom-left color value. + example: 372c10 + Genre: + type: array + description: An array of genre tags. + items: + type: object + required: + - id + - filter + - tag + properties: + id: + type: integer + description: The unique genre identifier. + example: 1057 + filter: + type: string + description: The filter string for the genre. + example: genre=1057 + tag: + type: string + description: The genre name. + example: Crime + Country: + type: array + description: An array of country tags. + items: + type: object + required: + - id + - filter + - tag + properties: + id: + type: integer + description: The unique country identifier. + format: int32 + example: 58591 + filter: + type: string + description: The filter string for the country. + example: country=58591 + tag: + type: string + description: The country name. + example: United States of America + Guid: + x-speakeasy-name-override: Guids + type: array + description: An array of GUID objects. + items: + type: object + required: + - id + properties: + id: + type: string + description: The GUID value. + example: 'imdb://tt3032476' + Rating: + x-speakeasy-name-override: Ratings + type: array + description: An array of rating objects. + items: + type: object + required: + - image + - value + - type + properties: + image: + type: string + description: The image or reference for the rating. + example: 'imdb://image.rating' + value: + type: number + format: float + description: The rating value. + example: 9 + type: + type: string + description: 'The type of rating (e.g., audience, critic).' + example: audience + Role: + type: array + description: An array of Actor roles. + items: + type: object + required: + - id + - filter + - tag + - tagKey + properties: + id: + type: integer + description: The unique role identifier. + example: 109501 + filter: + type: string + description: The filter string for the role. + example: actor=109501 + tag: + type: string + description: The actor's name. + example: Bob Odenkirk + tagKey: + type: string + description: A key associated with the actor tag. + example: 5d77683254f42c001f8c3f69 + role: + type: string + description: The character name or role. + example: Jimmy McGill + thumb: + type: string + description: URL for the role thumbnail image. + example: 'https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg' + Director: + type: array + description: An array of Director roles. + items: + type: object + required: + - id + - filter + - tag + - tagKey + properties: + id: + type: integer + description: The unique role identifier. + example: 109501 + filter: + type: string + description: The filter string for the role. + example: actor=109501 + tag: + type: string + description: The actor's name. + example: Bob Odenkirk + tagKey: + type: string + description: A key associated with the actor tag. + example: 5d77683254f42c001f8c3f69 + role: + type: string + description: The character name or role. + example: Jimmy McGill + thumb: + type: string + description: URL for the role thumbnail image. + example: 'https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg' + Writer: + type: array + description: An array of Writer roles. + items: + type: object + required: + - id + - filter + - tag + - tagKey + properties: + id: + type: integer + description: The unique role identifier. + example: 109501 + filter: + type: string + description: The filter string for the role. + example: actor=109501 + tag: + type: string + description: The actor's name. + example: Bob Odenkirk + tagKey: + type: string + description: A key associated with the actor tag. + example: 5d77683254f42c001f8c3f69 + role: + type: string + description: The character name or role. + example: Jimmy McGill + thumb: + type: string + description: URL for the role thumbnail image. + example: 'https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg' + Producer: + type: array + description: An array of Writer roles. + items: + type: object + required: + - id + - filter + - tag + - tagKey + properties: + id: + type: integer + description: The unique role identifier. + example: 109501 + filter: + type: string + description: The filter string for the role. + example: actor=109501 + tag: + type: string + description: The actor's name. + example: Bob Odenkirk + tagKey: + type: string + description: A key associated with the actor tag. + example: 5d77683254f42c001f8c3f69 + role: + type: string + description: The character name or role. + example: Jimmy McGill + thumb: + type: string + description: URL for the role thumbnail image. + example: 'https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg' + Similar: + type: array + description: An array of similar content objects. + items: + type: object + required: + - id + - filter + - tag + properties: + id: + type: integer + description: The unique similar item identifier. + example: 26 + filter: + type: string + description: The filter string for similar items. + example: similar=26 + tag: + type: string + description: The tag or title of the similar content. + example: Breaking Bad + Location: + type: array + description: An array of location objects. + items: + type: object + required: + - path + properties: + path: + type: string + description: The file path for the location. + example: /TV Shows/Better Call Saul + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + '404': + description: Not Found - Returned if the resource could not be found + content: + text/html: + example: | + + + + Not Found + + +

404 Not Found

+ + + x-codeSamples: + - lang: php + label: data + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetMediaMetaDataRequest( + ratingKey: 9518, + includeConcerts: true, + includeExtras: true, + includeOnDeck: true, + includePopularLeaves: true, + includePreferences: true, + includeReviews: true, + includeChapters: true, + includeStations: true, + includeExternalMedia: true, + asyncAugmentMetadata: true, + asyncCheckFiles: true, + asyncRefreshAnalysis: true, + asyncRefreshLocalMediaAgent: true, + ); + + $response = $sdk->library->getMediaMetaData( + request: $request + ); + + if ($response->object !== null) { + // handle response + } + - lang: ruby + label: data + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetMediaMetaDataRequest.new(\n rating_key: 9518,\n include_concerts: true,\n include_extras: true,\n include_on_deck: true,\n include_popular_leaves: true,\n include_preferences: true,\n include_reviews: true,\n include_chapters: true,\n include_stations: true,\n include_external_media: true,\n async_augment_metadata: true,\n async_check_files: true,\n async_refresh_analysis: true,\n async_refresh_local_media_agent: true,\n)\n \nres = s.library.get_media_meta_data(req)\n\nif ! res.object.nil?\n # handle response\nend" + - lang: go + label: data + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetMediaMetaData(ctx, operations.GetMediaMetaDataRequest{\n RatingKey: 9518,\n IncludeConcerts: plexgo.Bool(true),\n IncludeExtras: plexgo.Bool(true),\n IncludeOnDeck: plexgo.Bool(true),\n IncludePopularLeaves: plexgo.Bool(true),\n IncludePreferences: plexgo.Bool(true),\n IncludeReviews: plexgo.Bool(true),\n IncludeChapters: plexgo.Bool(true),\n IncludeStations: plexgo.Bool(true),\n IncludeExternalMedia: plexgo.Bool(true),\n AsyncAugmentMetadata: plexgo.Bool(true),\n AsyncCheckFiles: plexgo.Bool(true),\n AsyncRefreshAnalysis: plexgo.Bool(true),\n AsyncRefreshLocalMediaAgent: plexgo.Bool(true),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" + - lang: java + label: data + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetMediaMetaDataBadRequest; + import dev.plexapi.plexapi.models.errors.GetMediaMetaDataUnauthorized; + import dev.plexapi.plexapi.models.operations.GetMediaMetaDataRequest; + import dev.plexapi.plexapi.models.operations.GetMediaMetaDataResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetMediaMetaDataBadRequest, GetMediaMetaDataUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetMediaMetaDataRequest req = GetMediaMetaDataRequest.builder() + .ratingKey(9518L) + .includeConcerts(true) + .includeExtras(true) + .includeOnDeck(true) + .includePopularLeaves(true) + .includePreferences(true) + .includeReviews(true) + .includeChapters(true) + .includeStations(true) + .includeExternalMedia(true) + .asyncAugmentMetadata(true) + .asyncCheckFiles(true) + .asyncRefreshAnalysis(true) + .asyncRefreshLocalMediaAgent(true) + .build(); + + GetMediaMetaDataResponse res = sdk.library().getMediaMetaData() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: data + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getMediaMetaData({ + ratingKey: 9518, + includeConcerts: true, + includeExtras: true, + includeOnDeck: true, + includePopularLeaves: true, + includePreferences: true, + includeReviews: true, + includeChapters: true, + includeStations: true, + includeExternalMedia: true, + asyncAugmentMetadata: true, + asyncCheckFiles: true, + asyncRefreshAnalysis: true, + asyncRefreshLocalMediaAgent: true, + }); + + // Handle the result + console.log(result); + } + + run(); '/library/metadata/{ratingKey}/banner': get: tags: @@ -10824,12 +14431,12 @@ paths: type: integer example: 1 - name: X-Plex-Token - in: query - description: Plex Authentication Token + in: header + description: 'An authentication token, obtained from plex.tv' + required: true schema: type: string example: CV5xoxjTpFKUzBTShsaf - required: true responses: '200': description: Successful response returning an image @@ -10952,79 +14559,36 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetBannerImageRequest( + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: 'CV5xoxjTpFKUzBTShsaf', ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->media->getBannerImage( + request: $request + ); - try { - $request = new Operations\GetBannerImageRequest( - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: 'CV5xoxjTpFKUzBTShsaf', - ); - $response = $sdk->media->getBannerImage($request); - - if ($response->bytes !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->bytes !== null) { + // handle response } - lang: ruby label: image - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetBannerImageRequest.new(\n rating_key: 9518,\n width: 396,\n height: 396,\n min_size: 1,\n upscale: 1,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.media.get_banner_image(req)\n\nif ! res.bytes.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetBannerImageRequest.new(\n rating_key: 9518,\n width: 396,\n height: 396,\n min_size: 1,\n upscale: 1,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.media.get_banner_image(req)\n\nif ! res.bytes.nil?\n # handle response\nend" - lang: go label: image - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Media.GetBannerImage(ctx, operations.GetBannerImageRequest{ - RatingKey: 9518, - Width: 396, - Height: 396, - MinSize: 1, - Upscale: 1, - XPlexToken: "CV5xoxjTpFKUzBTShsaf", - }) - if err != nil { - log.Fatal(err) - } - if res.ResponseStream != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Media.GetBannerImage(ctx, operations.GetBannerImageRequest{\n RatingKey: 9518,\n Width: 396,\n Height: 396,\n MinSize: 1,\n Upscale: 1,\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.ResponseStream != nil {\n // handle response\n }\n}" - lang: java label: image source: |- @@ -11043,11 +14607,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetBannerImageRequest req = GetBannerImageRequest.builder() @@ -11070,7 +14629,28 @@ paths: } - lang: typescript label: image - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.media.getBannerImage({\n ratingKey: 9518,\n width: 396,\n height: 396,\n minSize: 1,\n upscale: 1,\n xPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.media.getBannerImage({ + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", + }); + + // Handle the result + console.log(result); + } + + run(); '/library/metadata/{ratingKey}/thumb': get: tags: @@ -11111,12 +14691,12 @@ paths: type: integer example: 1 - name: X-Plex-Token - in: query - description: Plex Authentication Token + in: header + description: 'An authentication token, obtained from plex.tv' + required: true schema: type: string example: CV5xoxjTpFKUzBTShsaf - required: true responses: '200': description: Successful response returning an image @@ -11239,79 +14819,36 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetThumbImageRequest( + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: 'CV5xoxjTpFKUzBTShsaf', ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->media->getThumbImage( + request: $request + ); - try { - $request = new Operations\GetThumbImageRequest( - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: 'CV5xoxjTpFKUzBTShsaf', - ); - $response = $sdk->media->getThumbImage($request); - - if ($response->bytes !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->bytes !== null) { + // handle response } - lang: ruby label: image - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetThumbImageRequest.new(\n rating_key: 9518,\n width: 396,\n height: 396,\n min_size: 1,\n upscale: 1,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.media.get_thumb_image(req)\n\nif ! res.bytes.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetThumbImageRequest.new(\n rating_key: 9518,\n width: 396,\n height: 396,\n min_size: 1,\n upscale: 1,\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.media.get_thumb_image(req)\n\nif ! res.bytes.nil?\n # handle response\nend" - lang: go label: image - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Media.GetThumbImage(ctx, operations.GetThumbImageRequest{ - RatingKey: 9518, - Width: 396, - Height: 396, - MinSize: 1, - Upscale: 1, - XPlexToken: "CV5xoxjTpFKUzBTShsaf", - }) - if err != nil { - log.Fatal(err) - } - if res.ResponseStream != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Media.GetThumbImage(ctx, operations.GetThumbImageRequest{\n RatingKey: 9518,\n Width: 396,\n Height: 396,\n MinSize: 1,\n Upscale: 1,\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.ResponseStream != nil {\n // handle response\n }\n}" - lang: java label: image source: |- @@ -11330,11 +14867,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetThumbImageRequest req = GetThumbImageRequest.builder() @@ -11357,7 +14889,28 @@ paths: } - lang: typescript label: image - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.media.getThumbImage({\n ratingKey: 9518,\n width: 396,\n height: 396,\n minSize: 1,\n upscale: 1,\n xPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.media.getThumbImage({ + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", + }); + + // Handle the result + console.log(result); + } + + run(); '/library/metadata/{ratingKey}/children': get: tags: @@ -11532,7 +15085,7 @@ paths: example: Reacher summary: type: string - example: 'Based on"Bad Luck and Trouble," when members of Reacher''s old military unit start turning up dead, Reacher has just one thing on his mind—revenge.' + example: 'Based on"Bad Luck and Trouble," when members of Reacher''s old military unit start turning up dead, Reacher has just one thing on his mind-revenge.' index: type: integer format: int32 @@ -11652,63 +15205,30 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->library->getMetadataChildren(1539.15, ''); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->library->getMetadataChildren( + ratingKey: 1539.14, + includeElements: '' + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getMetadataChildren - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata_children(rating_key=1539.15, include_elements=\"\")\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_metadata_children(rating_key=1539.14, include_elements=\"\")\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getMetadataChildren - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetMetadataChildren(ctx, 1539.15, plexgo.String("Stream")) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetMetadataChildren(ctx, 1539.14, plexgo.String(\"Stream\"))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getMetadataChildren source: |- @@ -11726,16 +15246,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(1539.15d) - .includeElements("") + .ratingKey(1539.14d) + .includeElements("Stream") .call(); if (res.object().isPresent()) { @@ -11745,7 +15260,21 @@ paths: } - lang: typescript label: getMetadataChildren - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getMetadataChildren(1539.14, \"Stream\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getMetadataChildren(1539.14, "Stream"); + + // Handle the result + console.log(result); + } + + run(); /library/all/top: get: tags: @@ -11755,10 +15284,18 @@ paths: This endpoint will return the top watched content from libraries of a certain type operationId: getTopWatchedContent parameters: + - name: includeGuids + in: query + description: | + Adds the Guids object to the response + schema: + type: integer + required: false + example: 1 - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season @@ -11771,21 +15308,19 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK required: true - - name: includeGuids - in: query - description: | - Adds the Guids object to the response - schema: - type: integer - required: false - example: 1 responses: '200': description: The metadata of the library item. @@ -12037,65 +15572,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getTopWatchedContent( + type: Operations\GetTopWatchedContentQueryParamType::TvShow, + includeGuids: 1 + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->library->getTopWatchedContent(Operations\GetTopWatchedContentQueryParamType::TvShow, 1); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getTopWatchedContent - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_top_watched_content(type=::PlexRubySDK::Operations::GetTopWatchedContentQueryParamType::TV_SHOW, include_guids=1)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_top_watched_content(type=::PlexRubySDK::Operations::GetTopWatchedContentQueryParamType::TV_SHOW, include_guids=1)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getTopWatchedContent - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, plexgo.Int64(1)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, plexgo.Int64(1))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getTopWatchedContent source: |- @@ -12114,16 +15615,11 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() - .type(GetTopWatchedContentQueryParamType.TvShow) .includeGuids(1L) + .type(GetTopWatchedContentQueryParamType.TvShow) .call(); if (res.object().isPresent()) { @@ -12133,7 +15629,22 @@ paths: } - lang: typescript label: getTopWatchedContent - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { GetTopWatchedContentQueryParamType } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getTopWatchedContent(GetTopWatchedContentQueryParamType.Two, 1);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getTopWatchedContent(GetTopWatchedContentQueryParamType.TvShow, 1); + + // Handle the result + console.log(result); + } + + run(); /library/onDeck: get: tags: @@ -12493,62 +16004,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->library->getOnDeck(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->library->getOnDeck( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getOnDeck - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_on_deck()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.library.get_on_deck()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getOnDeck - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Library.GetOnDeck(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Library.GetOnDeck(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getOnDeck source: |- @@ -12566,11 +16043,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetOnDeckResponse res = sdk.library().getOnDeck() @@ -12583,11 +16055,25 @@ paths: } - lang: typescript label: getOnDeck - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.library.getOnDeck();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.library.getOnDeck(); + + // Handle the result + console.log(result); + } + + run(); /resources: get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' tags: - Plex summary: Get Server Resources @@ -12636,6 +16122,14 @@ paths: x-speakeasy-enums: - DISABLE - ENABLE + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 responses: '200': description: List of Plex Devices. This includes Plex hosted servers and clients @@ -12752,6 +16246,7 @@ paths: properties: protocol: description: 'The protocol used for the connection (http, https, etc)' + example: http type: string enum: - http @@ -12834,65 +16329,33 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->plex->getServerResources( + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + includeHttps: Operations\IncludeHttps::Enable, + includeRelay: Operations\IncludeRelay::Enable, + includeIPv6: Operations\IncludeIPv6::Enable + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->plex->getServerResources(Operations\IncludeHttps::Enable, Operations\IncludeRelay::Enable, Operations\IncludeIPv6::Enable); - - if ($response->plexDevices !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->plexDevices !== null) { + // handle response } - lang: ruby label: resources - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_server_resources(include_https=::PlexRubySDK::Operations::IncludeHttps::ENABLE, include_relay=::PlexRubySDK::Operations::IncludeRelay::ENABLE, include_i_pv6=::PlexRubySDK::Operations::IncludeIPv6::ENABLE)\n\nif ! res.plex_devices.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.plex.get_server_resources(client_id=\"3381b62b-9ab7-4e37-827b-203e9809eb58\", include_https=::PlexRubySDK::Operations::IncludeHttps::ENABLE, include_relay=::PlexRubySDK::Operations::IncludeRelay::ENABLE, include_i_pv6=::PlexRubySDK::Operations::IncludeIPv6::ENABLE)\n\nif ! res.plex_devices.nil?\n # handle response\nend" - lang: go label: resources - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer()) - if err != nil { - log.Fatal(err) - } - if res.PlexDevices != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Plex.GetServerResources(ctx, \"3381b62b-9ab7-4e37-827b-203e9809eb58\", nil, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.PlexDevices != nil {\n // handle response\n }\n}" - lang: java label: resources source: |- @@ -12913,17 +16376,13 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerResourcesResponse res = sdk.plex().getServerResources() .includeHttps(IncludeHttps.Enable) .includeRelay(IncludeRelay.Enable) .includeIPv6(IncludeIPv6.Enable) + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .call(); if (res.plexDevices().isPresent()) { @@ -12933,7 +16392,21 @@ paths: } - lang: typescript label: resources - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { IncludeHttps, IncludeIPv6, IncludeRelay } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getServerResources(\"gcgzw5rz2xovp84b4vha3a40\", IncludeHttps.One, IncludeRelay.One, IncludeIPv6.One);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58"); + + // Handle the result + console.log(result); + } + + run(); /log: get: tags: @@ -13031,65 +16504,32 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->log->logLine( + level: Operations\Level::Three, + message: 'Test log message', + source: 'Postman' + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->log->logLine(Operations\Level::Three, 'Test log message', 'Postman'); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: logLine - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.log.log_line(level=::PlexRubySDK::Operations::Level::THREE, message=\"Test log message\", source=\"Postman\")\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.log.log_line(level=::PlexRubySDK::Operations::Level::THREE, message=\"Test log message\", source=\"Postman\")\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: logLine - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Log.LogLine(ctx, operations.LevelThree, "Test log message", "Postman") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Log.LogLine(ctx, operations.LevelThree, \"Test log message\", \"Postman\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: logLine source: |- @@ -13108,11 +16548,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); LogLineResponse res = sdk.log().logLine() @@ -13126,7 +16561,22 @@ paths: } - lang: typescript label: logLine - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Level } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.log.logLine(Level.Three, \"Test log message\", \"Postman\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Level } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); + + // Handle the result + console.log(result); + } + + run(); post: tags: - Log @@ -13205,67 +16655,30 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $request = 'level=4&message=Test%20message%201&source=postman - level=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman'; - $response = $sdk->log->logMultiLine($request); + $request = 'level=4&message=Test%20message%201&source=postman\n' . + 'level=3&message=Test%20message%202&source=postman\n' . + 'level=1&message=Test%20message%203&source=postman'; - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->log->logMultiLine( + request: $request + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: logMultiLine - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = \"level=4&message=Test%20message%201&source=postman\\n\" +\n\"level=3&message=Test%20message%202&source=postman\\n\" +\n\"level=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" - lang: go label: logMultiLine - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Log.LogMultiLine(ctx, "level=4&message=Test%20message%201&source=postman\n" + - "level=3&message=Test%20message%202&source=postman\n" + - "level=1&message=Test%20message%203&source=postman") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Log.LogMultiLine(ctx, \"level=4&message=Test%20message%201&source=postman\\n\" +\n \"level=3&message=Test%20message%202&source=postman\\n\" +\n \"level=1&message=Test%20message%203&source=postman\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: logMultiLine source: |- @@ -13284,15 +16697,9 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); - String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman"; + String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman"; LogMultiLineResponse res = sdk.log().logMultiLine() .request(req) @@ -13303,7 +16710,23 @@ paths: } - lang: typescript label: logMultiLine - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.log.logMultiLine(\"level=4&message=Test%20message%201&source=postman\\n\" +\n \"level=3&message=Test%20message%202&source=postman\\n\" +\n \"level=1&message=Test%20message%203&source=postman\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman\n" + + "level=3&message=Test%20message%202&source=postman\n" + + "level=1&message=Test%20message%203&source=postman"); + + // Handle the result + console.log(result); + } + + run(); /log/networked: get: tags: @@ -13376,62 +16799,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->log->enablePaperTrail(); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->log->enablePaperTrail( + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: enablePaperTrail - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: enablePaperTrail - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Log.EnablePaperTrail(ctx) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Log.EnablePaperTrail(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: enablePaperTrail source: |- @@ -13449,11 +16838,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); EnablePaperTrailResponse res = sdk.log().enablePaperTrail() @@ -13464,7 +16848,21 @@ paths: } - lang: typescript label: enablePaperTrail - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.log.enablePaperTrail();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.log.enablePaperTrail(); + + // Handle the result + console.log(result); + } + + run(); /myplex/account: get: tags: @@ -13576,62 +16974,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getMyPlexAccount(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getMyPlexAccount( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getMyPlexAccount - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_my_plex_account()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_my_plex_account()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getMyPlexAccount - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetMyPlexAccount(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetMyPlexAccount(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getMyPlexAccount source: |- @@ -13649,11 +17013,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() @@ -13666,7 +17025,21 @@ paths: } - lang: typescript label: getMyPlexAccount - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getMyPlexAccount();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getMyPlexAccount(); + + // Handle the result + console.log(result); + } + + run(); '/photo/:/transcode': get: tags: @@ -13796,81 +17169,37 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\GetResizedPhotoRequest( + width: 110, + height: 165, + opacity: 100, + blur: 20, + minSize: Operations\MinSize::Zero, + upscale: Operations\Upscale::One, + url: '/library/metadata/49564/thumb/1654258204', ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->server->getResizedPhoto( + request: $request + ); - try { - $request = new Operations\GetResizedPhotoRequest( - width: 110, - height: 165, - opacity: 643869, - blur: 4000, - minSize: Operations\MinSize::One, - upscale: Operations\Upscale::Zero, - url: '/library/metadata/49564/thumb/1654258204', - ); - $response = $sdk->server->getResizedPhoto($request); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: getResizedPhoto - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetResizedPhotoRequest.new(\n width: 110.0,\n height: 165.0,\n opacity: 643869,\n blur: 4000.0,\n min_size: ::PlexRubySDK::Operations::MinSize::ONE,\n upscale: ::PlexRubySDK::Operations::Upscale::ZERO,\n url: \"/library/metadata/49564/thumb/1654258204\",\n)\n \nres = s.server.get_resized_photo(req)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::GetResizedPhotoRequest.new(\n width: 110.0,\n height: 165.0,\n opacity: 643869,\n blur: 0.0,\n min_size: ::PlexRubySDK::Operations::MinSize::ONE,\n upscale: ::PlexRubySDK::Operations::Upscale::ONE,\n url: \"/library/metadata/49564/thumb/1654258204\",\n)\n \nres = s.server.get_resized_photo(req)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: getResizedPhoto - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{ - Width: 110, - Height: 165, - Opacity: 100, - Blur: 0, - MinSize: operations.MinSizeOne, - Upscale: operations.UpscaleOne, - URL: "/library/metadata/49564/thumb/1654258204", - }) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{\n Width: 110,\n Height: 165,\n Opacity: 100,\n Blur: 0,\n MinSize: operations.MinSizeOne,\n Upscale: operations.UpscaleOne,\n URL: \"/library/metadata/49564/thumb/1654258204\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: getResizedPhoto source: |- @@ -13891,11 +17220,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() @@ -13917,11 +17241,34 @@ paths: } - lang: typescript label: getResizedPhoto - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { MinSize, Upscale } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getResizedPhoto({\n width: 110,\n height: 165,\n opacity: 100,\n blur: 20,\n minSize: MinSize.One,\n upscale: Upscale.One,\n url: \"/library/metadata/49564/thumb/1654258204\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getResizedPhoto({ + width: 110, + height: 165, + opacity: 100, + blur: 0, + minSize: MinSize.One, + upscale: Upscale.One, + url: "/library/metadata/49564/thumb/1654258204", + }); + + // Handle the result + console.log(result); + } + + run(); /pins: post: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' tags: - Plex summary: Get a Pin @@ -13939,34 +17286,46 @@ paths: type: boolean default: false required: false + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 - name: X-Plex-Product x-speakeasy-name-override: ClientName - in: query + description: 'The name of the client application. (Plex Web, Plex Media Server, etc.)' + in: header required: false schema: type: string - example: Plex Web + example: Plex for Roku - name: X-Plex-Device - x-speakeasy-name-override: DeviceName - in: query + x-speakeasy-name-override: DeviceNickname + description: A relatively friendly name for the client device + in: header required: false schema: type: string - example: Linux + example: Roku 3 - name: X-Plex-Version x-speakeasy-name-override: ClientVersion - in: query + description: The version of the client application. + in: header required: false schema: type: string - example: 4.133.0 + example: 2.4.1 - name: X-Plex-Platform - x-speakeasy-name-override: ClientPlatform - in: query + x-speakeasy-name-override: Platform + description: The platform of the client application. + in: header required: false schema: type: string - example: Chrome + example: Roku responses: '201': description: Requests a new pin id used in the authentication flow @@ -14187,57 +17546,29 @@ paths: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->build(); + $sdk = Plex_API\PlexAPI::builder()->build(); - try { - $request = new Operations\GetPinRequest(); - $response = $sdk->plex->getPin($request); + $request = new Operations\GetPinRequest( + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + clientName: 'Plex for Roku', + deviceNickname: 'Roku 3', + clientVersion: '2.4.1', + platform: 'Roku', + ); - if ($response->authPinContainer !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->plex->getPin( + request: $request + ); + + if ($response->authPinContainer !== null) { + // handle response } - lang: ruby label: getPin - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\n\n\nreq = ::PlexRubySDK::Operations::GetPinRequest.new()\n \nres = s.plex.get_pin(req)\n\nif ! res.auth_pin_container.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n\nreq = ::PlexRubySDK::Operations::GetPinRequest.new(\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n client_name: \"Plex for Roku\",\n device_nickname: \"Roku 3\",\n client_version: \"2.4.1\",\n platform: \"Roku\",\n)\n \nres = s.plex.get_pin(req)\n\nif ! res.auth_pin_container.nil?\n # handle response\nend" - lang: go label: getPin - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{}) - if err != nil { - log.Fatal(err) - } - if res.AuthPinContainer != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.AuthPinContainer != nil {\n // handle response\n }\n}" - lang: java label: getPin source: |- @@ -14254,14 +17585,14 @@ paths: public static void main(String[] args) throws GetPinBadRequest, Exception { PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetPinRequest req = GetPinRequest.builder() + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + .clientName("Plex for Roku") + .deviceNickname("Roku 3") + .clientVersion("2.4.1") + .platform("Roku") .build(); GetPinResponse res = sdk.plex().getPin() @@ -14275,11 +17606,29 @@ paths: } - lang: typescript label: getPin - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getPin(\"gcgzw5rz2xovp84b4vha3a40\", \"Plex Web\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.plex.getPin({ + clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", + clientName: "Plex for Roku", + deviceNickname: "Roku 3", + clientVersion: "2.4.1", + platform: "Roku", + }); + + // Handle the result + console.log(result); + } + + run(); '/pins/{pinID}': get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' security: [] tags: - Plex @@ -14293,6 +17642,46 @@ paths: required: true schema: type: integer + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 + - name: X-Plex-Product + x-speakeasy-name-override: ClientName + description: 'The name of the client application. (Plex Web, Plex Media Server, etc.)' + in: header + required: false + schema: + type: string + example: Plex for Roku + - name: X-Plex-Device + x-speakeasy-name-override: DeviceNickname + description: A relatively friendly name for the client device + in: header + required: false + schema: + type: string + example: Roku 3 + - name: X-Plex-Version + x-speakeasy-name-override: ClientVersion + description: The version of the client application. + in: header + required: false + schema: + type: string + example: 2.4.1 + - name: X-Plex-Platform + x-speakeasy-name-override: Platform + description: The platform of the client application. + in: header + required: false + schema: + type: string + example: Roku responses: '200': description: The Pin with a non-null authToken when it has been verified by the user @@ -14533,57 +17922,32 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->build(); + $sdk = Plex_API\PlexAPI::builder()->build(); - try { + $request = new Operations\GetTokenByPinIdRequest( + pinID: 408895, + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + clientName: 'Plex for Roku', + deviceNickname: 'Roku 3', + clientVersion: '2.4.1', + platform: 'Roku', + ); - $response = $sdk->plex->getTokenByPinId(408895); + $response = $sdk->plex->getTokenByPinId( + request: $request + ); - if ($response->authPinContainer !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->authPinContainer !== null) { + // handle response } - lang: ruby label: getTokenByPinId - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\n\n \nres = s.plex.get_token_by_pin_id(pin_id=408895)\n\nif ! res.auth_pin_container.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n\nreq = ::PlexRubySDK::Operations::GetTokenByPinIdRequest.new(\n pin_id: 408895,\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n client_name: \"Plex for Roku\",\n device_nickname: \"Roku 3\",\n client_version: \"2.4.1\",\n platform: \"Roku\",\n)\n \nres = s.plex.get_token_by_pin_id(req)\n\nif ! res.auth_pin_container.nil?\n # handle response\nend" - lang: go label: getTokenByPinId - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetTokenByPinID(ctx, 408895) - if err != nil { - log.Fatal(err) - } - if res.AuthPinContainer != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Plex.GetTokenByPinID(ctx, operations.GetTokenByPinIDRequest{\n PinID: 408895,\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.AuthPinContainer != nil {\n // handle response\n }\n}" - lang: java label: getTokenByPinId source: |- @@ -14592,6 +17956,7 @@ paths: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.GetTokenByPinIdBadRequest; import dev.plexapi.plexapi.models.errors.GetTokenByPinIdResponseBody; + import dev.plexapi.plexapi.models.operations.GetTokenByPinIdRequest; import dev.plexapi.plexapi.models.operations.GetTokenByPinIdResponse; import java.lang.Exception; @@ -14600,15 +17965,19 @@ paths: public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception { PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); - GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() + GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder() .pinID(408895L) + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + .clientName("Plex for Roku") + .deviceNickname("Roku 3") + .clientVersion("2.4.1") + .platform("Roku") + .build(); + + GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() + .request(req) .call(); if (res.authPinContainer().isPresent()) { @@ -14618,7 +17987,26 @@ paths: } - lang: typescript label: getTokenByPinId - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getTokenByPinId(408895, \"gcgzw5rz2xovp84b4vha3a40\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.plex.getTokenByPinId({ + pinID: 408895, + clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", + clientName: "Plex for Roku", + deviceNickname: "Roku 3", + clientVersion: "2.4.1", + platform: "Roku", + }); + + // Handle the result + console.log(result); + } + + run(); /playlists: post: tags: @@ -14800,75 +18188,34 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\CreatePlaylistRequest( + title: '', + type: Operations\CreatePlaylistQueryParamType::Photo, + smart: Operations\Smart::One, + uri: 'https://hoarse-testing.info/', ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->playlists->createPlaylist( + request: $request + ); - try { - $request = new Operations\CreatePlaylistRequest( - title: '', - type: Operations\CreatePlaylistQueryParamType::Photo, - smart: Operations\Smart::One, - uri: 'https://hoarse-testing.info/', - ); - $response = $sdk->playlists->createPlaylist($request); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: createPlaylist - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::CreatePlaylistRequest.new(\n title: \"\",\n type: ::PlexRubySDK::Operations::CreatePlaylistQueryParamType::PHOTO,\n smart: ::PlexRubySDK::Operations::Smart::ONE,\n uri: \"https://hoarse-testing.info/\",\n)\n \nres = s.playlists.create_playlist(req)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::Operations::CreatePlaylistRequest.new(\n title: \"\",\n type: ::PlexRubySDK::Operations::CreatePlaylistQueryParamType::PHOTO,\n smart: ::PlexRubySDK::Operations::Smart::ONE,\n uri: \"https://hoarse-testing.info/\",\n)\n \nres = s.playlists.create_playlist(req)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: createPlaylist - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{ - Title: "", - Type: operations.CreatePlaylistQueryParamTypePhoto, - Smart: operations.SmartOne, - URI: "https://hoarse-testing.info/", - }) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{\n Title: \"\",\n Type: operations.CreatePlaylistQueryParamTypePhoto,\n Smart: operations.SmartOne,\n URI: \"https://hoarse-testing.info/\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: createPlaylist source: |- @@ -14889,11 +18236,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); CreatePlaylistRequest req = CreatePlaylistRequest.builder() @@ -14914,7 +18256,27 @@ paths: } - lang: typescript label: createPlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { CreatePlaylistQueryParamType, Smart } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.createPlaylist({\n title: \"\",\n type: CreatePlaylistQueryParamType.Photo,\n smart: Smart.One,\n uri: \"https://inborn-brochure.biz\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.createPlaylist({ + title: "", + type: CreatePlaylistQueryParamType.Photo, + smart: Smart.One, + uri: "https://hoarse-testing.info/", + }); + + // Handle the result + console.log(result); + } + + run(); get: tags: - Playlists @@ -15074,64 +18436,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->playlists->getPlaylists( + playlistType: Operations\PlaylistType::Audio, + smart: Operations\QueryParamSmart::Zero + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->playlists->getPlaylists(Operations\PlaylistType::Audio, Operations\QueryParamSmart::Zero); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getPlaylists - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlists(playlist_type=::PlexRubySDK::Operations::PlaylistType::AUDIO, smart=::PlexRubySDK::Operations::QueryParamSmart::ZERO)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlists(playlist_type=::PlexRubySDK::Operations::PlaylistType::AUDIO, smart=::PlexRubySDK::Operations::QueryParamSmart::ZERO)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getPlaylists - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.GetPlaylists(ctx, nil, nil) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.GetPlaylists(ctx, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getPlaylists source: |- @@ -15151,11 +18480,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetPlaylistsResponse res = sdk.playlists().getPlaylists() @@ -15170,7 +18494,21 @@ paths: } - lang: typescript label: getPlaylists - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.getPlaylists();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylists(); + + // Handle the result + console.log(result); + } + + run(); '/playlists/{playlistID}': get: tags: @@ -15315,63 +18653,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->playlists->getPlaylist(4109.48); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->playlists->getPlaylist( + playlistID: 4109.48 + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getPlaylist - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist(playlist_id=4109.48)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist(playlist_id=4109.48)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getPlaylist - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.GetPlaylist(ctx, 4109.48) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.GetPlaylist(ctx, 4109.48)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getPlaylist source: |- @@ -15389,11 +18692,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetPlaylistResponse res = sdk.playlists().getPlaylist() @@ -15407,7 +18705,21 @@ paths: } - lang: typescript label: getPlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.getPlaylist(4109.48);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylist(4109.48); + + // Handle the result + console.log(result); + } + + run(); delete: tags: - Playlists @@ -15484,63 +18796,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->playlists->deletePlaylist(216.22); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->playlists->deletePlaylist( + playlistID: 216.22 + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: deletePlaylist - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: deletePlaylist - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.DeletePlaylist(ctx, 216.22) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.DeletePlaylist(ctx, 216.22)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: deletePlaylist source: |- @@ -15558,11 +18835,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); DeletePlaylistResponse res = sdk.playlists().deletePlaylist() @@ -15574,7 +18846,21 @@ paths: } - lang: typescript label: deletePlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.deletePlaylist(216.22);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.deletePlaylist(216.22); + + // Handle the result + console.log(result); + } + + run(); put: tags: - Playlists @@ -15663,63 +18949,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->playlists->updatePlaylist(3915.00, '', ''); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->playlists->updatePlaylist( + playlistID: 3915, + title: '', + summary: '' + + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: updatePlaylist - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.update_playlist(playlist_id=3915.00, title=\"\", summary=\"\")\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.update_playlist(playlist_id=3915.0, title=\"\", summary=\"\")\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: updatePlaylist - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.UpdatePlaylist(ctx, 3915.00, nil, nil) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.UpdatePlaylist(ctx, 3915, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: updatePlaylist source: |- @@ -15737,15 +18991,10 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() - .playlistID(3915.00d) + .playlistID(3915d) .title("") .summary("") .call(); @@ -15755,7 +19004,21 @@ paths: } - lang: typescript label: updatePlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.updatePlaylist(3915);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.updatePlaylist(3915); + + // Handle the result + console.log(result); + } + + run(); '/playlists/{playlistID}/items': get: tags: @@ -15773,7 +19036,7 @@ paths: - name: type in: query description: | - The type of media to retrieve. + The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season @@ -15786,12 +19049,18 @@ paths: - 2 - 3 - 4 + - 8 + - 9 + - 10 example: 2 x-speakeasy-enums: - MOVIE - TV_SHOW - SEASON - EPISODE + - AUDIO + - ALBUM + - TRACK required: true responses: '200': @@ -16117,65 +19386,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->playlists->getPlaylistContents( + playlistID: 5004.46, + type: Operations\GetPlaylistContentsQueryParamType::TvShow + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->playlists->getPlaylistContents(5004.46, Operations\GetPlaylistContentsQueryParamType::TvShow); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getPlaylistContents - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist_contents(playlist_id=5004.46, type=::PlexRubySDK::Operations::GetPlaylistContentsQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.get_playlist_contents(playlist_id=5004.46, type=::PlexRubySDK::Operations::GetPlaylistContentsQueryParamType::TV_SHOW)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getPlaylistContents - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.GetPlaylistContents(ctx, 5004.46, operations.GetPlaylistContentsQueryParamTypeTvShow) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.GetPlaylistContents(ctx, 5004.46, operations.GetPlaylistContentsQueryParamTypeTvShow)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getPlaylistContents source: |- @@ -16194,11 +19429,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() @@ -16213,7 +19443,22 @@ paths: } - lang: typescript label: getPlaylistContents - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { GetPlaylistContentsQueryParamType } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.getPlaylistContents(5004.46, GetPlaylistContentsQueryParamType.Two);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylistContents(5004.46, GetPlaylistContentsQueryParamType.TvShow); + + // Handle the result + console.log(result); + } + + run(); delete: tags: - Playlists @@ -16290,63 +19535,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->playlists->clearPlaylistContents(1893.18); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->playlists->clearPlaylistContents( + playlistID: 1893.18 + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: clearPlaylistContents - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: clearPlaylistContents - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.ClearPlaylistContents(ctx, 1893.18) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.ClearPlaylistContents(ctx, 1893.18)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: clearPlaylistContents source: |- @@ -16364,11 +19574,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() @@ -16380,7 +19585,21 @@ paths: } - lang: typescript label: clearPlaylistContents - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.clearPlaylistContents(1893.18);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.clearPlaylistContents(1893.18); + + // Handle the result + console.log(result); + } + + run(); put: tags: - Playlists @@ -16540,63 +19759,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->playlists->addPlaylistContents(8502.00, 'server://12345/com.plexapp.plugins.library/library/metadata/1', 123); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->playlists->addPlaylistContents( + playlistID: 8502.01, + uri: 'server://12345/com.plexapp.plugins.library/library/metadata/1', + playQueueID: 123 + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: addPlaylistContents - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.add_playlist_contents(playlist_id=8502.00, uri=\"server://12345/com.plexapp.plugins.library/library/metadata/1\", play_queue_id=123.0)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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.object.nil?\n # handle response\nend" - lang: go label: addPlaylistContents - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.AddPlaylistContents(ctx, 8502.00, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.AddPlaylistContents(ctx, 8502.01, \"server://12345/com.plexapp.plugins.library/library/metadata/1\", plexgo.Float64(123))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: addPlaylistContents source: |- @@ -16614,15 +19801,10 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() - .playlistID(8502.00d) + .playlistID(8502.01d) .uri("server://12345/com.plexapp.plugins.library/library/metadata/1") .playQueueID(123d) .call(); @@ -16634,7 +19816,21 @@ paths: } - lang: typescript label: addPlaylistContents - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.addPlaylistContents(8502.01, \"server://12345/com.plexapp.plugins.library/library/metadata/1\", 123);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + + // Handle the result + console.log(result); + } + + run(); /playlists/upload: post: tags: @@ -16730,65 +19926,32 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->playlists->uploadPlaylist( + path: '/home/barkley/playlist.m3u', + force: Operations\QueryParamForce::Zero, + sectionID: 1 + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->playlists->uploadPlaylist('/home/barkley/playlist.m3u', Operations\QueryParamForce::Zero, 1); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: uploadPlaylist - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.upload_playlist(path=\"/home/barkley/playlist.m3u\", force=::PlexRubySDK::Operations::QueryParamForce::ZERO, section_id=1)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.playlists.upload_playlist(path=\"/home/barkley/playlist.m3u\", force=::PlexRubySDK::Operations::QueryParamForce::ZERO, section_id=1)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: uploadPlaylist - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceZero, 1) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Playlists.UploadPlaylist(ctx, \"/home/barkley/playlist.m3u\", operations.QueryParamForceZero, 1)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: uploadPlaylist source: |- @@ -16807,11 +19970,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() @@ -16825,7 +19983,22 @@ paths: } - lang: typescript label: uploadPlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { QueryParamForce } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.playlists.uploadPlaylist(\"/home/barkley/playlist.m3u\", QueryParamForce.Zero);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", QueryParamForce.Zero, 1); + + // Handle the result + console.log(result); + } + + run(); /media/providers: get: tags: @@ -16844,12 +20017,12 @@ paths: - application/xml example: application/json - name: X-Plex-Token - in: query - description: Plex Authentication Token + in: header + description: 'An authentication token, obtained from plex.tv' + required: true schema: type: string example: CV5xoxjTpFKUzBTShsaf - required: true responses: '200': description: Media providers and their features @@ -17101,63 +20274,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getMediaProviders('CV5xoxjTpFKUzBTShsaf'); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->server->getMediaProviders( + xPlexToken: 'CV5xoxjTpFKUzBTShsaf' + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: providers - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_media_providers(x_plex_token=\"CV5xoxjTpFKUzBTShsaf\")\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_media_providers(x_plex_token=\"CV5xoxjTpFKUzBTShsaf\")\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: providers - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetMediaProviders(ctx, "CV5xoxjTpFKUzBTShsaf") - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetMediaProviders(ctx, \"CV5xoxjTpFKUzBTShsaf\")\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: providers source: |- @@ -17175,11 +20313,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetMediaProvidersResponse res = sdk.server().getMediaProviders() @@ -17193,7 +20326,21 @@ paths: } - lang: typescript label: providers - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getMediaProviders(\"CV5xoxjTpFKUzBTShsaf\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getMediaProviders("CV5xoxjTpFKUzBTShsaf"); + + // Handle the result + console.log(result); + } + + run(); /search: get: tags: @@ -17509,63 +20656,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->search->getSearchResults('110'); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->search->getSearchResults( + query: '110' + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getSearchResults - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.get_search_results(query=\"110\")\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.search.get_search_results(query=\"110\")\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getSearchResults - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Search.GetSearchResults(ctx, "110") - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Search.GetSearchResults(ctx, \"110\")\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getSearchResults source: |- @@ -17583,11 +20695,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetSearchResultsResponse res = sdk.search().getSearchResults() @@ -17601,7 +20708,21 @@ paths: } - lang: typescript label: getSearchResults - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.search.getSearchResults(\"110\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.search.getSearchResults("110"); + + // Handle the result + console.log(result); + } + + run(); /security/token: get: tags: @@ -17689,65 +20810,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->authentication->getTransientToken( + type: Operations\GetTransientTokenQueryParamType::Delegation, + scope: Operations\Scope::All + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->authentication->getTransientToken(Operations\GetTransientTokenQueryParamType::Delegation, Operations\Scope::All); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: getTransientToken - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_transient_token(type=::PlexRubySDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::PlexRubySDK::Operations::Scope::ALL)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_transient_token(type=::PlexRubySDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::PlexRubySDK::Operations::Scope::ALL)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: getTransientToken - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Authentication.GetTransientToken(ctx, operations.GetTransientTokenQueryParamTypeDelegation, operations.ScopeAll) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Authentication.GetTransientToken(ctx, operations.GetTransientTokenQueryParamTypeDelegation, operations.ScopeAll)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: getTransientToken source: |- @@ -17767,11 +20854,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetTransientTokenResponse res = sdk.authentication().getTransientToken() @@ -17784,7 +20866,22 @@ paths: } - lang: typescript label: getTransientToken - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { GetTransientTokenQueryParamType, Scope } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); + + // Handle the result + console.log(result); + } + + run(); /security/resources: get: tags: @@ -17866,63 +20963,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->authentication->getSourceConnectionInformation('provider://provider-identifier'); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->authentication->getSourceConnectionInformation( + source: 'server://client-identifier' + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: getSourceConnectionInformation - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_source_connection_information(source=\"provider://provider-identifier\")\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: getSourceConnectionInformation - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Authentication.GetSourceConnectionInformation(ctx, "provider://provider-identifier") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Authentication.GetSourceConnectionInformation(ctx, \"provider://provider-identifier\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: getSourceConnectionInformation source: |- @@ -17940,11 +21002,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() @@ -17956,7 +21013,21 @@ paths: } - lang: typescript label: getSourceConnectionInformation - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.getSourceConnectionInformation(\"server://client-identifier\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.authentication.getSourceConnectionInformation("provider://provider-identifier"); + + // Handle the result + console.log(result); + } + + run(); /servers: get: tags: @@ -18060,62 +21131,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->server->getServerList(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->server->getServerList( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getServerList - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_list()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.server.get_server_list()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getServerList - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Server.GetServerList(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Server.GetServerList(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getServerList source: |- @@ -18133,11 +21170,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetServerListResponse res = sdk.server().getServerList() @@ -18150,7 +21182,21 @@ paths: } - lang: typescript label: getServerList - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.server.getServerList();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.server.getServerList(); + + // Handle the result + console.log(result); + } + + run(); /statistics/media: get: tags: @@ -18159,7 +21205,7 @@ paths: description: This will return the media statistics for the server operationId: getStatistics parameters: - - name: Timespan + - name: timespan description: | The timespan to retrieve statistics for the exact meaning of this parameter is not known @@ -18328,63 +21374,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->statistics->getStatistics(4); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->statistics->getStatistics( + timespan: 4 + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getStatistics - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getStatistics - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Statistics.GetStatistics(ctx, plexgo.Int64(4)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Statistics.GetStatistics(ctx, plexgo.Int64(4))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getStatistics source: |- @@ -18402,11 +21413,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetStatisticsResponse res = sdk.statistics().getStatistics() @@ -18420,7 +21426,21 @@ paths: } - lang: typescript label: getStatistics - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.statistics.getStatistics(4);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.statistics.getStatistics(4); + + // Handle the result + console.log(result); + } + + run(); /statistics/resources: get: tags: @@ -18429,7 +21449,7 @@ paths: description: This will return the resources for the server operationId: getResourcesStatistics parameters: - - name: Timespan + - name: timespan description: | The timespan to retrieve statistics for the exact meaning of this parameter is not known @@ -18539,63 +21559,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->statistics->getResourcesStatistics(4); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->statistics->getResourcesStatistics( + timespan: 4 + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getResourcesStatistics - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_resources_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_resources_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getResourcesStatistics - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Statistics.GetResourcesStatistics(ctx, plexgo.Int64(4)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Statistics.GetResourcesStatistics(ctx, plexgo.Int64(4))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getResourcesStatistics source: |- @@ -18613,11 +21598,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() @@ -18631,7 +21611,21 @@ paths: } - lang: typescript label: getResourcesStatistics - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.statistics.getResourcesStatistics(4);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.statistics.getResourcesStatistics(4); + + // Handle the result + console.log(result); + } + + run(); /statistics/bandwidth: get: tags: @@ -18640,7 +21634,7 @@ paths: description: This will return the bandwidth statistics for the server operationId: getBandwidthStatistics parameters: - - name: Timespan + - name: timespan description: | The timespan to retrieve statistics for the exact meaning of this parameter is not known @@ -18802,63 +21796,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->statistics->getBandwidthStatistics(4); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->statistics->getBandwidthStatistics( + timespan: 4 + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getBandwidthStatistics - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_bandwidth_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.statistics.get_bandwidth_statistics(timespan=4)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getBandwidthStatistics - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Statistics.GetBandwidthStatistics(ctx, plexgo.Int64(4)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Statistics.GetBandwidthStatistics(ctx, plexgo.Int64(4))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getBandwidthStatistics source: |- @@ -18876,11 +21835,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() @@ -18894,7 +21848,21 @@ paths: } - lang: typescript label: getBandwidthStatistics - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.statistics.getBandwidthStatistics(4);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.statistics.getBandwidthStatistics(4); + + // Handle the result + console.log(result); + } + + run(); /status/sessions: get: tags: @@ -18973,6 +21941,10 @@ paths: musicAnalysisVersion: type: string example: '1' + originalTitle: + type: string + description: 'The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist' + example: The American Dream Is Killing Me parentGuid: type: string example: 'plex://album/65394d6d472b8ab03ef47f12' @@ -19296,62 +22268,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->sessions->getSessions(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->sessions->getSessions( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getSessions - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_sessions()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_sessions()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getSessions - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Sessions.GetSessions(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Sessions.GetSessions(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getSessions source: |- @@ -19369,11 +22307,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetSessionsResponse res = sdk.sessions().getSessions() @@ -19386,7 +22319,21 @@ paths: } - lang: typescript label: getSessions - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.sessions.getSessions();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.sessions.getSessions(); + + // Handle the result + console.log(result); + } + + run(); /status/sessions/history/all: get: tags: @@ -19588,65 +22535,33 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $filter = new Operations\QueryParamFilter(); + + $response = $sdk->sessions->getSessionHistory( + sort: '', + accountId: 1, + filter: $filter, + librarySectionID: 12 + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - $filter = new Operations\QueryParamFilter(); - $response = $sdk->sessions->getSessionHistory('', 1, $filter, 12); - - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->object !== null) { + // handle response } - lang: ruby label: getSessionHistory - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_session_history(sort=\"\", account_id=1, filter=::PlexRubySDK::Operations::QueryParamFilter.new(), library_section_id=12)\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_session_history(sort=\"\", account_id=1, filter=::PlexRubySDK::Operations::QueryParamFilter.new(), library_section_id=12)\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getSessionHistory - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Sessions.GetSessionHistory(ctx, plexgo.String("viewedAt:desc"), plexgo.Int64(1), &operations.QueryParamFilter{}, plexgo.Int64(12)) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Sessions.GetSessionHistory(ctx, plexgo.String(\"viewedAt:desc\"), plexgo.Int64(1), &operations.QueryParamFilter{}, plexgo.Int64(12))\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getSessionHistory source: |- @@ -19665,15 +22580,10 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") + .sort("viewedAt:desc") .accountId(1L) .filter(QueryParamFilter.builder() .build()) @@ -19687,7 +22597,21 @@ paths: } - lang: typescript label: getSessionHistory - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.sessions.getSessionHistory(\"viewedAt:desc\", 1, {}, 12);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.sessions.getSessionHistory("viewedAt:desc", 1, {}, 12); + + // Handle the result + console.log(result); + } + + run(); /transcode/sessions: get: tags: @@ -19875,62 +22799,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->sessions->getTranscodeSessions(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->sessions->getTranscodeSessions( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getTranscodeSessions - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_transcode_sessions()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.sessions.get_transcode_sessions()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getTranscodeSessions - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Sessions.GetTranscodeSessions(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Sessions.GetTranscodeSessions(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getTranscodeSessions source: |- @@ -19948,11 +22838,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() @@ -19965,7 +22850,21 @@ paths: } - lang: typescript label: getTranscodeSessions - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.sessions.getTranscodeSessions();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.sessions.getTranscodeSessions(); + + // Handle the result + console.log(result); + } + + run(); '/transcode/sessions/{sessionKey}': delete: tags: @@ -20043,63 +22942,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->sessions->stopTranscodeSession('zz7llzqlx8w9vnrsbnwhbmep'); - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->sessions->stopTranscodeSession( + sessionKey: 'zz7llzqlx8w9vnrsbnwhbmep' + ); + + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: stopTranscodeSession - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::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" - lang: go label: stopTranscodeSession - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Sessions.StopTranscodeSession(ctx, "zz7llzqlx8w9vnrsbnwhbmep") - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Sessions.StopTranscodeSession(ctx, \"zz7llzqlx8w9vnrsbnwhbmep\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: stopTranscodeSession source: |- @@ -20117,11 +22981,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() @@ -20133,7 +22992,21 @@ paths: } - lang: typescript label: stopTranscodeSession - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.sessions.stopTranscodeSession(\"zz7llzqlx8w9vnrsbnwhbmep\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); + + // Handle the result + console.log(result); + } + + run(); /updater/status: get: tags: @@ -20293,62 +23166,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->updater->getUpdateStatus(); - if ($response->object !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->updater->getUpdateStatus( + + ); + + if ($response->object !== null) { + // handle response } - lang: ruby label: getUpdateStatus - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.get_update_status()\n\nif ! res.object.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.get_update_status()\n\nif ! res.object.nil?\n # handle response\nend" - lang: go label: getUpdateStatus - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Updater.GetUpdateStatus(ctx) - if err != nil { - log.Fatal(err) - } - if res.Object != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Updater.GetUpdateStatus(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}" - lang: java label: getUpdateStatus source: |- @@ -20366,11 +23205,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() @@ -20383,7 +23217,21 @@ paths: } - lang: typescript label: getUpdateStatus - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.updater.getUpdateStatus();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.updater.getUpdateStatus(); + + // Handle the result + console.log(result); + } + + run(); /updater/check: put: tags: @@ -20464,65 +23312,29 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->updater->checkForUpdates( + download: Operations\Download::One ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->updater->checkForUpdates(Operations\Download::One); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: checkForUpdates - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.check_for_updates(download=::PlexRubySDK::Operations::Download::ONE)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.check_for_updates(download=::PlexRubySDK::Operations::Download::ONE)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: checkForUpdates - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Updater.CheckForUpdates(ctx, operations.DownloadOne.ToPointer()) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Updater.CheckForUpdates(ctx, operations.DownloadOne.ToPointer())\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: checkForUpdates source: |- @@ -20541,11 +23353,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); CheckForUpdatesResponse res = sdk.updater().checkForUpdates() @@ -20557,7 +23364,22 @@ paths: } - lang: typescript label: checkForUpdates - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Download } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.updater.checkForUpdates(Download.One);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Download } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.updater.checkForUpdates(Download.One); + + // Handle the result + console.log(result); + } + + run(); /updater/apply: put: tags: @@ -20651,65 +23473,31 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->updater->applyUpdates( + tonight: Operations\Tonight::One, + skip: Operations\Skip::One + ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); - - try { - - $response = $sdk->updater->applyUpdates(Operations\Tonight::One, Operations\Skip::One); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: applyUpdates - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.apply_updates(tonight=::PlexRubySDK::Operations::Tonight::ONE, skip=::PlexRubySDK::Operations::Skip::ONE)\n\nif res.status_code == 200\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.updater.apply_updates(tonight=::PlexRubySDK::Operations::Tonight::ONE, skip=::PlexRubySDK::Operations::Skip::ONE)\n\nif res.status_code == 200\n # handle response\nend" - lang: go label: applyUpdates - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Updater.ApplyUpdates(ctx, operations.TonightOne.ToPointer(), operations.SkipOne.ToPointer()) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Updater.ApplyUpdates(ctx, operations.TonightOne.ToPointer(), operations.SkipOne.ToPointer())\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: applyUpdates source: |- @@ -20729,11 +23517,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); ApplyUpdatesResponse res = sdk.updater().applyUpdates() @@ -20746,7 +23529,22 @@ paths: } - lang: typescript label: applyUpdates - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Skip, Tonight } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); + + // Handle the result + console.log(result); + } + + run(); '/video/:/transcode/universal/start.mpd': get: tags: @@ -20929,99 +23727,46 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; use LukeHagar\Plex_API\Models\Operations; - $security = new Components\Security( - accessToken: "", + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + $request = new Operations\StartUniversalTranscodeRequest( + hasMDE: 1, + path: '/library/metadata/23409', + mediaIndex: 0, + partIndex: 0, + protocol: 'hls', + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: 'burn', + audioBoost: 100, + location: 'lan', + mediaBufferSize: 102400, + session: 'zvcage8b7rkioqcm8f4uns4c', + addDebugOverlay: 0, + autoAdjustQuality: 0, ); - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + $response = $sdk->video->startUniversalTranscode( + request: $request + ); - try { - $request = new Operations\StartUniversalTranscodeRequest( - hasMDE: 1, - path: '/library/metadata/23409', - mediaIndex: 0, - partIndex: 0, - protocol: 'hls', - fastSeek: 0, - directPlay: 0, - directStream: 0, - subtitleSize: 100, - subtites: 'burn', - audioBoost: 100, - location: 'lan', - mediaBufferSize: 102400, - session: 'zvcage8b7rkioqcm8f4uns4c', - addDebugOverlay: 0, - autoAdjustQuality: 0, - ); - $response = $sdk->video->startUniversalTranscode($request); - - if ($response->statusCode === 200) { - // handle response - } - } catch (Throwable $e) { - // handle exception + if ($response->statusCode === 200) { + // handle response } - lang: ruby label: startUniversalTranscode - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::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" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n\nreq = ::PlexRubySDK::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" - lang: go label: startUniversalTranscode - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{ - HasMDE: 1, - Path: "/library/metadata/23409", - MediaIndex: 0, - PartIndex: 0, - Protocol: "hls", - FastSeek: plexgo.Float64(0), - DirectPlay: plexgo.Float64(0), - DirectStream: plexgo.Float64(0), - SubtitleSize: plexgo.Float64(100), - Subtites: plexgo.String("burn"), - AudioBoost: plexgo.Float64(100), - Location: plexgo.String("lan"), - MediaBufferSize: plexgo.Float64(102400), - Session: plexgo.String("zvcage8b7rkioqcm8f4uns4c"), - AddDebugOverlay: plexgo.Float64(0), - AutoAdjustQuality: plexgo.Float64(0), - }) - if err != nil { - log.Fatal(err) - } - if res != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{\n HasMDE: 1,\n Path: \"/library/metadata/23409\",\n MediaIndex: 0,\n PartIndex: 0,\n Protocol: \"hls\",\n FastSeek: plexgo.Float64(0),\n DirectPlay: plexgo.Float64(0),\n DirectStream: plexgo.Float64(0),\n SubtitleSize: plexgo.Float64(100),\n Subtites: plexgo.String(\"burn\"),\n AudioBoost: plexgo.Float64(100),\n Location: plexgo.String(\"lan\"),\n MediaBufferSize: plexgo.Float64(102400),\n Session: plexgo.String(\"zvcage8b7rkioqcm8f4uns4c\"),\n AddDebugOverlay: plexgo.Float64(0),\n AutoAdjustQuality: plexgo.Float64(0),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - lang: java label: startUniversalTranscode source: |- @@ -21040,11 +23785,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() @@ -21075,11 +23815,42 @@ paths: } - lang: typescript label: startUniversalTranscode - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.video.startUniversalTranscode({\n hasMDE: 1,\n path: \"/library/metadata/23409\",\n mediaIndex: 0,\n partIndex: 0,\n protocol: \"hls\",\n fastSeek: 0,\n directPlay: 0,\n directStream: 0,\n subtitleSize: 100,\n subtites: \"burn\",\n audioBoost: 100,\n location: \"lan\",\n mediaBufferSize: 102400,\n session: \"zvcage8b7rkioqcm8f4uns4c\",\n addDebugOverlay: 0,\n autoAdjustQuality: 0,\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.video.startUniversalTranscode({ + hasMDE: 1, + path: "/library/metadata/23409", + mediaIndex: 0, + partIndex: 0, + protocol: "hls", + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: "burn", + audioBoost: 100, + location: "lan", + mediaBufferSize: 102400, + session: "zvcage8b7rkioqcm8f4uns4c", + addDebugOverlay: 0, + autoAdjustQuality: 0, + }); + + // Handle the result + console.log(result); + } + + run(); /user: get: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' tags: - Authentication summary: Get Token Details @@ -21093,95 +23864,6 @@ paths: schema: title: UserPlexAccount type: object - examples: - - adsConsent: true - adsConsentReminderAt: '2019-08-24T14:15:22Z' - adsConsentSetAt: '2019-08-24T14:15:22Z' - anonymous: false - authToken: CxoUzBTSV5hsxjTpFKaf - backupCodesCreated: false - confirmed: false - country: US - email: username@email.com - emailOnlyAuth: false - experimentalFeatures: false - friendlyName: friendlyUsername - entitlements: [] - guest: false - hasPassword: true - home: false - homeAdmin: false - homeSize: 1 - id: 13692262 - joinedAt: 1721154902 - locale: null - mailingListActive: false - mailingListStatus: subscribed - maxHomeSize: 15 - pastSubscriptions: - - id: string - mode: string - renewsAt: string - endsAt: '1556281940' - canceled: '0' - gracePeriod: '0' - onHold: '0' - canReactivate: '0' - canUpgrade: '0' - canDowngrade: '0' - canConvert: '0' - type: plexpass - transfer: string - state: ended - billing: - - internalPaymentMethod: string - paymentMethodId: string - pin: string - profile: - - autoSelectAudio: true - defaultAudioLanguage: ja - defaultSubtitleLanguage: en - autoSelectSubtitle: 1 - defaultSubtitleAccessibility: 1 - defaultSubtitleForced: 0 - watchedIndicator: 1 - mediaReviewsVisibility: 0 - protected: false - rememberExpiresAt: 1722364046 - restricted: false - roles: - - string - scrobbleTypes: '' - services: - - identifier: metadata-dev - endpoint: 'https://epg.provider.plex.tv' - token: DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv - secret: string - status: online - subscription: - features: - - Android - Dolby Vision - active: true - subscribedAt: '2021-04-12T18:21:12Z' - status: Inactive - paymentService: string - plan: string - subscriptionDescription: string - subscriptions: - - features: - - Android - Dolby Vision - active: true - subscribedAt: '2021-04-12T18:21:12Z' - status: Inactive - paymentService: string - plan: string - thumb: 'https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101' - title: UsernameTitle - trials: - - {} - twoFactorEnabled: false - username: Username - uuid: dae343c1f45beb4f required: - adsConsent - adsConsentReminderAt @@ -21229,17 +23911,21 @@ paths: - 'null' description: Unknown adsConsentReminderAt: - type: - - string - - 'null' - description: Unknown - format: date-time + oneOf: + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: 'null' adsConsentSetAt: - type: - - string - - 'null' - description: Unknown - format: date-time + oneOf: + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: 'null' anonymous: type: - boolean @@ -21329,7 +24015,9 @@ paths: description: If you are subscribed to the Plex newsletter default: false mailingListStatus: - description: Your current mailing list status + description: Your current mailing list status (active or unsubscribed) + type: string + example: active enum: - active - unsubscribed @@ -21500,7 +24188,8 @@ paths: description: List of features allowed on your Plex Pass subscription type: array items: - enum: + type: string + description: | - Android - Dolby Vision - Android - PiP - CU Sunset @@ -21508,28 +24197,43 @@ paths: - TREBLE-show-features - ad-countdown-timer - adaptive_bitrate + - album-types + - allow_dvr - amazon-loop-debug - avod-ad-analysis - avod-new-media - blacklist_get_signin + - boost-voices + - camera_upload - client-radio-stations - cloudflare-turnstile-required + - cloudsync - collections - comments_and_replies_push_notifications - community_access_plex_tv - companions_sonos + - content_filter - custom-home-removal - disable_home_user_friendships - disable_sharing_friendships + - downloads-gating - drm_support + - dvr + - dvr-block-unsupported-countries + - epg-recent-channels - exclude restrictions - federated-auth - friend_request_push_notifications + - grandfather-sync - guided-upgrade + - hardware_transcoding - home + - hwtranscode + - imagga-v2 - increase-password-complexity - ios14-privacy-banner - iterable-notification-tokens + - item_clusters - keep-payment-method - kevin-bacon - korea-consent @@ -21538,28 +24242,58 @@ paths: - lightning-dvr-pivot - live-tv-support-incomplete-segments - livetv + - lyrics - metadata_search + - music-analysis + - music_videos - new_plex_pass_prices - news-provider-sunset-modal + - nominatim + - pass - photos-favorites - photos-metadata-edition + - photosV6-edit + - photosV6-tv-albums - pms_health + - premium-dashboard + - premium_music_metadata - radio - rate-limit-client-token - scrobbling-service-plex-tv + - session_bandwidth_restrictions + - session_kick - shared_server_notification - shared_source_notification + - signin_notification - signin_with_apple + - silence-removal + - sleep-timer - spring_serve_ad_provider + - sync + - sweet-fades - transcoder_cache + - trailers - tuner-sharing - two-factor-authentication - unsupportedtuners - upgrade-3ds2 + - visualizers - vod-schema - vod_cloudflare + - volume-leveling - watch-together-invite + - watchlist-rss - web_server_dashboard + - webhooks + - blacklist-subnets + - chromecast-music-mp + - Sync v3 + - livetv-platform-specific + - nonAnonymousAccount + - parental-controls + - Subtitles on Demand + - ultrablur + - web-desktop-gracenote-banner active: description: If the account's Plex Pass subscription is active type: boolean @@ -21601,7 +24335,8 @@ paths: description: List of features allowed on your Plex Pass subscription type: array items: - enum: + type: string + description: | - Android - Dolby Vision - Android - PiP - CU Sunset @@ -21609,28 +24344,43 @@ paths: - TREBLE-show-features - ad-countdown-timer - adaptive_bitrate + - album-types + - allow_dvr - amazon-loop-debug - avod-ad-analysis - avod-new-media - blacklist_get_signin + - boost-voices + - camera_upload - client-radio-stations - cloudflare-turnstile-required + - cloudsync - collections - comments_and_replies_push_notifications - community_access_plex_tv - companions_sonos + - content_filter - custom-home-removal - disable_home_user_friendships - disable_sharing_friendships + - downloads-gating - drm_support + - dvr + - dvr-block-unsupported-countries + - epg-recent-channels - exclude restrictions - federated-auth - friend_request_push_notifications + - grandfather-sync - guided-upgrade + - hardware_transcoding - home + - hwtranscode + - imagga-v2 - increase-password-complexity - ios14-privacy-banner - iterable-notification-tokens + - item_clusters - keep-payment-method - kevin-bacon - korea-consent @@ -21639,28 +24389,58 @@ paths: - lightning-dvr-pivot - live-tv-support-incomplete-segments - livetv + - lyrics - metadata_search + - music-analysis + - music_videos - new_plex_pass_prices - news-provider-sunset-modal + - nominatim + - pass - photos-favorites - photos-metadata-edition + - photosV6-edit + - photosV6-tv-albums - pms_health + - premium-dashboard + - premium_music_metadata - radio - rate-limit-client-token - scrobbling-service-plex-tv + - session_bandwidth_restrictions + - session_kick - shared_server_notification - shared_source_notification + - signin_notification - signin_with_apple + - silence-removal + - sleep-timer - spring_serve_ad_provider + - sync + - sweet-fades - transcoder_cache + - trailers - tuner-sharing - two-factor-authentication - unsupportedtuners - upgrade-3ds2 + - visualizers - vod-schema - vod_cloudflare + - volume-leveling - watch-together-invite + - watchlist-rss - web_server_dashboard + - webhooks + - blacklist-subnets + - chromecast-music-mp + - Sync v3 + - livetv-platform-specific + - nonAnonymousAccount + - parental-controls + - Subtitles on Demand + - ultrablur + - web-desktop-gracenote-banner active: description: If the account's Plex Pass subscription is active type: boolean @@ -21772,62 +24552,28 @@ paths: require 'vendor/autoload.php'; use LukeHagar\Plex_API; - use LukeHagar\Plex_API\Models\Components; - - $security = new Components\Security( - accessToken: "", - ); $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); - try { - $response = $sdk->authentication->getTokenDetails(); - if ($response->userPlexAccount !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + + $response = $sdk->authentication->getTokenDetails( + + ); + + if ($response->userPlexAccount !== null) { + // handle response } - lang: ruby label: getTokenDetails - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_token_details()\n\nif ! res.user_plex_account.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"\",\n )\n)\n\n \nres = s.authentication.get_token_details()\n\nif ! res.user_plex_account.nil?\n # handle response\nend" - lang: go label: getTokenDetails - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Authentication.GetTokenDetails(ctx) - if err != nil { - log.Fatal(err) - } - if res.UserPlexAccount != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"\"),\n )\n\n res, err := s.Authentication.GetTokenDetails(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.UserPlexAccount != nil {\n // handle response\n }\n}" - lang: java label: getTokenDetails source: |- @@ -21845,11 +24591,6 @@ paths: PlexAPI sdk = PlexAPI.builder() .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() @@ -21862,17 +24603,72 @@ paths: } - lang: typescript label: getTokenDetails - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.getTokenDetails();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + }); + + async function run() { + const result = await plexAPI.authentication.getTokenDetails(); + + // Handle the result + console.log(result); + } + + run(); /users/signin: post: servers: - - url: 'https://plex.tv/api/v2/' + - url: 'https://plex.tv/api/v2' security: [] tags: - Authentication summary: Get User Sign In Data description: Sign in user with username and password and return user data with Plex authentication token operationId: post-users-sign-in-data + parameters: + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 + - name: X-Plex-Product + x-speakeasy-name-override: ClientName + description: 'The name of the client application. (Plex Web, Plex Media Server, etc.)' + in: header + required: false + schema: + type: string + example: Plex for Roku + - name: X-Plex-Device + x-speakeasy-name-override: DeviceNickname + description: A relatively friendly name for the client device + in: header + required: false + schema: + type: string + example: Roku 3 + - name: X-Plex-Version + x-speakeasy-name-override: ClientVersion + description: The version of the client application. + in: header + required: false + schema: + type: string + example: 2.4.1 + - name: X-Plex-Platform + x-speakeasy-name-override: Platform + description: The platform of the client application. + in: header + required: false + schema: + type: string + example: Roku requestBody: content: application/x-www-form-urlencoded: @@ -21906,95 +24702,6 @@ paths: allOf: - title: UserPlexAccount type: object - examples: - - adsConsent: true - adsConsentReminderAt: '2019-08-24T14:15:22Z' - adsConsentSetAt: '2019-08-24T14:15:22Z' - anonymous: false - authToken: CxoUzBTSV5hsxjTpFKaf - backupCodesCreated: false - confirmed: false - country: US - email: username@email.com - emailOnlyAuth: false - experimentalFeatures: false - friendlyName: friendlyUsername - entitlements: [] - guest: false - hasPassword: true - home: false - homeAdmin: false - homeSize: 1 - id: 13692262 - joinedAt: 1721154902 - locale: null - mailingListActive: false - mailingListStatus: subscribed - maxHomeSize: 15 - pastSubscriptions: - - id: string - mode: string - renewsAt: string - endsAt: '1556281940' - canceled: '0' - gracePeriod: '0' - onHold: '0' - canReactivate: '0' - canUpgrade: '0' - canDowngrade: '0' - canConvert: '0' - type: plexpass - transfer: string - state: ended - billing: - - internalPaymentMethod: string - paymentMethodId: string - pin: string - profile: - - autoSelectAudio: true - defaultAudioLanguage: ja - defaultSubtitleLanguage: en - autoSelectSubtitle: 1 - defaultSubtitleAccessibility: 1 - defaultSubtitleForced: 0 - watchedIndicator: 1 - mediaReviewsVisibility: 0 - protected: false - rememberExpiresAt: 1722364046 - restricted: false - roles: - - string - scrobbleTypes: '' - services: - - identifier: metadata-dev - endpoint: 'https://epg.provider.plex.tv' - token: DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv - secret: string - status: online - subscription: - features: - - Android - Dolby Vision - active: true - subscribedAt: '2021-04-12T18:21:12Z' - status: Inactive - paymentService: string - plan: string - subscriptionDescription: string - subscriptions: - - features: - - Android - Dolby Vision - active: true - subscribedAt: '2021-04-12T18:21:12Z' - status: Inactive - paymentService: string - plan: string - thumb: 'https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101' - title: UsernameTitle - trials: - - {} - twoFactorEnabled: false - username: Username - uuid: dae343c1f45beb4f required: - adsConsent - adsConsentReminderAt @@ -22042,17 +24749,21 @@ paths: - 'null' description: Unknown adsConsentReminderAt: - type: - - string - - 'null' - description: Unknown - format: date-time + oneOf: + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: 'null' adsConsentSetAt: - type: - - string - - 'null' - description: Unknown - format: date-time + oneOf: + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + - type: 'null' anonymous: type: - boolean @@ -22142,7 +24853,9 @@ paths: description: If you are subscribed to the Plex newsletter default: false mailingListStatus: - description: Your current mailing list status + description: Your current mailing list status (active or unsubscribed) + type: string + example: active enum: - active - unsubscribed @@ -22313,7 +25026,8 @@ paths: description: List of features allowed on your Plex Pass subscription type: array items: - enum: + type: string + description: | - Android - Dolby Vision - Android - PiP - CU Sunset @@ -22321,28 +25035,43 @@ paths: - TREBLE-show-features - ad-countdown-timer - adaptive_bitrate + - album-types + - allow_dvr - amazon-loop-debug - avod-ad-analysis - avod-new-media - blacklist_get_signin + - boost-voices + - camera_upload - client-radio-stations - cloudflare-turnstile-required + - cloudsync - collections - comments_and_replies_push_notifications - community_access_plex_tv - companions_sonos + - content_filter - custom-home-removal - disable_home_user_friendships - disable_sharing_friendships + - downloads-gating - drm_support + - dvr + - dvr-block-unsupported-countries + - epg-recent-channels - exclude restrictions - federated-auth - friend_request_push_notifications + - grandfather-sync - guided-upgrade + - hardware_transcoding - home + - hwtranscode + - imagga-v2 - increase-password-complexity - ios14-privacy-banner - iterable-notification-tokens + - item_clusters - keep-payment-method - kevin-bacon - korea-consent @@ -22351,28 +25080,58 @@ paths: - lightning-dvr-pivot - live-tv-support-incomplete-segments - livetv + - lyrics - metadata_search + - music-analysis + - music_videos - new_plex_pass_prices - news-provider-sunset-modal + - nominatim + - pass - photos-favorites - photos-metadata-edition + - photosV6-edit + - photosV6-tv-albums - pms_health + - premium-dashboard + - premium_music_metadata - radio - rate-limit-client-token - scrobbling-service-plex-tv + - session_bandwidth_restrictions + - session_kick - shared_server_notification - shared_source_notification + - signin_notification - signin_with_apple + - silence-removal + - sleep-timer - spring_serve_ad_provider + - sync + - sweet-fades - transcoder_cache + - trailers - tuner-sharing - two-factor-authentication - unsupportedtuners - upgrade-3ds2 + - visualizers - vod-schema - vod_cloudflare + - volume-leveling - watch-together-invite + - watchlist-rss - web_server_dashboard + - webhooks + - blacklist-subnets + - chromecast-music-mp + - Sync v3 + - livetv-platform-specific + - nonAnonymousAccount + - parental-controls + - Subtitles on Demand + - ultrablur + - web-desktop-gracenote-banner active: description: If the account's Plex Pass subscription is active type: boolean @@ -22414,7 +25173,8 @@ paths: description: List of features allowed on your Plex Pass subscription type: array items: - enum: + type: string + description: | - Android - Dolby Vision - Android - PiP - CU Sunset @@ -22422,28 +25182,43 @@ paths: - TREBLE-show-features - ad-countdown-timer - adaptive_bitrate + - album-types + - allow_dvr - amazon-loop-debug - avod-ad-analysis - avod-new-media - blacklist_get_signin + - boost-voices + - camera_upload - client-radio-stations - cloudflare-turnstile-required + - cloudsync - collections - comments_and_replies_push_notifications - community_access_plex_tv - companions_sonos + - content_filter - custom-home-removal - disable_home_user_friendships - disable_sharing_friendships + - downloads-gating - drm_support + - dvr + - dvr-block-unsupported-countries + - epg-recent-channels - exclude restrictions - federated-auth - friend_request_push_notifications + - grandfather-sync - guided-upgrade + - hardware_transcoding - home + - hwtranscode + - imagga-v2 - increase-password-complexity - ios14-privacy-banner - iterable-notification-tokens + - item_clusters - keep-payment-method - kevin-bacon - korea-consent @@ -22452,28 +25227,58 @@ paths: - lightning-dvr-pivot - live-tv-support-incomplete-segments - livetv + - lyrics - metadata_search + - music-analysis + - music_videos - new_plex_pass_prices - news-provider-sunset-modal + - nominatim + - pass - photos-favorites - photos-metadata-edition + - photosV6-edit + - photosV6-tv-albums - pms_health + - premium-dashboard + - premium_music_metadata - radio - rate-limit-client-token - scrobbling-service-plex-tv + - session_bandwidth_restrictions + - session_kick - shared_server_notification - shared_source_notification + - signin_notification - signin_with_apple + - silence-removal + - sleep-timer - spring_serve_ad_provider + - sync + - sweet-fades - transcoder_cache + - trailers - tuner-sharing - two-factor-authentication - unsupportedtuners - upgrade-3ds2 + - visualizers - vod-schema - vod_cloudflare + - volume-leveling - watch-together-invite + - watchlist-rss - web_server_dashboard + - webhooks + - blacklist-subnets + - chromecast-music-mp + - Sync v3 + - livetv-platform-specific + - nonAnonymousAccount + - parental-controls + - Subtitles on Demand + - ultrablur + - web-desktop-gracenote-banner active: description: If the account's Plex Pass subscription is active type: boolean @@ -22693,65 +25498,34 @@ paths: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $sdk = Plex_API\PlexAPI::builder() - ->setClientID('gcgzw5rz2xovp84b4vha3a40') - ->setClientName('Plex Web') - ->setClientVersion('4.133.0') - ->setClientPlatform('Chrome') - ->setDeviceName('Linux') - ->build(); + $sdk = Plex_API\PlexAPI::builder()->build(); - try { - $request = new Operations\PostUsersSignInDataRequestBody( + $request = new Operations\PostUsersSignInDataRequest( + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + clientName: 'Plex for Roku', + deviceNickname: 'Roku 3', + clientVersion: '2.4.1', + platform: 'Roku', + requestBody: new Operations\PostUsersSignInDataRequestBody( login: 'username@email.com', password: 'password123', verificationCode: '123456', - ); - $response = $sdk->authentication->postUsersSignInData($request); + ), + ); - if ($response->userPlexAccount !== null) { - // handle response - } - } catch (Throwable $e) { - // handle exception + $response = $sdk->authentication->postUsersSignInData( + request: $request + ); + + if ($response->userPlexAccount !== null) { + // handle response } - lang: ruby label: data - source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new(\n client_id: \"gcgzw5rz2xovp84b4vha3a40\",\n client_name: \"Plex Web\",\n client_version: \"4.133.0\",\n client_platform: \"Chrome\",\n device_name: \"Linux\",\n )\n\n\nreq = ::PlexRubySDK::Operations::PostUsersSignInDataRequestBody.new(\n login: \"username@email.com\",\n password: \"password123\",\n verification_code: \"123456\",\n)\n \nres = s.authentication.post_users_sign_in_data(req)\n\nif ! res.user_plex_account.nil?\n # handle response\nend" + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n\nreq = ::PlexRubySDK::Operations::PostUsersSignInDataRequest.new(\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n client_name: \"Plex for Roku\",\n device_nickname: \"Roku 3\",\n client_version: \"2.4.1\",\n platform: \"Roku\",\n request_body: ::PlexRubySDK::Operations::PostUsersSignInDataRequestBody.new(\n login: \"username@email.com\",\n password: \"password123\",\n verification_code: \"123456\",\n ),\n)\n \nres = s.authentication.post_users_sign_in_data(req)\n\nif ! res.user_plex_account.nil?\n # handle response\nend" - lang: go label: data - source: |- - package main - - import( - "github.com/LukeHagar/plexgo" - "context" - "github.com/LukeHagar/plexgo/models/operations" - "log" - ) - - func main() { - s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Authentication.PostUsersSignInData(ctx, &operations.PostUsersSignInDataRequestBody{ - Login: "username@email.com", - Password: "password123", - VerificationCode: plexgo.String("123456"), - }) - if err != nil { - log.Fatal(err) - } - if res.UserPlexAccount != nil { - // handle response - } - } + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n RequestBody: &operations.PostUsersSignInDataRequestBody{\n Login: \"username@email.com\",\n Password: \"password123\",\n VerificationCode: plexgo.String(\"123456\"),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.UserPlexAccount != nil {\n // handle response\n }\n}" - lang: java label: data source: |- @@ -22760,6 +25534,7 @@ paths: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.PostUsersSignInDataBadRequest; import dev.plexapi.plexapi.models.errors.PostUsersSignInDataUnauthorized; + import dev.plexapi.plexapi.models.operations.PostUsersSignInDataRequest; import dev.plexapi.plexapi.models.operations.PostUsersSignInDataRequestBody; import dev.plexapi.plexapi.models.operations.PostUsersSignInDataResponse; import java.lang.Exception; @@ -22769,17 +25544,19 @@ paths: public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") .build(); - PostUsersSignInDataRequestBody req = PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") + PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + .clientName("Plex for Roku") + .deviceNickname("Roku 3") + .clientVersion("2.4.1") + .platform("Roku") + .requestBody(PostUsersSignInDataRequestBody.builder() + .login("username@email.com") + .password("password123") + .verificationCode("123456") + .build()) .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() @@ -22793,7 +25570,607 @@ paths: } - lang: typescript label: data - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.postUsersSignInData(\"gcgzw5rz2xovp84b4vha3a40\", {\n login: \"username@email.com\",\n password: \"password123\",\n verificationCode: \"123456\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.authentication.postUsersSignInData({ + clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", + clientName: "Plex for Roku", + deviceNickname: "Roku 3", + clientVersion: "2.4.1", + platform: "Roku", + requestBody: { + login: "username@email.com", + password: "password123", + verificationCode: "123456", + }, + }); + + // Handle the result + console.log(result); + } + + run(); + /users: + get: + servers: + - url: 'https://plex.tv/api' + security: [] + tags: + - Users + summary: Get list of all connected users + description: Get list of all users that are friends and have library access with the provided Plex authentication token + operationId: get-users + parameters: + - name: X-Plex-Client-Identifier + x-speakeasy-name-override: ClientID + description: 'An opaque identifier unique to the client (UUID, serial number, or other unique device ID)' + required: true + in: header + schema: + type: string + example: 3381b62b-9ab7-4e37-827b-203e9809eb58 + - name: X-Plex-Product + x-speakeasy-name-override: ClientName + description: 'The name of the client application. (Plex Web, Plex Media Server, etc.)' + in: header + required: false + schema: + type: string + example: Plex for Roku + - name: X-Plex-Device + x-speakeasy-name-override: DeviceNickname + description: A relatively friendly name for the client device + in: header + required: false + schema: + type: string + example: Roku 3 + - name: X-Plex-Device-Name + x-speakeasy-name-override: DeviceName + description: 'The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)' + in: header + required: false + schema: + type: string + example: Chrome + - name: X-Plex-Device-Screen-Resolution + x-speakeasy-name-override: DeviceScreenResolution + description: 'The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)' + in: header + required: false + schema: + type: string + example: '1487x1165,2560x1440' + - name: X-Plex-Version + x-speakeasy-name-override: ClientVersion + description: The version of the client application. + in: header + required: false + schema: + type: string + example: 2.4.1 + - name: X-Plex-Platform + x-speakeasy-name-override: Platform + description: The platform of the client application. + in: header + required: false + schema: + type: string + example: Roku + - name: X-Plex-Features + x-speakeasy-name-override: ClientFeatures + description: 'The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)' + in: header + required: false + schema: + type: string + example: 'external-media,indirect-media,hub-style-list' + - name: X-Plex-Model + x-speakeasy-name-override: Model + description: A potentially less friendly identifier for the device model + in: header + required: false + schema: + type: string + example: 4200X + - name: X-Plex-Session-Id + description: The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) + in: header + required: false + schema: + type: string + example: 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca + - name: X-Plex-Language + description: The language of the client application. + in: header + required: false + schema: + type: string + example: en + - name: X-Plex-Platform-Version + x-speakeasy-name-override: PlatformVersion + description: The version of the platform + in: header + required: false + schema: + type: string + example: 4.3 build 1057 + - name: X-Plex-Token + in: header + description: 'An authentication token, obtained from plex.tv' + required: true + schema: + type: string + example: CV5xoxjTpFKUzBTShsaf + responses: + '200': + description: Successful response with media container data in XML + content: + application/xml: + schema: + type: object + properties: + MediaContainer: + type: object + description: Container holding user and server details. + required: + - friendlyName + - identifier + - machineIdentifier + - totalSize + - size + - User + properties: + friendlyName: + type: string + description: The friendly name of the Plex instance. + example: myPlex + identifier: + type: string + example: com.plexapp.plugins.myplex + machineIdentifier: + type: string + description: Unique Machine identifier of the Plex server. + example: 3dff4c4da3b1229a649aa574a9e2b419a684a20e + totalSize: + type: integer + description: Total number of users. + example: 30 + size: + type: integer + description: Number of users in the current response. + example: 30 + User: + type: array + description: List of users with access to the Plex server. + items: + type: object + required: + - id + - title + - username + - email + - thumb + - protected + - home + - allowTuners + - allowSync + - allowCameraUpload + - allowChannels + - allowSubtitleAdmin + - restricted + - Server + properties: + id: + type: integer + description: User's unique ID. + example: 22526914 + title: + type: string + description: User's display name. + example: Plex User + username: + type: string + description: User's username. + example: zgfuc7krcqfimrmb9lsl5j + email: + type: string + description: User's email address. + example: zgfuc7krcqfimrmb9lsl5j@protonmail.com + recommendationsPlaylistId: + description: ID of the user's recommendation playlist. + type: + - 'null' + - string + example: '' + thumb: + type: string + description: URL to the user's avatar image. + example: 'https://plex.tv/users/3346028014e93acd/avatar?c=1731605021' + protected: + allOf: + - description: Indicates whether the account is protected. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + home: + allOf: + - description: Indicates if the user is part of a home group. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + allowTuners: + allOf: + - description: Indicates if the user is allowed to use tuners. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + allowSync: + allOf: + - description: Indicates if the user is allowed to sync media. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + allowCameraUpload: + allOf: + - description: Indicates if the user is allowed to upload from a camera. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + allowChannels: + allOf: + - description: Indicates if the user has access to channels. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + allowSubtitleAdmin: + allOf: + - description: Indicates if the user can manage subtitles. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + filterAll: + type: + - 'null' + - string + description: Filters applied for all content. + example: '' + filterMovies: + type: + - 'null' + - string + description: Filters applied for movies. + example: '' + filterMusic: + type: + - 'null' + - string + description: Filters applied for music. + example: '' + filterPhotos: + type: + - 'null' + - string + description: Filters applied for photos. + example: '' + filterTelevision: + type: string + description: Filters applied for television. + example: '' + restricted: + allOf: + - description: Indicates if the user has restricted access. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + Server: + type: array + description: List of servers owned by the user. + items: + type: object + required: + - id + - serverId + - machineIdentifier + - name + - lastSeenAt + - numLibraries + - allLibraries + - owned + - pending + properties: + id: + type: integer + description: Unique ID of the server of the connected user + example: 907759180 + serverId: + type: integer + description: ID of the actual Plex server. + example: 9999999 + machineIdentifier: + type: string + description: Machine identifier of the Plex server. + example: fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 + name: + type: string + description: Name of the Plex server of the connected user. + example: ConnectedUserFlix + lastSeenAt: + allOf: + - description: Timestamp of the last time the server was seen. + - type: + - integer + example: 1556281940 + description: Unix epoch datetime in seconds + format: int64 + numLibraries: + type: integer + description: Number of libraries in the server this user has access to. + example: 16 + allLibraries: + allOf: + - description: Indicates if the user has access to all libraries. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + owned: + allOf: + - description: Indicates if the user owns the server. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + pending: + allOf: + - description: Indicates if the server is pending approval. + - type: integer + format: int32 + enum: + - 0 + - 1 + example: 1 + default: 0 + x-speakeasy-enums: + - DISABLE + - ENABLE + '400': + description: 'Bad Request - A parameter was not specified, or was specified incorrectly.' + content: + application/json: + schema: + x-speakeasy-name-override: BadRequest + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1000 + message: + type: string + x-speakeasy-error-message: true + example: X-Plex-Client-Identifier is missing + status: + type: integer + format: int32 + example: 400 + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + content: + application/json: + schema: + x-speakeasy-name-override: Unauthorized + type: object + properties: + errors: + type: array + items: + type: object + properties: + code: + type: integer + format: int32 + example: 1001 + message: + type: string + x-speakeasy-error-message: true + example: User could not be authenticated + status: + type: integer + format: int32 + example: 401 + x-codeSamples: + - lang: php + label: users + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + use LukeHagar\Plex_API\Models\Operations; + + $sdk = Plex_API\PlexAPI::builder()->build(); + + $request = new Operations\GetUsersRequest( + clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58', + clientName: 'Plex for Roku', + deviceNickname: 'Roku 3', + deviceName: 'Chrome', + deviceScreenResolution: '1487x1165,2560x1440', + clientVersion: '2.4.1', + platform: 'Roku', + clientFeatures: 'external-media,indirect-media,hub-style-list', + model: '4200X', + xPlexSessionId: '97e136ef-4ddd-4ff3-89a7-a5820c96c2ca', + xPlexLanguage: 'en', + platformVersion: '4.3 build 1057', + xPlexToken: 'CV5xoxjTpFKUzBTShsaf', + ); + + $response = $sdk->users->getUsers( + request: $request + ); + + if ($response->body !== null) { + // handle response + } + - lang: ruby + label: users + source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n\nreq = ::PlexRubySDK::Operations::GetUsersRequest.new(\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n client_name: \"Plex for Roku\",\n device_nickname: \"Roku 3\",\n device_name: \"Chrome\",\n device_screen_resolution: \"1487x1165,2560x1440\",\n client_version: \"2.4.1\",\n platform: \"Roku\",\n client_features: \"external-media,indirect-media,hub-style-list\",\n model: \"4200X\",\n x_plex_session_id: \"97e136ef-4ddd-4ff3-89a7-a5820c96c2ca\",\n x_plex_language: \"en\",\n platform_version: \"4.3 build 1057\",\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.users.get_users(req)\n\nif ! res.body.nil?\n # handle response\nend" + - lang: go + label: users + source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Users.GetUsers(ctx, operations.GetUsersRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n DeviceName: plexgo.String(\"Chrome\"),\n DeviceScreenResolution: plexgo.String(\"1487x1165,2560x1440\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n ClientFeatures: plexgo.String(\"external-media,indirect-media,hub-style-list\"),\n Model: plexgo.String(\"4200X\"),\n XPlexSessionID: plexgo.String(\"97e136ef-4ddd-4ff3-89a7-a5820c96c2ca\"),\n XPlexLanguage: plexgo.String(\"en\"),\n PlatformVersion: plexgo.String(\"4.3 build 1057\"),\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Body != nil {\n // handle response\n }\n}" + - lang: java + label: users + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.errors.GetUsersBadRequest; + import dev.plexapi.plexapi.models.errors.GetUsersUnauthorized; + import dev.plexapi.plexapi.models.operations.GetUsersRequest; + import dev.plexapi.plexapi.models.operations.GetUsersResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception { + + PlexAPI sdk = PlexAPI.builder() + .build(); + + GetUsersRequest req = GetUsersRequest.builder() + .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + .xPlexToken("CV5xoxjTpFKUzBTShsaf") + .clientName("Plex for Roku") + .deviceNickname("Roku 3") + .deviceName("Chrome") + .deviceScreenResolution("1487x1165,2560x1440") + .clientVersion("2.4.1") + .platform("Roku") + .clientFeatures("external-media,indirect-media,hub-style-list") + .model("4200X") + .xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca") + .xPlexLanguage("en") + .platformVersion("4.3 build 1057") + .build(); + + GetUsersResponse res = sdk.users().getUsers() + .request(req) + .call(); + + if (res.body().isPresent()) { + // handle response + } + } + } + - lang: typescript + label: users + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.users.getUsers({ + clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", + clientName: "Plex for Roku", + deviceNickname: "Roku 3", + deviceName: "Chrome", + deviceScreenResolution: "1487x1165,2560x1440", + clientVersion: "2.4.1", + platform: "Roku", + clientFeatures: "external-media,indirect-media,hub-style-list", + model: "4200X", + xPlexSessionId: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", + xPlexLanguage: "en", + platformVersion: "4.3 build 1057", + xPlexToken: "CV5xoxjTpFKUzBTShsaf", + }); + + // Handle the result + console.log(result); + } + + run(); tags: - name: Activities description: |