Compare commits

...

135 Commits

Author SHA1 Message Date
speakeasybot
d2a1c188d5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.0 2025-02-07 00:10:35 +00:00
speakeasybot
6db5d8fb30 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 2025-02-06 00:10:27 +00:00
speakeasybot
89fbd6238e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.2 2025-01-28 00:10:16 +00:00
speakeasybot
7af7441ac7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.0 2025-01-25 00:10:13 +00:00
speakeasybot
d1945b544b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-23 00:10:53 +00:00
speakeasybot
16bb49d558 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-21 00:10:31 +00:00
speakeasybot
4bea7ae0d8 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.3 2024-11-14 00:10:23 +00:00
speakeasybot
da5491e935 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1 2024-11-12 00:10:16 +00:00
speakeasybot
aeebf438e1 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-04 00:10:38 +00:00
speakeasybot
dc815780a6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-03 00:10:47 +00:00
speakeasybot
636840a553 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 2024-10-01 00:11:35 +00:00
speakeasybot
c65c9e0cae ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.402.14 2024-09-26 00:10:34 +00:00
speakeasybot
95df2396e7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-22 00:11:12 +00:00
speakeasybot
f52d81d1f6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-21 00:10:16 +00:00
speakeasybot
d83bd96c5f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.2 2024-09-19 00:11:05 +00:00
speakeasybot
2289036c2b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.2 2024-09-18 15:03:35 +00:00
speakeasybot
a7eedd3598 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.1 2024-09-18 14:12:18 +00:00
speakeasybot
e579b8d23b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.0 2024-09-18 03:04:05 +00:00
speakeasybot
fd429e38e0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.2 2024-09-16 18:37:41 +00:00
Luke Hagar
2b4a59f67f Update workflow.yaml 2024-09-16 13:13:31 -05:00
speakeasybot
6268a854c1 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.9 2024-09-16 00:11:15 +00:00
speakeasybot
d061e9c253 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.9 2024-09-15 00:11:43 +00:00
speakeasybot
fcfb68eec7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.9 2024-09-14 00:10:26 +00:00
speakeasybot
37dabea51a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6 2024-09-13 00:11:01 +00:00
speakeasybot
f47e4b689b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.2 2024-09-12 00:10:54 +00:00
speakeasybot
04130d41d4 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.395.1 2024-09-11 00:10:56 +00:00
speakeasybot
393db01a6c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.394.0 2024-09-10 00:11:01 +00:00
speakeasybot
41621a4bbd ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.393.2 2024-09-09 20:37:28 +00:00
Luke Hagar
05f0b1a99a Merge branch 'main' of https://github.com/LukeHagar/plexgo 2024-09-09 18:31:13 +00:00
Luke Hagar
f00090bddf Merge pull request #2 from LukeHagar/speakeasy-sdk-regen-1725905844
chore: 🐝 Update SDK - Generate 0.11.1
2024-09-09 13:22:06 -05:00
speakeasybot
d8bcbcc30c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.393.1 2024-09-09 18:19:33 +00:00
Luke Hagar
0ce63f1ceb swapped to direct updates 2024-09-09 18:18:14 +00:00
Luke Hagar
da8b549711 fixed actions 2024-09-09 18:16:08 +00:00
Luke Hagar
3cfd677a46 regenerated with new spec 2024-09-09 18:15:22 +00:00
speakeasybot
e4db9f59ee ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.323.0 2024-07-01 15:44:08 +00:00
speakeasy-bot
79aced35cd Update push code samples in generation action 2024-07-01 15:42:28 +00:00
speakeasy-bot
2135733290 Create speakeasy tagging action workflow 2024-07-01 15:42:27 +00:00
speakeasy-bot
66d2bed79b Add code samples registry configuration 2024-07-01 15:42:27 +00:00
speakeasybot
42be0c1e5b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-07-01 00:11:58 +00:00
speakeasybot
4f8ae99d93 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-06-30 00:11:17 +00:00
speakeasybot
1802af77f6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-06-29 00:10:03 +00:00
speakeasybot
d77dabeb98 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.1 2024-06-28 00:10:18 +00:00
speakeasybot
7b82e1d5a3 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.321.0 2024-06-27 00:10:25 +00:00
speakeasybot
f677adc9a9 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.318.0 2024-06-26 00:10:15 +00:00
speakeasybot
9de12cb55c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.315.2 2024-06-25 00:10:05 +00:00
speakeasybot
52e3fd977d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-24 00:11:26 +00:00
speakeasybot
88cd5f17cf ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-23 00:11:03 +00:00
speakeasybot
6e9e5028bc ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-22 00:10:56 +00:00
speakeasybot
5fc7421ebf ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.308.1 2024-06-15 00:10:35 +00:00
speakeasybot
caedf0fada ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.307.2 2024-06-14 00:10:13 +00:00
speakeasybot
2e6d62cc3d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.306.0 2024-06-13 00:10:32 +00:00
speakeasybot
ee418c915d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.305.0 2024-06-12 00:51:55 +00:00
speakeasybot
89eb756371 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 2024-06-10 00:53:01 +00:00
speakeasybot
747f1cc472 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 2024-06-09 00:55:46 +00:00
speakeasybot
3caad468dc ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 2024-06-08 00:51:08 +00:00
speakeasybot
135f07bb5b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 2024-06-07 00:52:51 +00:00
speakeasybot
f713adaa5f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.0 2024-06-06 00:50:20 +00:00
speakeasybot
afd7c86d0b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.7 2024-06-05 00:50:36 +00:00
speakeasybot
a1c0bd593c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.6 2024-06-04 00:51:49 +00:00
speakeasybot
7f62aa433e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-03 00:51:39 +00:00
speakeasybot
d6b4319cf2 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-02 00:54:03 +00:00
speakeasybot
c487a62f2c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-01 00:53:37 +00:00
speakeasybot
d2d4cd1c5a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.3 2024-05-31 00:51:15 +00:00
speakeasybot
686079b3d5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.1 2024-05-30 00:50:06 +00:00
speakeasybot
8ebf35b969 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.296.1 2024-05-29 00:53:30 +00:00
speakeasybot
8558402eae ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.296.1 2024-05-28 00:49:49 +00:00
speakeasybot
89b2332133 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.296.1 2024-05-27 00:50:58 +00:00
speakeasybot
98cfef0ea2 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.296.1 2024-05-26 00:53:37 +00:00
speakeasybot
cb95b7e9ac ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.296.1 2024-05-25 00:47:52 +00:00
speakeasybot
e290570ac9 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.2 2024-05-24 00:50:32 +00:00
speakeasybot
764eb6c75a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.1 2024-05-23 15:57:50 +00:00
speakeasybot
11f26917b7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.1 2024-05-09 00:47:55 +00:00
speakeasybot
a34f15746e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.0 2024-05-08 18:15:46 +00:00
speakeasybot
12afbc6467 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.283.1 2024-05-08 00:39:09 +00:00
speakeasybot
8267c3fcbd ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.280.1 2024-05-07 00:47:31 +00:00
speakeasybot
3f2fc4fe8c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-06 00:48:33 +00:00
speakeasybot
21517ca298 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-05 00:51:13 +00:00
speakeasybot
d7fe60ed91 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-04 00:47:01 +00:00
speakeasybot
b09c6ad37a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.277.8 2024-05-03 00:50:55 +00:00
speakeasybot
6a5cd06342 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.277.4 2024-05-02 00:46:14 +00:00
speakeasybot
9531527f23 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.277.4 2024-05-01 00:51:24 +00:00
speakeasybot
db2b15241c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.277.0 2024-04-30 00:46:14 +00:00
speakeasybot
344db7cbcb ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.276.0 2024-04-29 00:47:45 +00:00
speakeasybot
af9748433a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.276.0 2024-04-28 00:51:17 +00:00
speakeasybot
8f332b739e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.276.0 2024-04-27 00:45:49 +00:00
speakeasybot
c504a2d46e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.274.1 2024-04-26 00:46:33 +00:00
speakeasybot
95d64024f2 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.274.1 2024-04-25 00:49:21 +00:00
speakeasybot
457b36fb49 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.271.0 2024-04-24 00:45:46 +00:00
Luke Hagar
8691720920 Added code samples and regenerated 2024-04-23 13:50:17 -05:00
Luke Hagar
205c454485 Update gen.yaml 2024-04-23 13:49:15 -05:00
Luke Hagar
71b5f4f4b7 Migrated to workflows 2024-04-23 13:48:49 -05:00
Luke Hagar
f3779b0079 Moved gen.yaml 2024-04-23 13:48:40 -05:00
Luke Hagar
0eaf609b40 Updated generation action 2024-04-23 13:48:31 -05:00
speakeasy-github[bot]
b0931cba2e chore: update dependencies 2024-04-22 16:15:36 +00:00
speakeasybot
d09f9292ce ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.267.2 2024-04-22 16:15:05 +00:00
speakeasy-github
9a382342e4 chore: update dependencies 2024-04-10 00:45:49 +00:00
speakeasybot
b8b984dc14 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.245.0 2024-04-10 00:45:10 +00:00
speakeasy-github
0de5991239 chore: update dependencies 2024-04-09 00:45:54 +00:00
speakeasybot
0ff88615e0 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.244.0 2024-04-09 00:45:22 +00:00
speakeasy-github
0eb6f2c692 chore: update dependencies 2024-04-03 00:45:14 +00:00
speakeasybot
0adacc0e13 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.235.0 2024-04-03 00:44:28 +00:00
speakeasy-github[bot]
ec6ef7db64 chore: update dependencies 2024-03-29 16:38:18 +00:00
speakeasybot
32a5beaae6 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.228.1 2024-03-29 16:37:36 +00:00
speakeasy-github
ea30334a95 chore: update dependencies 2024-03-27 00:44:58 +00:00
speakeasybot
f3eb760757 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.227.0 2024-03-27 00:44:22 +00:00
speakeasy-github
683823eab9 chore: update dependencies 2024-03-20 00:44:38 +00:00
speakeasybot
6942d6b905 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.213.0 2024-03-20 00:43:58 +00:00
speakeasy-github
1a7051235f chore: update dependencies 2024-03-13 00:46:09 +00:00
speakeasybot
68fedfa8fc ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.207.1 2024-03-13 00:44:54 +00:00
speakeasy-github
5916d2ace5 chore: update dependencies 2024-03-08 00:44:44 +00:00
speakeasybot
417454ebb2 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.204.1 2024-03-08 00:44:04 +00:00
Luke Hagar
992291fe20 Update LICENSE.md 2024-03-06 07:50:44 -06:00
speakeasy-github
515f318f05 chore: update dependencies 2024-03-02 00:43:31 +00:00
speakeasybot
8b81bc5692 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.200.0 2024-03-02 00:43:01 +00:00
speakeasy-github
9dd356ea91 chore: update dependencies 2024-02-27 00:44:01 +00:00
speakeasybot
efe42104bc ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.194.0 2024-02-27 00:43:22 +00:00
speakeasy-github
70001e1e72 chore: update dependencies 2024-02-24 00:42:39 +00:00
speakeasybot
0118475c63 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.4 2024-02-24 00:42:08 +00:00
speakeasy-bot
f812f82747 🐝 Add license. 2024-02-23 15:37:13 +00:00
speakeasy-bot
7b38f4ba85 🐝 Update gen.yaml 2024-02-23 15:37:12 +00:00
speakeasy-bot
7caa38277c 🐝 Update workflow file 2024-02-23 15:37:11 +00:00
speakeasy-github[bot]
2cfb7aefac chore: update dependencies 2024-02-23 14:47:13 +00:00
speakeasybot
41ce744f6d ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.0 2024-02-23 14:46:43 +00:00
speakeasybot
2b4d612003 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.166.1 2024-02-05 14:24:08 +00:00
speakeasy-bot
853bfe69d5 🐝 Add license. 2024-02-01 16:30:13 +00:00
speakeasy-bot
81cfd47570 🐝 Update gen.yaml 2024-02-01 16:30:13 +00:00
speakeasy-bot
44e551a11d 🐝 Update workflow file 2024-02-01 16:30:12 +00:00
speakeasybot
264d228db7 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.161.0 2024-02-01 00:46:59 +00:00
speakeasybot
c1bc2419c8 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.158.0 2024-01-31 15:06:07 +00:00
speakeasybot
471d850f17 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.150.0 2024-01-23 21:56:23 +00:00
speakeasybot
b3ac2d0c2e ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.150.0 2024-01-23 20:47:32 +00:00
speakeasybot
61283a5769 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.148.0 2024-01-22 17:16:34 +00:00
speakeasybot
70d2e2a152 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.148.0 2024-01-20 03:10:30 +00:00
speakeasybot
89e9047e5b ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.147.0 2024-01-19 17:28:27 +00:00
speakeasybot
79e46e9d00 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.147.0 2024-01-18 23:37:24 +00:00
988 changed files with 61514 additions and 7298 deletions

