Compare commits

...

49 Commits

Author SHA1 Message Date
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
842 changed files with 48167 additions and 9904 deletions

29
.github/workflows/sdk_generation.yaml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
set_version: ${{ github.event.inputs.set_version }}
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

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 }}

View File

@@ -1,25 +0,0 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@ generation:
auth: auth:
oAuth2ClientCredentialsEnabled: true oAuth2ClientCredentialsEnabled: true
go: go:
version: 0.8.1 version: 0.15.0
additionalDependencies: {} additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true clientServerStatusCodesAsErrors: true

View File

@@ -1,31 +1,39 @@
speakeasyVersion: 1.299.6 speakeasyVersion: 1.406.0
sources: sources:
my-source: my-source:
sourceNamespace: my-source sourceNamespace: my-source
sourceRevisionDigest: sha256:f9b7f945b0be0fcc16cb4ed171d04b72c333eb162daea0db8a4e9c2d489db91c sourceRevisionDigest: sha256:92a2a2049bfbf67bea601a6b1b77d274e83a2d3b6968a0bc02dc290b21c7689d
sourceBlobDigest: sha256:c62fefed624e49b6dd213da5aa3f0b350a118b9de9228e75abd952a85093b9ad sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
tags:
- latest
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
tags: tags:
- latest - latest
- main - main
targets: targets:
plexgo: plexgo:
source: my-source source: plexapi
sourceNamespace: my-source sourceNamespace: plexapi
sourceRevisionDigest: sha256:f9b7f945b0be0fcc16cb4ed171d04b72c333eb162daea0db8a4e9c2d489db91c sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
sourceBlobDigest: sha256:c62fefed624e49b6dd213da5aa3f0b350a118b9de9228e75abd952a85093b9ad sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
outLocation: /github/workspace/repo codeSamplesNamespace: code-samples-go-plexgo
codeSamplesRevisionDigest: sha256:9ae03dbe12a6438ac7667de48bf864bbeb4b470bd87b38555484879a998889ba
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest
sources: sources:
my-source: plexapi:
inputs: inputs:
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml - location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
targets: targets:
plexgo: plexgo:
target: go target: go
source: my-source source: plexapi
codeSamples: codeSamples:
output: codeSamples.yaml output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo

View File

@@ -1,14 +1,14 @@
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest
sources: sources:
my-source: plexapi:
inputs: inputs:
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml - location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
targets: targets:
plexgo: plexgo:
target: go target: go
source: my-source source: plexapi
codeSamples: codeSamples:
output: codeSamples.yaml 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

364
README.md
View File