View File

@@ -11,18 +11,18 @@ permissions:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
languages: |
- go
mode: direct
openapi_docs: |
- https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
set_version: ${{ github.event.inputs.set_version }}
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

19
.github/workflows/sdk_publish.yaml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Publish
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
push:
branches:
- main
paths:
- RELEASES.md
- '*/RELEASES.md'
jobs:
publish:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.speakeasy/reports
# .gitignore

File diff suppressed because one or more lines are too long

View File

@@ -6,10 +6,18 @@ generation:
optionalPropertyRendering: withExample
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: false
nameResolutionDec2023: true
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
go:
version: 0.0.3
version: 0.18.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
flattenGlobalSecurity: true
imports:
option: openapi
@@ -21,5 +29,7 @@ go:
webhooks: models/webhooks
inputModelSuffix: input
maxMethodParams: 4
methodArguments: require-security-and-request
outputModelSuffix: output
packageName: github.com/LukeHagar/plexgo
responseFormat: envelope

39
.speakeasy/workflow.lock Normal file
View File

@@ -0,0 +1,39 @@
speakeasyVersion: 1.487.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:92a2a2049bfbf67bea601a6b1b77d274e83a2d3b6968a0bc02dc290b21c7689d
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
tags:
- latest
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
tags:
- latest
- speakeasy-sdk-regen-1738886963
targets:
plexgo:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
codeSamplesNamespace: code-samples-go-plexgo
codeSamplesRevisionDigest: sha256:e556c9b714f159036257d9405e7e72e55f72c2ad96b306a7ccaa287d4d33829c
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
targets:
plexgo:
target: go
source: plexapi
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo

14
.speakeasy/workflow.yaml Normal file
View File

@@ -0,0 +1,14 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
targets:
plexgo:
target: go
source: plexapi
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo

26
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,26 @@
# Contributing to This Repository
Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
## How to Report Issues
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
## Issue Triage and Upstream Fixes
We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
## Contact
If you have any questions or need further assistance, please feel free to reach out by opening an issue.
Thank you for your understanding and cooperation!
The Maintainers

View File