@@ -7,9 +7,55 @@
</a> </a>
</div> </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
* [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)
<!-- End Table of Contents [toc] -->
<!-- Start SDK Installation [installation] --> <!-- Start SDK Installation [installation] -->
## SDK Installation ## SDK Installation
To add the SDK as a dependency to your project:
```bash ```bash
go get github.com/LukeHagar/plexgo go get github.com/LukeHagar/plexgo
``` ```
@@ -32,7 +78,11 @@ import (
func main() { func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()
@@ -51,33 +101,21 @@ func main() {
<!-- Start Available Resources and Operations [operations] --> <!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations ## Available Resources and Operations
### [Server](docs/sdks/server/README.md) <details open>
<summary>Available methods</summary>
* [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
### [Video](docs/sdks/video/README.md)
* [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
### [Activities](docs/sdks/activities/README.md) ### [Activities](docs/sdks/activities/README.md)
* [GetServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities * [GetServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
* [CancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel 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) ### [Butler](docs/sdks/butler/README.md)
* [GetButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks * [GetButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
@@ -89,26 +127,23 @@ func main() {
### [Hubs](docs/sdks/hubs/README.md) ### [Hubs](docs/sdks/hubs/README.md)
* [GetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs * [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 * [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) ### [Library](docs/sdks/library/README.md)
* [GetFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value * [GetFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
* [GetRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added * [GetRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
* [GetLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries * [GetAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
* [GetLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details * [GetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
* [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section * [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [RefreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library * [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library * [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
* [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata * [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 * [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 * [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
### [Log](docs/sdks/log/README.md) ### [Log](docs/sdks/log/README.md)
@@ -117,10 +152,13 @@ func main() {
* [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message * [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
* [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail * [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
### [Plex](docs/sdks/plex/README.md) ### [Media](docs/sdks/media/README.md)
* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin * [MarkPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
* [GetToken](docs/sdks/plex/README.md#gettoken) - Get Access Token * [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) ### [Playlists](docs/sdks/playlists/README.md)
@@ -134,14 +172,34 @@ func main() {
* [AddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist * [AddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
* [UploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist * [UploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
### [Authentication](docs/sdks/authentication/README.md) ### [Plex](docs/sdks/plex/README.md)
* [GetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token. * [GetCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
* [GetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information * [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
### [Statistics](docs/sdks/statistics/README.md)
* [GetStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics ### [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) ### [Sessions](docs/sdks/sessions/README.md)
@@ -150,22 +208,138 @@ func main() {
* [GetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions * [GetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
* [StopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session * [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) ### [Updater](docs/sdks/updater/README.md)
* [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates * [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
* [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates * [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
* [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates * [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
### [Video](docs/sdks/video/README.md)
* [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] --> <!-- 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() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
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() {
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>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
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] --> <!-- Start Error Handling [errors] -->
## Error Handling ## 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 | 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.GetServerCapabilitiesResponseBody | 401 | application/json | | sdkerrors.GetServerCapabilitiesBadRequest | 400 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* | | sdkerrors.GetServerCapabilitiesUnauthorized | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
### Example ### Example
@@ -183,14 +357,24 @@ import (
func main() { func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx) res, err := s.Server.GetServerCapabilities(ctx)
if err != nil { 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) { if errors.As(err, &e) {
// handle error // handle error
log.Fatal(e.Error()) log.Fatal(e.Error())
@@ -216,7 +400,7 @@ You can override the default server globally using the `WithServerIndex` option
| # | Server | Variables | | # | Server | Variables |
| - | ------ | --------- | | - | ------ | --------- |
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | | 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
#### Example #### Example
@@ -233,7 +417,11 @@ func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithServerIndex(0), plexgo.WithServerIndex(0),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()
@@ -271,7 +459,11 @@ func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithServerURL("{protocol}://{ip}:{port}"), plexgo.WithServerURL("{protocol}://{ip}:{port}"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()
@@ -301,17 +493,20 @@ import (
func main() { func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
var strong *bool = plexgo.Bool(false)
var xPlexClientIdentifier *string = plexgo.String("Postman")
ctx := context.Background() ctx := context.Background()
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier, operations.WithServerURL("https://plex.tv/api/v2")) res, err := s.Plex.GetCompanionsData(ctx, operations.WithServerURL("https://plex.tv/api/v2"))
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
if res.Object != nil { if res.ResponseBodies != nil {
// handle response // handle response
} }
} }
@@ -372,7 +567,11 @@ import (
func main() { func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()
@@ -414,57 +613,6 @@ d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on
``` ```
<!-- End Special Types [types] --> <!-- End Special Types [types] -->
<!-- Start Global Parameters [global-parameters] -->
## Global Parameters
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
| Name | Type | Required | Description |
| ---- | ---- |:--------:| ----------- |
| XPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
|
### Example
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithXPlexClientIdentifier("Postman"),
)
var strong *bool = plexgo.Bool(false)
var xPlexClientIdentifier *string = plexgo.String("Postman")
ctx := context.Background()
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
<!-- End Global Parameters [global-parameters] -->
<!-- Placeholder for Future Speakeasy SDK Sections --> <!-- Placeholder for Future Speakeasy SDK Sections -->
# Development # Development

View File

@@ -542,4 +542,404 @@ Based on:
### Generated ### Generated
- [go v0.8.1] . - [go v0.8.1] .
### Releases ### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - . - [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-05 00:50:03
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.7 (2.338.12) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-06 00:49:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.0 (2.338.14) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-07 00:52:21
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-08 00:50:36
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-09 00:55:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-10 00:52:30
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-12 00:51:32
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.305.0 (2.340.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-13 00:10:09
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.306.0 (2.340.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-14 00:09:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.307.2 (2.342.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.8.1] .
### Releases
- [Go v0.8.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.8.1 - .
## 2024-06-15 00:09:44
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.308.1 (2.342.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.9.0] .
### Releases
- [Go v0.9.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.9.0 - .
## 2024-06-22 00:10:02
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-23 00:10:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-24 00:11:02
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-25 00:09:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.315.2 (2.352.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-26 00:09:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.318.0 (2.352.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-27 00:10:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.321.0 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-28 00:09:54
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.1 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-29 00:09:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-06-30 00:10:54
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-07-01 00:11:32
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.0 - .
## 2024-07-01 15:43:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.323.0 (2.356.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.10.1] .
### Releases
- [Go v0.10.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.10.1 - .
## 2024-09-09 18:17:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.393.1 (2.413.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.1] .
### Releases
- [Go v0.11.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.1 - .
## 2024-09-09 20:35:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.393.2 (2.413.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.2] .
### Releases
- [Go v0.11.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.2 - .
## 2024-09-10 00:08:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.394.0 (2.413.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.3] .
### Releases
- [Go v0.11.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.3 - .
## 2024-09-11 00:08:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.395.1 (2.415.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.4] .
### Releases
- [Go v0.11.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.4 - .
## 2024-09-12 00:08:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.2 (2.415.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.5] .
### Releases
- [Go v0.11.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.5 - .
## 2024-09-13 00:08:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.6 (2.415.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.6] .
### Releases
- [Go v0.11.6] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.6 - .
## 2024-09-14 00:08:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.7] .
### Releases
- [Go v0.11.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.7 - .
## 2024-09-15 00:09:40
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.8] .
### Releases
- [Go v0.11.8] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.8 - .
## 2024-09-16 00:09:14
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.9] .
### Releases
- [Go v0.11.9] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.9 - .
## 2024-09-16 18:35:29
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.10] .
### Releases
- [Go v0.11.10] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.10 - .
## 2024-09-18 03:01:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.0 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.11] .
### Releases
- [Go v0.11.11] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.11 - .
## 2024-09-18 14:09:58
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.1 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.12] .
### Releases
- [Go v0.11.12] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.12 - .
## 2024-09-18 15:01:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.13] .
### Releases
- [Go v0.11.13] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.13 - .
## 2024-09-19 00:08:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.14] .
### Releases
- [Go v0.11.14] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.14 - .
## 2024-09-21 00:08:46
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.12.0] .
### Releases
- [Go v0.12.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.12.0 - .
## 2024-09-22 00:09:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.12.1] .
### Releases
- [Go v0.12.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.12.1 - .
## 2024-09-26 00:09:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.402.14 (2.422.22) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.13.0] .
### Releases
- [Go v0.13.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.13.0 - .
## 2024-10-01 00:10:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.14.0] .
### Releases
- [Go v0.14.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.14.0 - .
## 2024-10-03 00:09:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.15.0] .
### Releases
- [Go v0.15.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.15.0 - .

View File

@@ -11,7 +11,11 @@ import (
func main() { func main() {
s := plexgo.New( s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"), plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
) )
ctx := context.Background() ctx := context.Background()

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 package plexgo
@@ -10,6 +10,8 @@ import (
"github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors" "github.com/LukeHagar/plexgo/models/sdkerrors"
"github.com/LukeHagar/plexgo/retry"
"github.com/cenkalti/backoff/v4"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
@@ -34,7 +36,7 @@ func newActivities(sdkConfig sdkConfiguration) *Activities {
// GetServerActivities - Get Server Activities // GetServerActivities - Get Server Activities
// Get Server Activities // Get Server Activities
func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetServerActivitiesResponse, error) { func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{ hookCtx := hooks.HookContext{
Context: ctx, Context: ctx,
OperationID: "getServerActivities", OperationID: "getServerActivities",
@@ -42,12 +44,35 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
SecuritySource: s.sdkConfiguration.Security, 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(s.sdkConfiguration.GetServerDetails()) baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := url.JoinPath(baseURL, "/activities") opURL, err := url.JoinPath(baseURL, "/activities")
if err != nil { if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err) 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) req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil { if err != nil {
return nil, fmt.Errorf("error creating request: %w", err) return nil, fmt.Errorf("error creating request: %w", err)
@@ -59,33 +84,95 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
return nil, err return nil, err
} }
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) globalRetryConfig := s.sdkConfiguration.RetryConfig
if err != nil { retryConfig := o.Retries
return nil, err if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
} else {
retryConfig = &retry.Config{
Strategy: "backoff", Backoff: &retry.BackoffStrategy{
InitialInterval: 500,
MaxInterval: 60000,
Exponent: 1.5,
MaxElapsedTime: 3600000,
},
RetryConnectionErrors: true,
}
}
} }
httpRes, err := s.sdkConfiguration.Client.Do(req) var httpRes *http.Response
if err != nil || httpRes == nil { if retryConfig != nil {
if err != nil { httpRes, err = utils.Retry(ctx, utils.Retries{
err = fmt.Errorf("error sending request: %w", err) Config: retryConfig,
} else { StatusCodes: []string{
err = fmt.Errorf("error sending request: no response") "5XX",
} },
}, 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 {
return nil, backoff.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
})
_, 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 { if err != nil {
return nil, err return nil, err
} else if _httpRes != nil { } else {
httpRes = _httpRes httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
} }
} else { } else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil { if err != nil {
return nil, err 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{ res := &operations.GetServerActivitiesResponse{
@@ -94,17 +181,25 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
RawResponse: httpRes, RawResponse: httpRes,
} }
rawBody, err := io.ReadAll(httpRes.Body) getRawBody := func() ([]byte, error) {
if err != nil { rawBody, err := io.ReadAll(httpRes.Body)
return nil, fmt.Errorf("error reading response body: %w", err) if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
} }
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch { switch {
case httpRes.StatusCode == 200: case httpRes.StatusCode == 200:
switch { switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out operations.GetServerActivitiesResponseBody var out operations.GetServerActivitiesResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err return nil, err
@@ -112,18 +207,22 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
res.Object = &out res.Object = &out
default: default:
rawBody, err := getRawBody()
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) 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: 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 { switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out sdkerrors.GetServerActivitiesResponseBody rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err return nil, err
} }
@@ -131,9 +230,51 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
out.RawResponse = httpRes out.RawResponse = httpRes
return nil, &out return nil, &out
default: default:
rawBody, err := getRawBody()
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) 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 := getRawBody()
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 := getRawBody()
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:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default: default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
} }
@@ -143,7 +284,7 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
// CancelServerActivities - Cancel Server Activities // CancelServerActivities - Cancel Server Activities
// 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{ hookCtx := hooks.HookContext{
Context: ctx, Context: ctx,
OperationID: "cancelServerActivities", OperationID: "cancelServerActivities",
@@ -155,12 +296,35 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
ActivityUUID: activityUUID, ActivityUUID: activityUUID,
} }
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(s.sdkConfiguration.GetServerDetails()) baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil) opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
if err != nil { if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err) 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, "DELETE", opURL, nil) req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil)
if err != nil { if err != nil {
return nil, fmt.Errorf("error creating request: %w", err) return nil, fmt.Errorf("error creating request: %w", err)
@@ -172,33 +336,95 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
return nil, err return nil, err
} }
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) globalRetryConfig := s.sdkConfiguration.RetryConfig
if err != nil { retryConfig := o.Retries
return nil, err if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
} else {
retryConfig = &retry.Config{
Strategy: "backoff", Backoff: &retry.BackoffStrategy{
InitialInterval: 500,
MaxInterval: 60000,
Exponent: 1.5,
MaxElapsedTime: 3600000,
},
RetryConnectionErrors: true,
}
}
} }
httpRes, err := s.sdkConfiguration.Client.Do(req) var httpRes *http.Response
if err != nil || httpRes == nil { if retryConfig != nil {
if err != nil { httpRes, err = utils.Retry(ctx, utils.Retries{
err = fmt.Errorf("error sending request: %w", err) Config: retryConfig,
} else { StatusCodes: []string{
err = fmt.Errorf("error sending request: no response") "5XX",
} },
}, 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 {
return nil, backoff.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
})
_, 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 { if err != nil {
return nil, err return nil, err
} else if _httpRes != nil { } else {
httpRes = _httpRes httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
} }
} else { } else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil { if err != nil {
return nil, err 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{ res := &operations.CancelServerActivitiesResponse{
@@ -207,25 +433,27 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
RawResponse: httpRes, RawResponse: httpRes,
} }
rawBody, err := io.ReadAll(httpRes.Body) getRawBody := func() ([]byte, error) {
if err != nil { rawBody, err := io.ReadAll(httpRes.Body)
return nil, fmt.Errorf("error reading response body: %w", err) if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
} }
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch { switch {
case httpRes.StatusCode == 200: case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400: 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 { switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out sdkerrors.CancelServerActivitiesResponseBody rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.CancelServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err return nil, err
} }
@@ -233,9 +461,51 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
out.RawResponse = httpRes out.RawResponse = httpRes
return nil, &out return nil, &out
default: default:
rawBody, err := getRawBody()
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) 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 := getRawBody()
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 := getRawBody()
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:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default: default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
} }

File diff suppressed because it is too large Load Diff

963
butler.go

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

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

@@ -6,4 +6,4 @@
| Field | Type | Required | Description | Example | | 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 | | `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 | | `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

@@ -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,12 @@
# CreatePlaylistQueryParamType
type of playlist to create
## Values
| Name | Value |
| ----------------------------------- | ----------------------------------- |
| `CreatePlaylistQueryParamTypeAudio` | audio |
| `CreatePlaylistQueryParamTypeVideo` | video |
| `CreatePlaylistQueryParamTypePhoto` | photo |

View File

@@ -3,10 +3,10 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `Title` | *string* | :heavy_check_mark: | name of the playlist | | `Title` | *string* | :heavy_check_mark: | name of the playlist |
| `Type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | type of playlist to create | | `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 | | `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 | | `URI` | *string* | :heavy_check_mark: | the content URI for the playlist |
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist | | `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist |

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 ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query | 1000 | | `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 | | 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,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

@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | label | | `Key` | *string* | :heavy_check_mark: | N/A | show.title |
| `Title` | **string* | :heavy_minus_sign: | N/A | Label | | `Title` | *string* | :heavy_check_mark: | N/A | Show Title |
| `Type` | **string* | :heavy_minus_sign: | N/A | tag | | `Type` | *string* | :heavy_check_mark: | N/A | string |
| `SubType` | **string* | :heavy_minus_sign: | N/A | bitrate | | `SubType` | **string* | :heavy_minus_sign: | N/A | rating |

View File

@@ -5,5 +5,5 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `Type` | **string* | :heavy_minus_sign: | N/A | resolution | | `Type` | *string* | :heavy_check_mark: | N/A | tag |
| `Operator` | [][operations.Operator](../../models/operations/operator.md) | :heavy_minus_sign: | N/A | | | `Operator` | [][operations.Operator](../../models/operations/operator.md) | :heavy_check_mark: | N/A | |

View File

@@ -1,12 +1,12 @@
# Filter # Filter
Filter
## Fields
| Field | Type | Required | Description | Example | ## Values
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `Filter` | **string* | :heavy_minus_sign: | N/A | label | | Name | Value |
| `FilterType` | **string* | :heavy_minus_sign: | N/A | string | | ----------------- | ----------------- |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/label | | `FilterAll` | all |
| `Title` | **string* | :heavy_minus_sign: | N/A | Labels | | `FilterAvailable` | available |
| `Type` | **string* | :heavy_minus_sign: | N/A | filter | | `FilterReleased` | released |

View File

@@ -0,0 +1,9 @@
# FlattenSeasons
## Values
| Name | Value |
| --------------------- | --------------------- |
| `FlattenSeasonsFalse` | 0 |
| `FlattenSeasonsTrue` | 1 |

View File

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

@@ -1,9 +1,9 @@
# GetLibrariesLocation # GetAllLibrariesLocation
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `ID` | **int* | :heavy_minus_sign: | N/A | 1 | | `ID` | *int* | :heavy_check_mark: | N/A | 1 |
| `Path` | **string* | :heavy_minus_sign: | N/A | /movies | | `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

@@ -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

@@ -0,0 +1,12 @@
# GetBannerImageResponse
## 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 |
| `ResponseStream` | *io.ReadCloser* | :heavy_minus_sign: | Successful response returning an image |
| `Headers` | map[string][]*string* | :heavy_check_mark: | N/A |

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,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

@@ -1,21 +1,11 @@
# GetPinResponseBody # GetGeoDataResponse
The Pin
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ID` | **float64* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | |
| `Code` | **string* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
| `Product` | **string* | :heavy_minus_sign: | N/A | Plex Web | | `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
| `Trusted` | **bool* | :heavy_minus_sign: | N/A | | | `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/>} |
| `Qr` | **string* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv <br/>The QR code redirects to the relevant `plex.tv/link` authentication page<br/>Which then prompts the user for the 4 Digit Link Pin<br/> | https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t |
| `ClientIdentifier` | **string* | :heavy_minus_sign: | N/A | Postman |
| `Location` | [*operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | |
| `ExpiresIn` | **float64* | :heavy_minus_sign: | N/A | 1800 |
| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
| `ExpiresAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
| `AuthToken` | **string* | :heavy_minus_sign: | N/A | |
| `NewRegistration` | **string* | :heavy_minus_sign: | N/A | |

View File

@@ -1,4 +1,4 @@
# GetMetadataResponse # GetHomeDataResponse
## Fields ## Fields
@@ -8,4 +8,4 @@
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code 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 |
| `Object` | [*operations.GetMetadataResponseBody](../../models/operations/getmetadataresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | | `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,28 +0,0 @@
# GetLibrariesDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
| `Location` | [][operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md) | :heavy_minus_sign: | N/A | |

View File

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

View File

@@ -1,10 +0,0 @@
# GetLibrariesResponseBody
The libraries available on the Server
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetLibrariesMediaContainer](../../models/operations/getlibrariesmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -1,4 +1,4 @@
# GetLibraryDirectory # GetLibraryDetailsDirectory
## Fields ## Fields

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 |

View File

@@ -0,0 +1,22 @@
# GetLibraryDetailsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `Size` | **int* | :heavy_minus_sign: | N/A | 29 |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `Content` | **string* | :heavy_minus_sign: | N/A | secondary |
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 |
| `MediaTagPrefix` | **string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
| `MediaTagVersion` | **int* | :heavy_minus_sign: | N/A | 1701731894 |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
| `Title1` | **string* | :heavy_minus_sign: | N/A | Movies |
| `ViewGroup` | **string* | :heavy_minus_sign: | N/A | secondary |
| `ViewMode` | **int* | :heavy_minus_sign: | N/A | 65592 |
| `Directory` | [][operations.GetLibraryDetailsDirectory](../../models/operations/getlibrarydetailsdirectory.md) | :heavy_minus_sign: | N/A | |
| `Type` | [][operations.GetLibraryDetailsType](../../models/operations/getlibrarydetailstype.md) | :heavy_minus_sign: | N/A | |
| `FieldType` | [][operations.GetLibraryDetailsFieldType](../../models/operations/getlibrarydetailsfieldtype.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,9 @@
# GetLibraryDetailsOperator
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | = |
| `Title` | **string* | :heavy_minus_sign: | N/A | is |

View File

@@ -1,9 +1,9 @@
# GetLibraryRequest # GetLibraryDetailsRequest
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query | 1000 | | `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | | | `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 @@
# GetLibraryDetailsResponse
## 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.GetLibraryDetailsResponseBody](../../models/operations/getlibrarydetailsresponsebody.md) | :heavy_minus_sign: | The details of the library |

View File

@@ -0,0 +1,10 @@
# GetLibraryDetailsResponseBody
The details of the library
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetLibraryDetailsMediaContainer](../../models/operations/getlibrarydetailsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,13 @@
# GetLibraryDetailsSort
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
| `Default` | **string* | :heavy_minus_sign: | N/A | asc |
| `DefaultDirection` | **string* | :heavy_minus_sign: | N/A | desc |
| `DescKey` | **string* | :heavy_minus_sign: | N/A | random:desc |
| `FirstCharacterKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/firstCharacter |
| `Key` | **string* | :heavy_minus_sign: | N/A | random |
| `Title` | **string* | :heavy_minus_sign: | N/A | Randomly |

View File

@@ -0,0 +1,14 @@
# GetLibraryDetailsType
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 |
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
| `Active` | **bool* | :heavy_minus_sign: | N/A | false |
| `Filter` | [][operations.GetLibraryDetailsFilter](../../models/operations/getlibrarydetailsfilter.md) | :heavy_minus_sign: | N/A | |
| `Sort` | [][operations.GetLibraryDetailsSort](../../models/operations/getlibrarydetailssort.md) | :heavy_minus_sign: | N/A | |
| `Field` | [][operations.GetLibraryDetailsField](../../models/operations/getlibrarydetailsfield.md) | :heavy_minus_sign: | N/A | |

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,11 @@
# GetLibraryItemsField
## 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 @@
# GetLibraryItemsFieldType
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `Type` | *string* | :heavy_check_mark: | N/A | tag |
| `Operator` | [][operations.GetLibraryItemsOperator](../../models/operations/getlibraryitemsoperator.md) | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetLibraryItemsFilter
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `Filter` | *string* | :heavy_check_mark: | N/A | genre |
| `FilterType` | *string* | :heavy_check_mark: | N/A | string |
| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 |
| `Title` | *string* | :heavy_check_mark: | N/A | Genre |
| `Type` | *string* | :heavy_check_mark: | N/A | filter |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsFlattenSeasons
## Values
| Name | Value |
| ------------------------------------ | ------------------------------------ |
| `GetLibraryItemsFlattenSeasonsFalse` | 0 |
| `GetLibraryItemsFlattenSeasonsTrue` | 1 |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsHasThumbnail
## Values
| Name | Value |
| ---------------------------------- | ---------------------------------- |
| `GetLibraryItemsHasThumbnailFalse` | 0 |
| `GetLibraryItemsHasThumbnailTrue` | 1 |

View File

@@ -0,0 +1,10 @@
# GetLibraryItemsImage
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `Alt` | *string* | :heavy_check_mark: | N/A | Episode 1 |
| `Type` | [operations.GetLibraryItemsLibraryResponse200Type](../../models/operations/getlibraryitemslibraryresponse200type.md) | :heavy_check_mark: | N/A | background |
| `URL` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 |

View File

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

View File

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

View File

@@ -0,0 +1,11 @@
# GetLibraryItemsLibraryField
## 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 @@
# GetLibraryItemsLibraryFieldType
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `Type` | *string* | :heavy_check_mark: | N/A | tag |
| `Operator` | [][operations.GetLibraryItemsLibraryOperator](../../models/operations/getlibraryitemslibraryoperator.md) | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetLibraryItemsLibraryFilter
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `Filter` | *string* | :heavy_check_mark: | N/A | genre |
| `FilterType` | *string* | :heavy_check_mark: | N/A | string |
| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 |
| `Title` | *string* | :heavy_check_mark: | N/A | Genre |
| `Type` | *string* | :heavy_check_mark: | N/A | filter |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsLibraryOperator
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | *string* | :heavy_check_mark: | N/A | = |
| `Title` | *string* | :heavy_check_mark: | N/A | is |

View File

@@ -0,0 +1,11 @@
# GetLibraryItemsLibraryResponse200Type
## Values
| Name | Value |
| -------------------------------------------------- | -------------------------------------------------- |
| `GetLibraryItemsLibraryResponse200TypeCoverPoster` | coverPoster |
| `GetLibraryItemsLibraryResponse200TypeBackground` | background |
| `GetLibraryItemsLibraryResponse200TypeSnapshot` | snapshot |
| `GetLibraryItemsLibraryResponse200TypeClearLogo` | clearLogo |

View File

@@ -0,0 +1,14 @@
# GetLibraryItemsLibraryResponseType
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 |
| `Type` | *string* | :heavy_check_mark: | N/A | show |
| `Title` | *string* | :heavy_check_mark: | N/A | TV Shows |
| `Active` | *bool* | :heavy_check_mark: | N/A | false |
| `Filter` | [][operations.GetLibraryItemsLibraryFilter](../../models/operations/getlibraryitemslibraryfilter.md) | :heavy_minus_sign: | N/A | |
| `Sort` | [][operations.GetLibraryItemsLibrarySort](../../models/operations/getlibraryitemslibrarysort.md) | :heavy_minus_sign: | N/A | |
| `Field` | [][operations.GetLibraryItemsLibraryField](../../models/operations/getlibraryitemslibraryfield.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,15 @@
# GetLibraryItemsLibrarySort
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `Default` | **string* | :heavy_minus_sign: | N/A | asc |
| `Active` | **bool* | :heavy_minus_sign: | N/A | false |
| `ActiveDirection` | [*operations.GetLibraryItemsLibraryActiveDirection](../../models/operations/getlibraryitemslibraryactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.<br/> | asc |
| `DefaultDirection` | [*operations.GetLibraryItemsLibraryDefaultDirection](../../models/operations/getlibraryitemslibrarydefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.<br/> | asc |
| `DescKey` | **string* | :heavy_minus_sign: | N/A | titleSort:desc |
| `FirstCharacterKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter |
| `Key` | *string* | :heavy_check_mark: | N/A | titleSort |
| `Title` | *string* | :heavy_check_mark: | N/A | Title |

View File

@@ -0,0 +1,14 @@
# GetLibraryItemsLibraryType
The type of media content
## Values
| Name | Value |
| ----------------------------------- | ----------------------------------- |
| `GetLibraryItemsLibraryTypeMovie` | movie |
| `GetLibraryItemsLibraryTypeTvShow` | show |
| `GetLibraryItemsLibraryTypeSeason` | season |
| `GetLibraryItemsLibraryTypeEpisode` | episode |

View File

@@ -0,0 +1,8 @@
# GetLibraryItemsLocation
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Path` | **string* | :heavy_minus_sign: | N/A | /TV Shows/House |

View File

@@ -3,19 +3,23 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 119534 | | `ID` | *int* | :heavy_check_mark: | N/A | 119534 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | | `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 | | `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 |
| `Width` | **int* | :heavy_minus_sign: | N/A | 3840 | | `Width` | **int* | :heavy_minus_sign: | N/A | 3840 |
| `Height` | **int* | :heavy_minus_sign: | N/A | 2072 | | `Height` | **int* | :heavy_minus_sign: | N/A | 2072 |
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 | | `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 |
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts |
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 | | `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 |
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc | | `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 |
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k | | `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc |
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv | | `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k |
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p | | `Container` | *string* | :heavy_check_mark: | N/A | mkv |
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
| `Part` | [][operations.GetLibraryItemsPart](../../models/operations/getlibraryitemspart.md) | :heavy_minus_sign: | N/A | | | `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 |
| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | false |
| `OptimizedForStreaming` | [*operations.GetLibraryItemsOptimizedForStreaming](../../models/operations/getlibraryitemsoptimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `Part` | [][operations.GetLibraryItemsPart](../../models/operations/getlibraryitemspart.md) | :heavy_check_mark: | N/A | |

View File

@@ -1,23 +1,33 @@
# GetLibraryItemsMediaContainer # GetLibraryItemsMediaContainer
The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `Size` | **int* | :heavy_minus_sign: | N/A | 70 | | `Type` | [][operations.GetLibraryItemsType](../../models/operations/getlibraryitemstype.md) | :heavy_minus_sign: | N/A | |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true | | `FieldType` | [][operations.GetLibraryItemsFieldType](../../models/operations/getlibraryitemsfieldtype.md) | :heavy_minus_sign: | N/A | |
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | | `Size` | *int* | :heavy_check_mark: | N/A | 70 |
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | | `TotalSize` | *int* | :heavy_check_mark: | N/A | 170 |
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 | | `Offset` | *int* | :heavy_check_mark: | N/A | 0 |
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies | | `Content` | *string* | :heavy_check_mark: | N/A | secondary |
| `LibrarySectionUUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | | `AllowSync` | *bool* | :heavy_check_mark: | N/A | true |
| `MediaTagPrefix` | **string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | | `Nocache` | **bool* | :heavy_minus_sign: | N/A | true |
| `MediaTagVersion` | **int* | :heavy_minus_sign: | N/A | 1701731894 | | `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | | `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `Title1` | **string* | :heavy_minus_sign: | N/A | Movies | | `LibrarySectionID` | *int64* | :heavy_check_mark: | N/A | 1 |
| `Title2` | **string* | :heavy_minus_sign: | N/A | Recently Released | | `LibrarySectionTitle` | *string* | :heavy_check_mark: | N/A | Movies |
| `ViewGroup` | **string* | :heavy_minus_sign: | N/A | movie | | `LibrarySectionUUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `ViewMode` | **int* | :heavy_minus_sign: | N/A | 65592 | | `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `MixedParents` | **bool* | :heavy_minus_sign: | N/A | true | | `MediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 |
| `Metadata` | [][operations.GetLibraryItemsMetadata](../../models/operations/getlibraryitemsmetadata.md) | :heavy_minus_sign: | N/A | | | `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png |
| `Title1` | *string* | :heavy_check_mark: | N/A | Movies |
| `Title2` | *string* | :heavy_check_mark: | N/A | Recently Released |
| `ViewGroup` | *string* | :heavy_check_mark: | N/A | movie |
| `ViewMode` | **int* | :heavy_minus_sign: | N/A | 65592 |
| `MixedParents` | **bool* | :heavy_minus_sign: | N/A | true |
| `Metadata` | [][operations.GetLibraryItemsMetadata](../../models/operations/getlibraryitemsmetadata.md) | :heavy_check_mark: | N/A | |
| `Meta` | [*operations.GetLibraryItemsMeta](../../models/operations/getlibraryitemsmeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |

View File

@@ -0,0 +1,8 @@
# GetLibraryItemsMediaGUID
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `ID` | *string* | :heavy_check_mark: | Can be one of the following formats:<br/>imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/> | imdb://tt13015952 |

View File

@@ -0,0 +1,12 @@
# GetLibraryItemsMeta
The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `Type` | [][operations.GetLibraryItemsLibraryResponseType](../../models/operations/getlibraryitemslibraryresponsetype.md) | :heavy_minus_sign: | N/A |
| `FieldType` | [][operations.GetLibraryItemsLibraryFieldType](../../models/operations/getlibraryitemslibraryfieldtype.md) | :heavy_minus_sign: | N/A |

View File

@@ -5,24 +5,33 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 58683 | | `RatingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item.<br/>Note: This is always an integer, but is represented as a string in the API.<br/> | 58683 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683 | | `Key` | *string* | :heavy_check_mark: | N/A | /library/metadata/58683 |
| `GUID` | **string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | | `GUID` | *string* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
| `Studio` | **string* | :heavy_minus_sign: | N/A | 20th Century Studios | | `Studio` | **string* | :heavy_minus_sign: | N/A | 20th Century Studios |
| `Type` | **string* | :heavy_minus_sign: | N/A | movie | | `SkipChildren` | **bool* | :heavy_minus_sign: | N/A | false |
| `Title` | **string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | | `LibrarySectionID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies |
| `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 |
| `Type` | [operations.GetLibraryItemsLibraryType](../../models/operations/getlibraryitemslibrarytype.md) | :heavy_check_mark: | The type of media content<br/> | movie |
| `Title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
| `Slug` | **string* | :heavy_minus_sign: | N/A | 4-for-texas |
| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 | | `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 |
| `Summary` | **string* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | | `Summary` | *string* | :heavy_check_mark: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. |
| `Rating` | **float64* | :heavy_minus_sign: | N/A | 7.6 | | `Rating` | **float64* | :heavy_minus_sign: | N/A | 7.6 |
| `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 9.2 | | `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 9.2 |
| `Year` | **int* | :heavy_minus_sign: | N/A | 2022 | | `Year` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `SeasonCount` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. | | `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `FlattenSeasons` | [*operations.GetLibraryItemsFlattenSeasons](../../models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `ShowOrdering` | [*operations.GetLibraryItemsShowOrdering](../../models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | | `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | | `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `Banner` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | | `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | | `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1680457607 | | `AddedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1703239236 | | `UpdatedAt` | **int64* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | | `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
| `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media | | `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media |
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | | `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58684 |
@@ -32,14 +41,22 @@
| `GrandparentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 | | `GrandparentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica | | `GrandparentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | | `GrandparentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `ParentSlug` | **string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
| `GrandparentSlug` | **string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
| `GrandparentArt` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | | `GrandparentArt` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | | `GrandparentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
| `Media` | [][operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md) | :heavy_minus_sign: | N/A | | | `Media` | [][operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md) | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.<br/> | |
| `Genre` | [][operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md) | :heavy_minus_sign: | N/A | | | `Genre` | [][operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md) | :heavy_minus_sign: | N/A | |
| `Country` | [][operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md) | :heavy_minus_sign: | N/A | | | `Country` | [][operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md) | :heavy_minus_sign: | N/A | |
| `Director` | [][operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md) | :heavy_minus_sign: | N/A | | | `Director` | [][operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md) | :heavy_minus_sign: | N/A | |
| `Writer` | [][operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md) | :heavy_minus_sign: | N/A | | | `Writer` | [][operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md) | :heavy_minus_sign: | N/A | |
| `Collection` | [][operations.GetLibraryItemsCollection](../../models/operations/getlibraryitemscollection.md) | :heavy_minus_sign: | N/A | |
| `Role` | [][operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md) | :heavy_minus_sign: | N/A | | | `Role` | [][operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md) | :heavy_minus_sign: | N/A | |
| `Location` | [][operations.GetLibraryItemsLocation](../../models/operations/getlibraryitemslocation.md) | :heavy_minus_sign: | N/A | |
| `MediaGUID` | [][operations.GetLibraryItemsMediaGUID](../../models/operations/getlibraryitemsmediaguid.md) | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.<br/> | |
| `UltraBlurColors` | [*operations.GetLibraryItemsUltraBlurColors](../../models/operations/getlibraryitemsultrablurcolors.md) | :heavy_minus_sign: | N/A | |
| `MetaDataRating` | [][operations.GetLibraryItemsMetaDataRating](../../models/operations/getlibraryitemsmetadatarating.md) | :heavy_minus_sign: | N/A | |
| `Image` | [][operations.GetLibraryItemsImage](../../models/operations/getlibraryitemsimage.md) | :heavy_minus_sign: | N/A | |
| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Whale | | `TitleSort` | **string* | :heavy_minus_sign: | N/A | Whale |
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 | | `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1682752242 | | `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1682752242 |
@@ -53,7 +70,7 @@
| `ChildCount` | **int* | :heavy_minus_sign: | N/A | 1 | | `ChildCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `HasPremiumExtras` | **string* | :heavy_minus_sign: | N/A | 1 | | `HasPremiumExtras` | **string* | :heavy_minus_sign: | N/A | 1 |
| `HasPremiumPrimaryExtra` | **string* | :heavy_minus_sign: | N/A | 1 | | `HasPremiumPrimaryExtra` | **string* | :heavy_minus_sign: | N/A | 1 |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | N/A | 66 | | `ParentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the parent item.<br/> | 66 |
| `ParentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | | `ParentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
| `ParentStudio` | **string* | :heavy_minus_sign: | N/A | UCP | | `ParentStudio` | **string* | :heavy_minus_sign: | N/A | UCP |
| `ParentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 | | `ParentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 |

View File

@@ -0,0 +1,10 @@
# GetLibraryItemsMetaDataRating
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `Image` | *string* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating |
| `Value` | *float32* | :heavy_check_mark: | The value of the rating. | 3 |
| `Type` | *string* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsOperator
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Key` | *string* | :heavy_check_mark: | N/A | = |
| `Title` | *string* | :heavy_check_mark: | N/A | is |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsOptimizedForStreaming
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `GetLibraryItemsOptimizedForStreamingDisable` | 0 |
| `GetLibraryItemsOptimizedForStreamingEnable` | 1 |

View File

@@ -5,10 +5,16 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 119542 | | `ID` | *int* | :heavy_check_mark: | N/A | 119542 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/119542/1680457526/file.mkv | | `Key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | | `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `File` | **string* | :heavy_minus_sign: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | | `File` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv |
| `Size` | **int64* | :heavy_minus_sign: | N/A | 36158371307 | | `Size` | *int64* | :heavy_check_mark: | N/A | 36158371307 |
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv | | `Container` | *string* | :heavy_check_mark: | The container format of the media file.<br/> | mkv |
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 |
| `Indexes` | **string* | :heavy_minus_sign: | N/A | sd |
| `HasThumbnail` | [*operations.GetLibraryItemsHasThumbnail](../../models/operations/getlibraryitemshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 |
| `Stream` | [][operations.GetLibraryItemsStream](../../models/operations/getlibraryitemsstream.md) | :heavy_minus_sign: | N/A | |

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