@@ -1,21 +1,7 @@
MIT License
Copyright 2024 Luke Hagar
Copyright (c) 2023 LukeHagar
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

350
README.md
View File

@@ -7,9 +7,63 @@
</a>
</div>
<!-- Start Summary [summary] -->
## Summary
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
# 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) | -
<!-- End Summary [summary] -->
<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [github.com/LukeHagar/plexgo](#githubcomlukehagarplexgo)
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
* [Documentation](#documentation)
* [SDKs](#sdks)
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Special Types](#special-types)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
<!-- End Table of Contents [toc] -->
<!-- Start SDK Installation [installation] -->
## SDK Installation
To add the SDK as a dependency to your project:
```bash
go get github.com/LukeHagar/plexgo
```
@@ -26,21 +80,20 @@ package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
@@ -52,28 +105,21 @@ func main() {
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations
### [Server](docs/sdks/server/README.md)
* [GetServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Server Capabilities
* [GetServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
* [GetAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
* [GetDevices](docs/sdks/server/README.md#getdevices) - Get Devices
* [GetServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
* [GetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
* [GetResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
* [GetServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
### [Media](docs/sdks/media/README.md)
* [MarkPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
* [MarkUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
* [UpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
<details open>
<summary>Available methods</summary>
### [Activities](docs/sdks/activities/README.md)
* [GetServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
* [CancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
### [Authentication](docs/sdks/authentication/README.md)
* [GetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
* [GetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
* [GetTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
* [PostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
### [Butler](docs/sdks/butler/README.md)
* [GetButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
@@ -85,27 +131,25 @@ func main() {
### [Hubs](docs/sdks/hubs/README.md)
* [GetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
* [GetRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
* [GetLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
### [Search](docs/sdks/search/README.md)
* [PerformSearch](docs/sdks/search/README.md#performsearch) - Perform a search
* [PerformVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
* [GetSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
### [Library](docs/sdks/library/README.md)
* [GetFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
* [GetRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added
* [GetLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
* [GetLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details
* [GetRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
* [GetAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
* [GetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
* [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [RefreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
* [GetLatestLibraryItems](docs/sdks/library/README.md#getlatestlibraryitems) - Get Latest Library Items
* [GetCommonLibraryItems](docs/sdks/library/README.md#getcommonlibraryitems) - Get Common Library Items
* [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
* [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
* [GetGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
* [GetCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
* [GetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
* [GetMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey
* [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
* [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
### [Log](docs/sdks/log/README.md)
@@ -114,6 +158,14 @@ func main() {
* [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
* [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
### [Media](docs/sdks/media/README.md)
* [MarkPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
* [MarkUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
* [UpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
* [GetBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
* [GetThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
### [Playlists](docs/sdks/playlists/README.md)
* [CreatePlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
@@ -126,10 +178,34 @@ func main() {
* [AddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
* [UploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
### [Security](docs/sdks/security/README.md)
### [Plex](docs/sdks/plex/README.md)
* [GetTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
* [GetSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
* [GetCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
* [GetUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
* [GetGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
* [GetHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
* [GetServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin
* [GetTokenByPinID](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
### [Search](docs/sdks/search/README.md)
* [PerformSearch](docs/sdks/search/README.md#performsearch) - Perform a search
* [PerformVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
* [GetSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
### [Server](docs/sdks/server/README.md)
* [GetServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
* [GetServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
* [GetAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
* [GetDevices](docs/sdks/server/README.md#getdevices) - Get Devices
* [GetServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
* [GetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
* [GetResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
* [GetMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
* [GetServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
### [Sessions](docs/sdks/sessions/README.md)
@@ -138,27 +214,134 @@ func main() {
* [GetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
* [StopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
### [Statistics](docs/sdks/statistics/README.md)
* [GetStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
* [GetResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
* [GetBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
### [Updater](docs/sdks/updater/README.md)
* [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
* [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
* [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
### [Users](docs/sdks/users/README.md)
* [GetUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users
### [Video](docs/sdks/video/README.md)
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
* [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
### [Watchlist](docs/sdks/watchlist/README.md)
* [GetWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
</details>
<!-- End Available Resources and Operations [operations] -->
<!-- Start Retries [retries] -->
## Retries
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a `retry.Config` object to the call by using the `WithRetries` option:
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/retry"
"log"
"models/operations"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Server.GetServerCapabilities(ctx, operations.WithRetries(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
InitialInterval: 1,
MaxInterval: 50,
Exponent: 1.1,
MaxElapsedTime: 100,
},
RetryConnectionErrors: false,
}))
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
If you'd like to override the default retry strategy for all operations that support retries, you can use the `WithRetryConfig` option at SDK initialization:
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/retry"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithRetryConfig(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
InitialInterval: 1,
MaxInterval: 50,
Exponent: 1.1,
MaxElapsedTime: 100,
},
RetryConnectionErrors: false,
}),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
<!-- End Retries [retries] -->
<!-- Start Error Handling [errors] -->
## Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both.
| Error Object | Status Code | Content Type |
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
| sdkerrors.GetServerCapabilitiesResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation.
For example, the `GetServerCapabilities` function may return the following errors:
| Error Type | Status Code | Content Type |
| ------------------------------------------- | ----------- | ---------------- |
| sdkerrors.GetServerCapabilitiesBadRequest | 400 | application/json |
| sdkerrors.GetServerCapabilitiesUnauthorized | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
### Example
@@ -169,21 +352,27 @@ import (
"context"
"errors"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
var e *sdkerrors.GetServerCapabilitiesResponseBody
var e *sdkerrors.GetServerCapabilitiesBadRequest
if errors.As(err, &e) {
// handle error
log.Fatal(e.Error())
}
var e *sdkerrors.GetServerCapabilitiesUnauthorized
if errors.As(err, &e) {
// handle error
log.Fatal(e.Error())
@@ -203,38 +392,37 @@ func main() {
<!-- Start Server Selection [server] -->
## Server Selection
### Select Server by Index
### Server Variables
You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following options are available when initializing the SDK client instance:
* `WithProtocol(protocol ServerProtocol)`
* `WithIP(ip string)`
* `WithPort(port string)`
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
#### Example
### Override Server URL Per-Client
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithServerIndex(0),
plexgo.WithServerURL("https://10.10.10.47:32400"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
@@ -242,39 +430,31 @@ func main() {
```
#### Variables
### Override Server URL Per-Operation
Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so:
* `WithProtocol plexgo.ServerProtocol`
* `WithIP string`
* `WithPort string`
### Override Server URL Per-Client
The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
res, err := s.Plex.GetCompanionsData(ctx, operations.WithServerURL("https://plex.tv/api/v2"))
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
if res.ResponseBodies != nil {
// handle response
}
}
@@ -318,9 +498,9 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
| ------------- | ------------- | ------------- |
| `AccessToken` | apiKey | API key |
| Name | Type | Scheme |
| ------------- | ------ | ------- |
| `AccessToken` | apiKey | API key |
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
```go
@@ -333,16 +513,16 @@ import (
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
@@ -354,7 +534,27 @@ func main() {
<!-- Start Special Types [types] -->
## Special Types
This SDK defines the following custom types to assist with marshalling and unmarshalling data.
### Date
`types.Date` is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02".
#### Usage
```go
d1 := types.NewDate(time.Now()) // returns *types.Date
d2 := types.DateFromTime(time.Now()) // returns types.Date
d3, err := types.NewDateFromString("2019-01-01") // returns *types.Date, error
d4, err := types.DateFromString("2019-01-01") // returns types.Date, error
d5 := types.MustNewDateFromString("2019-01-01") // returns *types.Date and panics on error
d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on error
```
<!-- End Special Types [types] -->
<!-- Placeholder for Future Speakeasy SDK Sections -->

File diff suppressed because it is too large Load Diff

View File

@@ -5,21 +5,20 @@ package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}

View File

@@ -1,4 +1,4 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package plexgo
@@ -6,12 +6,13 @@ import (
"bytes"
"context"
"fmt"
"github.com/LukeHagar/plexgo/internal/hooks"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"io"
"github.com/LukeHagar/plexgo/retry"
"net/http"
"strings"
"net/url"
)
// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
@@ -33,45 +34,167 @@ func newActivities(sdkConfig sdkConfiguration) *Activities {
// GetServerActivities - Get Server Activities
// Get Server Activities
func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetServerActivitiesResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url := strings.TrimSuffix(baseURL, "/") + "/activities"
func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/activities")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("error sending request: %w", err)
}
if httpRes == nil {
return nil, fmt.Errorf("error sending request: no response")
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
contentType := httpRes.Header.Get("Content-Type")
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetServerActivitiesResponse{
StatusCode: httpRes.StatusCode,
ContentType: contentType,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(contentType, `application/json`):
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.GetServerActivitiesResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
@@ -79,98 +202,304 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
res.Object = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out sdkerrors.GetServerActivitiesResponseBody
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
out.RawResponse = httpRes
return nil, &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetServerActivitiesUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// CancelServerActivities - Cancel Server Activities
// Cancel Server Activities
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string) (*operations.CancelServerActivitiesResponse, error) {
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string, opts ...operations.Option) (*operations.CancelServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "cancelServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.CancelServerActivitiesRequest{
ActivityUUID: activityUUID,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil)
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("error sending request: %w", err)
}
if httpRes == nil {
return nil, fmt.Errorf("error sending request: no response")
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
contentType := httpRes.Header.Get("Content-Type")
res := &operations.CancelServerActivitiesResponse{
StatusCode: httpRes.StatusCode,
ContentType: contentType,
RawResponse: httpRes,
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out sdkerrors.CancelServerActivitiesResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.CancelServerActivitiesResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.CancelServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.CancelServerActivitiesUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}

985
authentication.go Normal file
View File

@@ -0,0 +1,985 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package plexgo
import (
"bytes"
"context"
"fmt"
"github.com/LukeHagar/plexgo/internal/hooks"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"github.com/LukeHagar/plexgo/retry"
"net/http"
"net/url"
)
// Authentication - API Calls regarding authentication for Plex Media Server
type Authentication struct {
sdkConfiguration sdkConfiguration
}
func newAuthentication(sdkConfig sdkConfiguration) *Authentication {
return &Authentication{
sdkConfiguration: sdkConfig,
}
}
// GetTransientToken - Get a Transient Token
// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope, opts ...operations.Option) (*operations.GetTransientTokenResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTransientToken",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetTransientTokenRequest{
Type: type_,
Scope: scope,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/security/token")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetTransientTokenResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetTransientTokenBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetTransientTokenUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// GetSourceConnectionInformation - Get Source Connection Information
// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
// Note: requires Plex Media Server >= 1.15.4.
func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string, opts ...operations.Option) (*operations.GetSourceConnectionInformationResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSourceConnectionInformation",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSourceConnectionInformationRequest{
Source: source,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/security/resources")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetSourceConnectionInformationResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetSourceConnectionInformationBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetSourceConnectionInformationUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// GetTokenDetails - Get Token Details
// Get the User data from the provided X-Plex-Token
func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTokenDetails",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(operations.GetTokenDetailsServerList[0], map[string]string{})
if o.ServerURL != nil {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/user")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetTokenDetailsResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.GetTokenDetailsUserPlexAccount
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.UserPlexAccount = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetTokenDetailsBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetTokenDetailsUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// PostUsersSignInData - Get User Sign In Data
// Sign in user with username and password and return user data with Plex authentication token
func (s *Authentication) PostUsersSignInData(ctx context.Context, request operations.PostUsersSignInDataRequest, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "post-users-sign-in-data",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(operations.PostUsersSignInDataServerList[0], map[string]string{})
if o.ServerURL != nil {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/users/signin")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`)
if err != nil {
return nil, err
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if reqContentType != "" {
req.Header.Set("Content-Type", reqContentType)
}
utils.PopulateHeaders(ctx, req, request, nil)
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.PostUsersSignInDataResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 201:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.PostUsersSignInDataUserPlexAccount
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.UserPlexAccount = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.PostUsersSignInDataBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.PostUsersSignInDataUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}

1217
butler.go

File diff suppressed because it is too large Load Diff

479
codeSamples.yaml Normal file
View File

@@ -0,0 +1,479 @@
overlay: 1.0.0
info:
title: CodeSamples overlay for go target
version: 0.0.0
actions:
- target: $["paths"]["/"]["get"]
update:
x-codeSamples:
- lang: go
label: getServerCapabilities
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/:/prefs"]["get"]
update:
x-codeSamples:
- lang: go
label: getServerPreferences
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/:/progress"]["post"]
update:
x-codeSamples:
- lang: go
label: updatePlayProgress
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Media.UpdatePlayProgress(ctx, \"<key>\", 90000, \"played\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
- target: $["paths"]["/:/scrobble"]["get"]
update:
x-codeSamples:
- lang: go
label: markPlayed
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/:/timeline"]["get"]
update:
x-codeSamples:
- lang: go
label: getTimeline
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/:/unscrobble"]["get"]
update:
x-codeSamples:
- lang: go
label: markUnplayed
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/activities"]["get"]
update:
x-codeSamples:
- lang: go
label: getServerActivities
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/activities/{activityUUID}"]["delete"]
update:
x-codeSamples:
- lang: go
label: cancelServerActivities
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/butler"]["delete"]
update:
x-codeSamples:
- lang: go
label: stopAllTasks
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/butler"]["get"]
update:
x-codeSamples:
- lang: go
label: getButlerTasks
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/butler"]["post"]
update:
x-codeSamples:
- lang: go
label: startAllTasks
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/butler/{taskName}"]["delete"]
update:
x-codeSamples:
- lang: go
label: stopTask
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/butler/{taskName}"]["post"]
update:
x-codeSamples:
- lang: go
label: startTask
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/clients"]["get"]
update:
x-codeSamples:
- lang: go
label: getAvailableClients
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/companions"]["get"]
update:
x-codeSamples:
- lang: go
label: getCompanionsData
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/devices"]["get"]
update:
x-codeSamples:
- lang: go
label: getDevices
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/friends"]["get"]
update:
x-codeSamples:
- lang: go
label: getUserFriends
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/geoip"]["get"]
update:
x-codeSamples:
- lang: go
label: getGeoData
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}"
- target: $["paths"]["/home"]["get"]
update:
x-codeSamples:
- lang: go
label: getHomeData
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/hubs"]["get"]
update:
x-codeSamples:
- lang: go
label: getGlobalHubs
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/hubs/home/recentlyAdded"]["get"]
update:
x-codeSamples:
- 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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/hubs/search"]["get"]
update:
x-codeSamples:
- lang: go
label: performSearch
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/hubs/search/voice"]["get"]
update:
x-codeSamples:
- lang: go
label: performVoiceSearch
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
update:
x-codeSamples:
- lang: go
label: getLibraryHubs
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/identity"]["get"]
update:
x-codeSamples:
- lang: go
label: identity
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}"
- target: $["paths"]["/library/all/top"]["get"]
update:
x-codeSamples:
- lang: go
label: getTopWatchedContent
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/hashes"]["get"]
update:
x-codeSamples:
- lang: go
label: getFileHash
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/metadata/{ratingKey}"]["get"]
update:
x-codeSamples:
- lang: go
label: key
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetMetaDataByRatingKey(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
update:
x-codeSamples:
- lang: go
label: image
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"]
update:
x-codeSamples:
- lang: go
label: getMetadataChildren
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
update:
x-codeSamples:
- lang: go
label: image
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/onDeck"]["get"]
update:
x-codeSamples:
- lang: go
label: getOnDeck
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/recentlyAdded"]["get"]
update:
x-codeSamples:
- 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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/search"]["get"]
update:
x-codeSamples:
- lang: go
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{\n Query: \"<value>\",\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}"
- target: $["paths"]["/library/sections"]["get"]
update:
x-codeSamples:
- lang: go
label: libraries
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/watchlist/{filter}"]["get"]
update:
x-codeSamples:
- lang: go
label: list
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/{sectionKey}"]["delete"]
update:
x-codeSamples:
- lang: go
label: deleteLibrary
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/{sectionKey}"]["get"]
update:
x-codeSamples:
- lang: go
label: details
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/{sectionKey}/country"]["get"]
update:
x-codeSamples:
- lang: go
label: library
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetCountriesLibrary(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"]
update:
x-codeSamples:
- lang: go
label: library
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetGenresLibrary(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"]
update:
x-codeSamples:
- lang: go
label: metadata
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/{sectionKey}/search"]["get"]
update:
x-codeSamples:
- 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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"]
update:
x-codeSamples:
- lang: go
label: items
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{\n Tag: operations.TagEdition,\n Type: operations.GetLibraryItemsQueryParamTypeTvShow.ToPointer(),\n SectionKey: 9518,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/log"]["get"]
update:
x-codeSamples:
- lang: go
label: logLine
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/log"]["post"]
update:
x-codeSamples:
- lang: go
label: logMultiLine
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/log/networked"]["get"]
update:
x-codeSamples:
- lang: go
label: enablePaperTrail
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/media/providers"]["get"]
update:
x-codeSamples:
- lang: go
label: providers
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/myplex/account"]["get"]
update:
x-codeSamples:
- lang: go
label: getMyPlexAccount
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/photo/:/transcode"]["get"]
update:
x-codeSamples:
- lang: go
label: getResizedPhoto
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/pins"]["post"]
update:
x-codeSamples:
- lang: go
label: getPin
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}"
- target: $["paths"]["/pins/{pinID}"]["get"]
update:
x-codeSamples:
- lang: go
label: getTokenByPinId
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}"
- target: $["paths"]["/playlists"]["get"]
update:
x-codeSamples:
- lang: go
label: getPlaylists
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists"]["post"]
update:
x-codeSamples:
- lang: go
label: createPlaylist
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(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{\n Title: \"<value>\",\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}"
- target: $["paths"]["/playlists/upload"]["post"]
update:
x-codeSamples:
- lang: go
label: uploadPlaylist
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}"]["delete"]
update:
x-codeSamples:
- lang: go
label: deletePlaylist
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}"]["get"]
update:
x-codeSamples:
- lang: go
label: getPlaylist
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}"]["put"]
update:
x-codeSamples:
- lang: go
label: updatePlaylist
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}/items"]["delete"]
update:
x-codeSamples:
- lang: go
label: clearPlaylistContents
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}/items"]["get"]
update:
x-codeSamples:
- lang: go
label: getPlaylistContents
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/playlists/{playlistID}/items"]["put"]
update:
x-codeSamples:
- lang: go
label: addPlaylistContents
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/resources"]["get"]
update:
x-codeSamples:
- lang: go
label: resources
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/search"]["get"]
update:
x-codeSamples:
- lang: go
label: getSearchResults
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/security/resources"]["get"]
update:
x-codeSamples:
- lang: go
label: getSourceConnectionInformation
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/security/token"]["get"]
update:
x-codeSamples:
- lang: go
label: getTransientToken
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/servers"]["get"]
update:
x-codeSamples:
- lang: go
label: getServerList
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/statistics/bandwidth"]["get"]
update:
x-codeSamples:
- lang: go
label: getBandwidthStatistics
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/statistics/media"]["get"]
update:
x-codeSamples:
- lang: go
label: getStatistics
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/statistics/resources"]["get"]
update:
x-codeSamples:
- lang: go
label: getResourcesStatistics
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/status/sessions"]["get"]
update:
x-codeSamples:
- lang: go
label: getSessions
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/status/sessions/history/all"]["get"]
update:
x-codeSamples:
- lang: go
label: getSessionHistory
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/transcode/sessions"]["get"]
update:
x-codeSamples:
- lang: go
label: getTranscodeSessions
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"]
update:
x-codeSamples:
- lang: go
label: stopTranscodeSession
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/updater/apply"]["put"]
update:
x-codeSamples:
- lang: go
label: applyUpdates
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/updater/check"]["put"]
update:
x-codeSamples:
- lang: go
label: checkForUpdates
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/updater/status"]["get"]
update:
x-codeSamples:
- lang: go
label: getUpdateStatus
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/user"]["get"]
update:
x-codeSamples:
- lang: go
label: getTokenDetails
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(\"<YOUR_API_KEY_HERE>\"),\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}"
- target: $["paths"]["/users"]["get"]
update:
x-codeSamples:
- 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}"
- target: $["paths"]["/users/signin"]["post"]
update:
x-codeSamples:
- 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\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}"
- target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"]
update:
x-codeSamples:
- lang: go
label: startUniversalTranscode
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(\"<YOUR_API_KEY_HERE>\"),\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}"

View File

@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `AccessToken` | *string* | :heavy_check_mark: | N/A |
| `AccessToken` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,15 @@
# Account
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 238960586 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
| `Name` | **string* | :heavy_minus_sign: | N/A | Diane |
| `DefaultAudioLanguage` | **string* | :heavy_minus_sign: | N/A | en |
| `AutoSelectAudio` | **bool* | :heavy_minus_sign: | N/A | true |
| `DefaultSubtitleLanguage` | **string* | :heavy_minus_sign: | N/A | en |
| `SubtitleMode` | **int* | :heavy_minus_sign: | N/A | 1 |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |

View File

@@ -0,0 +1,9 @@
# Action
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `ID` | *string* | :heavy_check_mark: | N/A | addToContinueWatching |
| `Key` | *string* | :heavy_check_mark: | N/A | /actions/addToContinueWatching |

View File

@@ -0,0 +1,12 @@
# ActiveDirection
The direction of the sort. Can be either `asc` or `desc`.
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `ActiveDirectionAscending` | asc |
| `ActiveDirectionDescending` | desc |

View File

@@ -0,0 +1,11 @@
# AddPlaylistContentsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `Size` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LeafCountAdded` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LeafCountRequested` | **int* | :heavy_minus_sign: | N/A | 1 |
| `Metadata` | [][operations.AddPlaylistContentsMetadata](../../models/operations/addplaylistcontentsmetadata.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,20 @@
# AddPlaylistContentsMetadata
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 94 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/94/items |
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2 |
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
| `Title` | **string* | :heavy_minus_sign: | N/A | A great playlist |
| `Summary` | **string* | :heavy_minus_sign: | N/A | One of my great playlists |
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/94/composite/1705800070 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 423000 |
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 3 |
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705716458 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705800070 |

View File

@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `PlaylistID` | *float64* | :heavy_check_mark: | the ID of the playlist | |
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist | library://.. |
| `PlayQueueID` | *float64* | :heavy_check_mark: | the play queue to add to a playlist | 123 |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
| `PlaylistID` | *float64* | :heavy_check_mark: | the ID of the playlist | |
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 |
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to add to a playlist | 123 |

View File

@@ -3,8 +3,9 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.AddPlaylistContentsResponseBody](../../models/operations/addplaylistcontentsresponsebody.md) | :heavy_minus_sign: | Playlist Updated |

View File

@@ -0,0 +1,10 @@
# AddPlaylistContentsResponseBody
Playlist Updated
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.AddPlaylistContentsMediaContainer](../../models/operations/addplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# AllLibraries
Indicates if the user has access to all libraries.
## Values
| Name | Value |
| --------------------- | --------------------- |
| `AllLibrariesDisable` | 0 |
| `AllLibrariesEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowCameraUpload
Indicates if the user is allowed to upload from a camera.
## Values
| Name | Value |
| -------------------------- | -------------------------- |
| `AllowCameraUploadDisable` | 0 |
| `AllowCameraUploadEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowChannels
Indicates if the user has access to channels.
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `AllowChannelsDisable` | 0 |
| `AllowChannelsEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowSubtitleAdmin
Indicates if the user can manage subtitles.
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `AllowSubtitleAdminDisable` | 0 |
| `AllowSubtitleAdminEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowSync
Indicates if the user is allowed to sync media.
## Values
| Name | Value |
| ------------------ | ------------------ |
| `AllowSyncDisable` | 0 |
| `AllowSyncEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowTuners
Indicates if the user is allowed to use tuners.
## Values
| Name | Value |
| -------------------- | -------------------- |
| `AllowTunersDisable` | 0 |
| `AllowTunersEnable` | 1 |

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 |

View File

@@ -0,0 +1,11 @@
# AutoSelectSubtitle
The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `AutoSelectSubtitleDisable` | 0 |
| `AutoSelectSubtitleEnable` | 1 |

View File

@@ -0,0 +1,9 @@
# Billing
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `InternalPaymentMethod` | [operations.InternalPaymentMethod](../../models/operations/internalpaymentmethod.md) | :heavy_check_mark: | N/A |
| `PaymentMethodID` | *int64* | :heavy_check_mark: | N/A |

View File

@@ -3,6 +3,6 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
| Field | Type | Required | Description | Example |
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |

View File

@@ -3,6 +3,6 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |

View File

@@ -0,0 +1,8 @@
# Collection
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Working NL Subs |

View File

@@ -0,0 +1,14 @@
# Connections
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `Protocol` | [operations.Protocol](../../models/operations/protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) | http |
| `Address` | *string* | :heavy_check_mark: | The (ip) address or domain name used for the connection | |
| `Port` | *int* | :heavy_check_mark: | The port used for the connection | |
| `URI` | *string* | :heavy_check_mark: | The full URI of the connection | |
| `Local` | *bool* | :heavy_check_mark: | If the connection is local address | |
| `Relay` | *bool* | :heavy_check_mark: | If the connection is relayed through plex.direct | |
| `IPv6` | *bool* | :heavy_check_mark: | If the connection is using IPv6 | |

View File

@@ -0,0 +1,9 @@
# CreatePlaylistMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `Size` | **int* | :heavy_minus_sign: | N/A | 7 |
| `Metadata` | [][operations.CreatePlaylistMetadata](../../models/operations/createplaylistmetadata.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,23 @@
# CreatePlaylistMetadata
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 96 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/96/items |
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55 |
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
| `Title` | **string* | :heavy_minus_sign: | N/A | A Great Playlist |
| `Summary` | **string* | :heavy_minus_sign: | N/A | What a great playlist |
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1705719589 |
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705719589 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705724593 |
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/96/composite/1705724593 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141000 |

View File

@@ -0,0 +1,12 @@
# CreatePlaylistQueryParamType
type of playlist to create
## Values
| Name | Value |
| ----------------------------------- | ----------------------------------- |
| `CreatePlaylistQueryParamTypeAudio` | audio |
| `CreatePlaylistQueryParamTypeVideo` | video |
| `CreatePlaylistQueryParamTypePhoto` | photo |

View File

@@ -3,10 +3,10 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `Title` | *string* | :heavy_check_mark: | name of the playlist |
| `Type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | type of playlist to create |
| `Smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
| `URI` | **string* | :heavy_minus_sign: | the content URI for the playlist |
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `Title` | *string* | :heavy_check_mark: | name of the playlist |
| `Type` | [operations.CreatePlaylistQueryParamType](../../models/operations/createplaylistqueryparamtype.md) | :heavy_check_mark: | type of playlist to create |
| `Smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist |
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist |

View File

@@ -3,8 +3,9 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.CreatePlaylistResponseBody](../../models/operations/createplaylistresponsebody.md) | :heavy_minus_sign: | returns all playlists |

View File

@@ -0,0 +1,10 @@
# CreatePlaylistResponseBody
returns all playlists
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.CreatePlaylistMediaContainer](../../models/operations/createplaylistmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,12 @@
# DefaultDirection
The direction of the sort. Can be either `asc` or `desc`.
## Values
| Name | Value |
| ---------------------------- | ---------------------------- |
| `DefaultDirectionAscending` | asc |
| `DefaultDirectionDescending` | desc |

View File

@@ -0,0 +1,11 @@
# DefaultSubtitleAccessibility
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
## Values
| Name | Value |
| ------------------------------------- | ------------------------------------- |
| `DefaultSubtitleAccessibilityDisable` | 0 |
| `DefaultSubtitleAccessibilityEnable` | 1 |

View File

@@ -0,0 +1,11 @@
# DefaultSubtitleForced
The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
## Values
| Name | Value |
| ------------------------------ | ------------------------------ |
| `DefaultSubtitleForcedDisable` | 0 |
| `DefaultSubtitleForcedEnable` | 1 |

View File

@@ -3,6 +3,6 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query | 1000 |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -5,4 +5,4 @@
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Peyton Reed |
| `Tag` | **string* | :heavy_minus_sign: | N/A | James Cameron |

View File

@@ -0,0 +1,11 @@
# EnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `EnableCreditsMarkerGenerationLibraryDefault` | -1 |
| `EnableCreditsMarkerGenerationDisabled` | 0 |

View File

@@ -0,0 +1,12 @@
# EpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `EpisodeSortLibraryDefault` | -1 |
| `EpisodeSortOldestFirst` | 0 |
| `EpisodeSortNewestFirst` | 1 |

View File

@@ -0,0 +1,14 @@
# Feature
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | |
| `Type` | *string* | :heavy_check_mark: | N/A | |
| `Flavor` | **string* | :heavy_minus_sign: | N/A | global |
| `ScrobbleKey` | **string* | :heavy_minus_sign: | N/A | /:/scrobble/new |
| `UnscrobbleKey` | **string* | :heavy_minus_sign: | N/A | /:/unscrobble/new |
| `Directory` | [][operations.GetMediaProvidersDirectory](../../models/operations/getmediaprovidersdirectory.md) | :heavy_minus_sign: | N/A | |
| `Action` | [][operations.Action](../../models/operations/action.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,11 @@
# Field
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | *string* | :heavy_check_mark: | N/A | show.title |
| `Title` | *string* | :heavy_check_mark: | N/A | Show Title |
| `Type` | *string* | :heavy_check_mark: | N/A | string |
| `SubType` | **string* | :heavy_minus_sign: | N/A | rating |

View File

@@ -0,0 +1,9 @@
# FieldType
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `Type` | *string* | :heavy_check_mark: | N/A | tag |
| `Operator` | [][operations.Operator](../../models/operations/operator.md) | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# Filter
Filter
## Values
| Name | Value |
| ----------------- | ----------------- |
| `FilterAll` | all |
| `FilterAvailable` | available |
| `FilterReleased` | released |

View File

@@ -0,0 +1,12 @@
# FlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Values
| Name | Value |
| ------------------------------ | ------------------------------ |
| `FlattenSeasonsLibraryDefault` | -1 |
| `FlattenSeasonsHide` | 0 |
| `FlattenSeasonsShow` | 1 |

View File

@@ -1,8 +1,6 @@
# Force
force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
Force the refresh even if the library is already being refreshed.
## Values

View File

@@ -0,0 +1,19 @@
# Friend
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `Email` | *string* | :heavy_check_mark: | The account email address | username@email.com |
| `FriendlyName` | *string* | :heavy_check_mark: | The account full name | exampleUser |
| `Home` | *bool* | :heavy_check_mark: | If the account is a Plex Home user | |
| `ID` | *int* | :heavy_check_mark: | The Plex account ID | |
| `Restricted` | **bool* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
| `SharedServers` | [][operations.SharedServers](../../models/operations/sharedservers.md) | :heavy_check_mark: | N/A | |
| `SharedSources` | [][operations.SharedSources](../../models/operations/sharedsources.md) | :heavy_check_mark: | N/A | |
| `Status` | [operations.Status](../../models/operations/status.md) | :heavy_check_mark: | Current friend request status | accepted |
| `Thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 |
| `Title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 |
| `Username` | *string* | :heavy_check_mark: | The account username | username123 |
| `UUID` | *string* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b |

View File

@@ -5,4 +5,4 @@
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Comedy |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Adventure |

View File

@@ -0,0 +1,20 @@
# GeoData
Geo location data
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI |
| `ContinentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA |
| `Country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands |
| `City` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam |
| `EuropeanUnionMember` | **bool* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
| `TimeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
| `PostalCode` | *string* | :heavy_check_mark: | The postal code of the location. | 802 |
| `InPrivacyRestrictedCountry` | **bool* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
| `InPrivacyRestrictedRegion` | **bool* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
| `Subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
| `Coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 |

View File

@@ -0,0 +1,28 @@
# GetAllLibrariesDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | true |
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
| `Composite` | *string* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
| `Filters` | *bool* | :heavy_check_mark: | N/A | true |
| `Refreshing` | *bool* | :heavy_check_mark: | N/A | false |
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png |
| `Key` | *string* | :heavy_check_mark: | N/A | 1 |
| `Type` | *string* | :heavy_check_mark: | N/A | movie |
| `Title` | *string* | :heavy_check_mark: | N/A | Movies |
| `Agent` | *string* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
| `Scanner` | *string* | :heavy_check_mark: | N/A | Plex Movie |
| `Language` | *string* | :heavy_check_mark: | N/A | en-US |
| `UUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `UpdatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `CreatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `ScannedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `Content` | *bool* | :heavy_check_mark: | N/A | true |
| `Directory` | *bool* | :heavy_check_mark: | N/A | true |
| `ContentChangedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `Hidden` | *int* | :heavy_check_mark: | N/A | 0 |
| `Location` | [][operations.GetAllLibrariesLocation](../../models/operations/getalllibrarieslocation.md) | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,9 @@
# GetAllLibrariesLocation
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `ID` | *int* | :heavy_check_mark: | N/A | 1 |
| `Path` | *string* | :heavy_check_mark: | N/A | /movies |

View File

@@ -0,0 +1,11 @@
# GetAllLibrariesMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `Size` | *int* | :heavy_check_mark: | N/A | 5 |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
| `Title1` | *string* | :heavy_check_mark: | N/A | Plex Library |
| `Directory` | [][operations.GetAllLibrariesDirectory](../../models/operations/getalllibrariesdirectory.md) | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,11 @@
# GetAllLibrariesResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetAllLibrariesResponseBody](../../models/operations/getalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server |

View File

@@ -0,0 +1,10 @@
# GetAllLibrariesResponseBody
The libraries available on the Server
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [operations.GetAllLibrariesMediaContainer](../../models/operations/getalllibrariesmediacontainer.md) | :heavy_check_mark: | N/A |

View File

@@ -3,9 +3,9 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `ResponseBodies` | [][operations.ResponseBody](../../models/operations/responsebody.md) | :heavy_minus_sign: | Available Clients |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetAvailableClientsResponseBody](../../models/operations/getavailableclientsresponsebody.md) | :heavy_minus_sign: | Available Clients |

View File

@@ -0,0 +1,10 @@
# GetAvailableClientsResponseBody
Available Clients
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetAvailableClientsMediaContainer](../../models/operations/getavailableclientsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,15 @@
# GetBandwidthStatisticsAccount
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 238960586 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
| `Name` | **string* | :heavy_minus_sign: | N/A | Diane |
| `DefaultAudioLanguage` | **string* | :heavy_minus_sign: | N/A | en |
| `AutoSelectAudio` | **bool* | :heavy_minus_sign: | N/A | true |
| `DefaultSubtitleLanguage` | **string* | :heavy_minus_sign: | N/A | en |
| `SubtitleMode` | **int* | :heavy_minus_sign: | N/A | 1 |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |

View File

@@ -0,0 +1,12 @@
# GetBandwidthStatisticsDevice
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 208 |
| `Name` | **string* | :heavy_minus_sign: | N/A | Roku Express |
| `Platform` | **string* | :heavy_minus_sign: | N/A | Roku |
| `ClientIdentifier` | **string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 |
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1706470556 |

View File

@@ -0,0 +1,11 @@
# GetBandwidthStatisticsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `Size` | **int* | :heavy_minus_sign: | N/A | 5497 |
| `Device` | [][operations.GetBandwidthStatisticsDevice](../../models/operations/getbandwidthstatisticsdevice.md) | :heavy_minus_sign: | N/A | |
| `Account` | [][operations.GetBandwidthStatisticsAccount](../../models/operations/getbandwidthstatisticsaccount.md) | :heavy_minus_sign: | N/A | |
| `StatisticsBandwidth` | [][operations.StatisticsBandwidth](../../models/operations/statisticsbandwidth.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetBandwidthStatisticsRequest
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `Timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |

View File

@@ -0,0 +1,11 @@
# GetBandwidthStatisticsResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetBandwidthStatisticsResponseBody](../../models/operations/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics |

View File

@@ -0,0 +1,10 @@
# GetBandwidthStatisticsResponseBody
Bandwidth Statistics
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetBandwidthStatisticsMediaContainer](../../models/operations/getbandwidthstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,13 @@
# GetBannerImageRequest
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 |
| `Width` | *int64* | :heavy_check_mark: | N/A | 396 |
| `Height` | *int64* | :heavy_check_mark: | N/A | 396 |
| `MinSize` | *int64* | :heavy_check_mark: | N/A | 1 |
| `Upscale` | *int64* | :heavy_check_mark: | N/A | 1 |
| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf |

View File

@@ -1,4 +1,4 @@
# GetLibraryResponse
# GetBannerImageResponse
## Fields
@@ -7,4 +7,6 @@
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `ResponseStream` | *io.ReadCloser* | :heavy_minus_sign: | Successful response returning an image |
| `Headers` | map[string][]*string* | :heavy_check_mark: | N/A |

View File

@@ -1,10 +0,0 @@
# GetCommonLibraryItemsRequest
## Fields
| Field | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query |
| `Type` | *float64* | :heavy_check_mark: | item type |
| `Filter` | **string* | :heavy_minus_sign: | the filter parameter |

View File

@@ -0,0 +1,11 @@
# GetCompanionsDataResponse
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `ResponseBodies` | [][operations.ResponseBody](../../models/operations/responsebody.md) | :heavy_minus_sign: | Companions Data |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `FastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 |
| `Key` | *string* | :heavy_check_mark: | N/A | 15491 |
| `Title` | *string* | :heavy_check_mark: | N/A | Japan |

View File

@@ -0,0 +1,22 @@
# GetCountriesLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `Size` | *float64* | :heavy_check_mark: | N/A | 50 |
| `Offset` | **int* | :heavy_minus_sign: | N/A | |
| `TotalSize` | **int* | :heavy_minus_sign: | N/A | |
| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `Content` | *string* | :heavy_check_mark: | N/A | secondary |
| `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `MediaTagVersion` | *int64* | :heavy_check_mark: | N/A | 1734362201 |
| `Nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `Title1` | *string* | :heavy_check_mark: | N/A | TV Series |
| `Title2` | *string* | :heavy_check_mark: | N/A | By Country |
| `ViewGroup` | *string* | :heavy_check_mark: | N/A | secondary |
| `Directory` | [][operations.GetCountriesLibraryDirectory](../../models/operations/getcountrieslibrarydirectory.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetCountriesLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetCountriesLibraryResponseBody](../../models/operations/getcountrieslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetCountriesLibraryMediaContainer](../../models/operations/getcountrieslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `FastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 |
| `Key` | *string* | :heavy_check_mark: | N/A | 89 |
| `Title` | *string* | :heavy_check_mark: | N/A | Action |
| `Type` | *string* | :heavy_check_mark: | N/A | genre |

View File

@@ -0,0 +1,22 @@
# GetGenresLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `Size` | *float64* | :heavy_check_mark: | N/A | 50 |
| `Offset` | **int* | :heavy_minus_sign: | N/A | |
| `TotalSize` | **int* | :heavy_minus_sign: | N/A | |
| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `Content` | *string* | :heavy_check_mark: | N/A | secondary |
| `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `MediaTagVersion` | *int64* | :heavy_check_mark: | N/A | 1734362201 |
| `Nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `Title1` | *string* | :heavy_check_mark: | N/A | TV Shows (Reality) |
| `Title2` | *string* | :heavy_check_mark: | N/A | By Genre |
| `ViewGroup` | *string* | :heavy_check_mark: | N/A | secondary |
| `Directory` | [][operations.GetGenresLibraryDirectory](../../models/operations/getgenreslibrarydirectory.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetGenresLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetGenresLibraryResponseBody](../../models/operations/getgenreslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetGenresLibraryMediaContainer](../../models/operations/getgenreslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,20 @@
# GetGeoDataGeoData
Geo location data
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI |
| `ContinentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA |
| `Country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands |
| `City` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam |
| `EuropeanUnionMember` | **bool* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
| `TimeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
| `PostalCode` | *string* | :heavy_check_mark: | The postal code of the location. | 802 |
| `InPrivacyRestrictedCountry` | **bool* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
| `InPrivacyRestrictedRegion` | **bool* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
| `Subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
| `Coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 |

View File

@@ -0,0 +1,11 @@
# GetGeoDataResponse
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
| `GeoData` | [*operations.GetGeoDataGeoData](../../models/operations/getgeodatageodata.md) | :heavy_minus_sign: | Gets the geo location data of the user | {<br/>"code": "VI",<br/>"continent_code": "NA",<br/>"country": "United States Virgin Islands",<br/>"city": "Amsterdam",<br/>"european_union_member": true,<br/>"time_zone": "America/St_Thomas",<br/>"postal_code": 802,<br/>"in_privacy_restricted_country": true,<br/>"in_privacy_restricted_region": true,<br/>"subdivisions": "Saint Thomas",<br/>"coordinates": "18.3381, -64.8941"<br/>} |

View File

@@ -0,0 +1,11 @@
# GetGlobalHubsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `Size` | **int* | :heavy_minus_sign: | N/A | 8 |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `Hub` | [][operations.Hub](../../models/operations/hub.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,24 @@
# GetGlobalHubsMetadata
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 57070 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/57070/items |
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c |
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
| `Title` | **string* | :heavy_minus_sign: | N/A | November Movie Day |
| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Tracks |
| `Summary` | **string* | :heavy_minus_sign: | N/A | |
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/57070/composite/1668787730 |
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 2 |
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1668787732 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 16873000 |
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 3 |
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1668779618 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1668787730 |

View File

@@ -3,8 +3,9 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetGlobalHubsResponseBody](../../models/operations/getglobalhubsresponsebody.md) | :heavy_minus_sign: | returns global hubs |

View File

@@ -0,0 +1,10 @@
# GetGlobalHubsResponseBody
returns global hubs
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetGlobalHubsMediaContainer](../../models/operations/getglobalhubsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetHomeDataResponse
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Object` | [*operations.GetHomeDataResponseBody](../../models/operations/gethomedataresponsebody.md) | :heavy_minus_sign: | Home Data |

View File

@@ -0,0 +1,15 @@
# GetHomeDataResponseBody
Home Data
## Fields
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `ID` | **float64* | :heavy_minus_sign: | N/A | 1841489 |
| `Name` | **string* | :heavy_minus_sign: | N/A | Blindkitty38's home |
| `GuestUserID` | **float64* | :heavy_minus_sign: | N/A | 58815432 |
| `GuestUserUUID` | **string* | :heavy_minus_sign: | N/A | f3df4e01bfca0787 |
| `GuestEnabled` | **bool* | :heavy_minus_sign: | N/A | |
| `Subscription` | **bool* | :heavy_minus_sign: | N/A | |

View File

@@ -1,10 +0,0 @@
# GetLatestLibraryItemsRequest
## Fields
| Field | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query |
| `Type` | *float64* | :heavy_check_mark: | item type |
| `Filter` | **string* | :heavy_minus_sign: | the filter parameter |

View File

@@ -0,0 +1,12 @@
# GetLibraryDetailsDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | search?type=1 |
| `Title` | **string* | :heavy_minus_sign: | N/A | Search... |
| `Secondary` | **bool* | :heavy_minus_sign: | N/A | true |
| `Prompt` | **string* | :heavy_minus_sign: | N/A | Search Movies |
| `Search` | **bool* | :heavy_minus_sign: | N/A | true |

View File

@@ -0,0 +1,11 @@
# GetLibraryDetailsField
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | label |
| `Title` | **string* | :heavy_minus_sign: | N/A | Label |
| `Type` | **string* | :heavy_minus_sign: | N/A | tag |
| `SubType` | **string* | :heavy_minus_sign: | N/A | bitrate |

View File

@@ -0,0 +1,9 @@
# GetLibraryDetailsFieldType
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `Type` | **string* | :heavy_minus_sign: | N/A | resolution |
| `Operator` | [][operations.GetLibraryDetailsOperator](../../models/operations/getlibrarydetailsoperator.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetLibraryDetailsFilter
## Fields
| Field | Type | Required | Description | Example |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `Filter` | **string* | :heavy_minus_sign: | N/A | label |
| `FilterType` | **string* | :heavy_minus_sign: | N/A | string |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/label |
| `Title` | **string* | :heavy_minus_sign: | N/A | Labels |
| `Type` | **string* | :heavy_minus_sign: | N/A | filter |

Some files were not shown because too many files have changed in this diff Show More