ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1

This commit is contained in:
speakeasybot
2025-04-04 00:09:35 +00:00
parent 0781d394a5
commit 2d3d3206a4
40 changed files with 1295 additions and 19 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: aa9449e7-c19d-411d-b8e2-f9c5fe982f6f id: aa9449e7-c19d-411d-b8e2-f9c5fe982f6f
management: management:
docChecksum: 68de03e6e877c4fc50ebfdd47bb117ac docChecksum: bef8e84d4427234ae3242e247056ab4d
docVersion: 0.0.3 docVersion: 0.0.3
speakeasyVersion: 1.526.6 speakeasyVersion: 1.528.1
generationVersion: 2.563.1 generationVersion: 2.565.1
releaseVersion: 0.8.0 releaseVersion: 0.8.1
configChecksum: 178358599fd9be85132833f6e1c7adc7 configChecksum: 237d8e450bf513800a62208cd8325c63
repoURL: https://github.com/LukeHagar/plexruby.git repoURL: https://github.com/LukeHagar/plexruby.git
repoSubDirectory: . repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexruby installationURL: https://github.com/LukeHagar/plexruby
@@ -342,6 +342,11 @@ generatedFiles:
- docs/models/operations/getlibraryitemsultrablurcolors.md - docs/models/operations/getlibraryitemsultrablurcolors.md
- docs/models/operations/getlibraryitemsunauthorized.md - docs/models/operations/getlibraryitemsunauthorized.md
- docs/models/operations/getlibraryitemswriter.md - docs/models/operations/getlibraryitemswriter.md
- docs/models/operations/getmediaartsmediacontainer.md
- docs/models/operations/getmediaartsmetadata.md
- docs/models/operations/getmediaartsrequest.md
- docs/models/operations/getmediaartsresponse.md
- docs/models/operations/getmediaartsresponsebody.md
- docs/models/operations/getmediametadatabadrequest.md - docs/models/operations/getmediametadatabadrequest.md
- docs/models/operations/getmediametadatacountry.md - docs/models/operations/getmediametadatacountry.md
- docs/models/operations/getmediametadatadirector.md - docs/models/operations/getmediametadatadirector.md
@@ -366,6 +371,11 @@ generatedFiles:
- docs/models/operations/getmediametadataultrablurcolors.md - docs/models/operations/getmediametadataultrablurcolors.md
- docs/models/operations/getmediametadataunauthorized.md - docs/models/operations/getmediametadataunauthorized.md
- docs/models/operations/getmediametadatawriter.md - docs/models/operations/getmediametadatawriter.md
- docs/models/operations/getmediapostersmediacontainer.md
- docs/models/operations/getmediapostersmetadata.md
- docs/models/operations/getmediapostersrequest.md
- docs/models/operations/getmediapostersresponse.md
- docs/models/operations/getmediapostersresponsebody.md
- docs/models/operations/getmediaprovidersbadrequest.md - docs/models/operations/getmediaprovidersbadrequest.md
- docs/models/operations/getmediaprovidersdirectory.md - docs/models/operations/getmediaprovidersdirectory.md
- docs/models/operations/getmediaproviderserrors.md - docs/models/operations/getmediaproviderserrors.md
@@ -780,6 +790,10 @@ generatedFiles:
- docs/models/operations/player.md - docs/models/operations/player.md
- docs/models/operations/playlisttype.md - docs/models/operations/playlisttype.md
- docs/models/operations/plexdevice.md - docs/models/operations/plexdevice.md
- docs/models/operations/postmediaartsrequest.md
- docs/models/operations/postmediaartsresponse.md
- docs/models/operations/postmediaposterrequest.md
- docs/models/operations/postmediaposterresponse.md
- docs/models/operations/postuserssignindataauthenticationerrors.md - docs/models/operations/postuserssignindataauthenticationerrors.md
- docs/models/operations/postuserssignindataauthenticationresponsestatus.md - docs/models/operations/postuserssignindataauthenticationresponsestatus.md
- docs/models/operations/postuserssignindataauthenticationstatus.md - docs/models/operations/postuserssignindataauthenticationstatus.md
@@ -1173,6 +1187,11 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/get_library_items_ultrablurcolors.rb - lib/plex_ruby_sdk/models/operations/get_library_items_ultrablurcolors.rb
- lib/plex_ruby_sdk/models/operations/get_library_items_unauthorized.rb - lib/plex_ruby_sdk/models/operations/get_library_items_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/get_library_items_writer.rb - lib/plex_ruby_sdk/models/operations/get_library_items_writer.rb
- lib/plex_ruby_sdk/models/operations/get_media_arts_mediacontainer.rb
- lib/plex_ruby_sdk/models/operations/get_media_arts_metadata.rb
- lib/plex_ruby_sdk/models/operations/get_media_arts_request.rb
- lib/plex_ruby_sdk/models/operations/get_media_arts_response.rb
- lib/plex_ruby_sdk/models/operations/get_media_arts_responsebody.rb
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_badrequest.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_badrequest.rb
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_country.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_country.rb
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_director.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_director.rb
@@ -1197,6 +1216,11 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_ultrablurcolors.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_ultrablurcolors.rb
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_unauthorized.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/get_media_meta_data_writer.rb - lib/plex_ruby_sdk/models/operations/get_media_meta_data_writer.rb
- lib/plex_ruby_sdk/models/operations/get_media_posters_mediacontainer.rb
- lib/plex_ruby_sdk/models/operations/get_media_posters_metadata.rb
- lib/plex_ruby_sdk/models/operations/get_media_posters_request.rb
- lib/plex_ruby_sdk/models/operations/get_media_posters_response.rb
- lib/plex_ruby_sdk/models/operations/get_media_posters_responsebody.rb
- lib/plex_ruby_sdk/models/operations/get_media_providers_badrequest.rb - lib/plex_ruby_sdk/models/operations/get_media_providers_badrequest.rb
- lib/plex_ruby_sdk/models/operations/get_media_providers_directory.rb - lib/plex_ruby_sdk/models/operations/get_media_providers_directory.rb
- lib/plex_ruby_sdk/models/operations/get_media_providers_errors.rb - lib/plex_ruby_sdk/models/operations/get_media_providers_errors.rb
@@ -1690,6 +1714,10 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/player.rb - lib/plex_ruby_sdk/models/operations/player.rb
- lib/plex_ruby_sdk/models/operations/playlisttype.rb - lib/plex_ruby_sdk/models/operations/playlisttype.rb
- lib/plex_ruby_sdk/models/operations/plexdevice.rb - lib/plex_ruby_sdk/models/operations/plexdevice.rb
- lib/plex_ruby_sdk/models/operations/post_media_arts_request.rb
- lib/plex_ruby_sdk/models/operations/post_media_arts_response.rb
- lib/plex_ruby_sdk/models/operations/post_media_poster_request.rb
- lib/plex_ruby_sdk/models/operations/post_media_poster_response.rb
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_errors.rb - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_errors.rb
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_response_status.rb - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_response_status.rb
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_status.rb - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_status.rb
@@ -2975,5 +3003,35 @@ examples:
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401": "401":
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
get-media-arts:
speakeasy-default-get-media-arts:
parameters:
path:
ratingKey: 16099
responses:
"200":
application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}]}}
post-media-arts:
speakeasy-default-post-media-arts:
parameters:
path:
ratingKey: 2268
query:
url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"
get-media-posters:
speakeasy-default-get-media-posters:
parameters:
path:
ratingKey: 16099
responses:
"200":
application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}]}}
post-media-poster:
speakeasy-default-post-media-poster:
parameters:
path:
ratingKey: 2268
query:
url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"
examplesVersion: 1.0.0 examplesVersion: 1.0.0
generatedTests: {} generatedTests: {}

View File

@@ -15,7 +15,7 @@ generation:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false oAuth2PasswordEnabled: false
ruby: ruby:
version: 0.8.0 version: 0.8.1
additionalDependencies: additionalDependencies:
development: {} development: {}
runtime: {} runtime: {}

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.526.6 speakeasyVersion: 1.528.1
sources: sources:
my-source: my-source:
sourceNamespace: my-source sourceNamespace: my-source
@@ -9,19 +9,19 @@ sources:
- main - main
plexapi: plexapi:
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1743443509 - speakeasy-sdk-regen-1743725307
targets: targets:
plexruby: plexruby:
source: plexapi source: plexapi
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
codeSamplesNamespace: code-samples-ruby-plexruby codeSamplesNamespace: code-samples-ruby-plexruby
codeSamplesRevisionDigest: sha256:094430f15b6dd5749abddab15c1513dff3482821fe0e7020c39129b9d2d092a6 codeSamplesRevisionDigest: sha256:6fb53429d0401a046e89cab9ba5f9e5226c6e4a25f687fee407a39ae757cf563
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest

View File

@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
plex_ruby_sdk (0.8.0) plex_ruby_sdk (0.8.1)
faraday faraday
faraday-multipart faraday-multipart
faraday-retry (~> 2.2.1) faraday-retry (~> 2.2.1)

View File

@@ -167,6 +167,10 @@ end
* [get_actors_library](docs/sdks/library/README.md#get_actors_library) - Get Actors of library media * [get_actors_library](docs/sdks/library/README.md#get_actors_library) - Get Actors of library media
* [get_search_all_libraries](docs/sdks/library/README.md#get_search_all_libraries) - Search All Libraries * [get_search_all_libraries](docs/sdks/library/README.md#get_search_all_libraries) - Search All Libraries
* [get_media_meta_data](docs/sdks/library/README.md#get_media_meta_data) - Get Media Metadata * [get_media_meta_data](docs/sdks/library/README.md#get_media_meta_data) - Get Media Metadata
* [get_media_arts](docs/sdks/library/README.md#get_media_arts) - Get Media Background Artwork
* [post_media_arts](docs/sdks/library/README.md#post_media_arts) - Upload Media Background Artwork
* [get_media_posters](docs/sdks/library/README.md#get_media_posters) - Get Media Posters
* [post_media_poster](docs/sdks/library/README.md#post_media_poster) - Upload Media Poster
* [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children * [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children
* [get_top_watched_content](docs/sdks/library/README.md#get_top_watched_content) - Get Top Watched Content * [get_top_watched_content](docs/sdks/library/README.md#get_top_watched_content) - Get Top Watched Content

View File

@@ -757,3 +757,13 @@ Based on:
- [ruby v0.8.0] . - [ruby v0.8.0] .
### Releases ### Releases
- [Ruby Gems v0.8.0] https://rubygems.org/gems/plex_ruby_sdk/versions/0.8.0 - . - [Ruby Gems v0.8.0] https://rubygems.org/gems/plex_ruby_sdk/versions/0.8.0 - .
## 2025-04-04 00:08:12
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v0.8.1] .
### Releases
- [Ruby Gems v0.8.1] https://rubygems.org/gems/plex_ruby_sdk/versions/0.8.1 - .

View File

@@ -566,6 +566,44 @@ actions:
if ! res.object.nil? if ! res.object.nil?
# handle response # handle response
end end
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"]
update:
x-codeSamples:
- lang: ruby
label: PlexRuby
source: |-
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.get_media_arts(rating_key=16_099)
if ! res.object.nil?
# handle response
end
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"]
update:
x-codeSamples:
- lang: ruby
label: PlexRuby
source: |-
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.post_media_arts(rating_key=2268, url="https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b", request_body="0xee51EFC6De".encode())
if res.status_code == 200
# handle response
end
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
update: update:
x-codeSamples: x-codeSamples:
@@ -613,6 +651,44 @@ actions:
if ! res.object.nil? if ! res.object.nil?
# handle response # handle response
end end
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"]
update:
x-codeSamples:
- lang: ruby
label: PlexRuby
source: |-
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.get_media_posters(rating_key=16_099)
if ! res.object.nil?
# handle response
end
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"]
update:
x-codeSamples:
- lang: ruby
label: PlexRuby
source: |-
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.post_media_poster(rating_key=2268, url="https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b", request_body="0x7C3d45ad4B".encode())
if res.status_code == 200
# handle response
end
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
update: update:
x-codeSamples: x-codeSamples:

View File

@@ -0,0 +1,12 @@
# GetMediaArtsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `size` | *::Integer* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
| `media_tag_version` | *::Integer* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
| `media_tag_prefix` | *::String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
| `identifier` | *::String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
| `metadata` | T::Array<[::PlexRubySDK::Operations::GetMediaArtsMetadata](../../models/operations/getmediaartsmetadata.md)> | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetMediaArtsMetadata
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key` | *::String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
| `provider` | *T.nilable(::String)* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
| `rating_key` | *::String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
| `selected` | *T::Boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true |
| `thumb` | *::String* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg |

View File

@@ -0,0 +1,8 @@
# GetMediaArtsRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |

View File

@@ -0,0 +1,11 @@
# GetMediaArtsResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [T.nilable(::PlexRubySDK::Operations::GetMediaArtsResponseBody)](../../models/operations/getmediaartsresponsebody.md) | :heavy_minus_sign: | The available background artwork for the library item. |

View File

@@ -0,0 +1,10 @@
# GetMediaArtsResponseBody
The available background artwork for the library item.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `media_container` | [T.nilable(::PlexRubySDK::Operations::GetMediaArtsMediaContainer)](../../models/operations/getmediaartsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,12 @@
# GetMediaPostersMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `size` | *::Integer* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
| `media_tag_version` | *::Integer* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
| `media_tag_prefix` | *::String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
| `identifier` | *::String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
| `metadata` | T::Array<[::PlexRubySDK::Operations::GetMediaPostersMetadata](../../models/operations/getmediapostersmetadata.md)> | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetMediaPostersMetadata
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key` | *::String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
| `provider` | *T.nilable(::String)* | :heavy_minus_sign: | The provider of the poster. | tmdb |
| `rating_key` | *::String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
| `selected` | *T::Boolean* | :heavy_check_mark: | Whether this is the selected poster. | true |
| `thumb` | *::String* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg |

View File

@@ -0,0 +1,8 @@
# GetMediaPostersRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |

View File

@@ -0,0 +1,11 @@
# GetMediaPostersResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [T.nilable(::PlexRubySDK::Operations::GetMediaPostersResponseBody)](../../models/operations/getmediapostersresponsebody.md) | :heavy_minus_sign: | The available posters for the library item. |

View File

@@ -0,0 +1,10 @@
# GetMediaPostersResponseBody
The available posters for the library item.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `media_container` | [T.nilable(::PlexRubySDK::Operations::GetMediaPostersMediaContainer)](../../models/operations/getmediapostersmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# PostMediaArtsRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *T.nilable(::String)* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `request_body` | *T.nilable(::String)* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |

View File

@@ -0,0 +1,10 @@
# PostMediaArtsResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# PostMediaPosterRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *T.nilable(::String)* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `request_body` | *T.nilable(::String)* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |

View File

@@ -0,0 +1,10 @@
# PostMediaPosterResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
* [get_actors_library](#get_actors_library) - Get Actors of library media * [get_actors_library](#get_actors_library) - Get Actors of library media
* [get_search_all_libraries](#get_search_all_libraries) - Search All Libraries * [get_search_all_libraries](#get_search_all_libraries) - Search All Libraries
* [get_media_meta_data](#get_media_meta_data) - Get Media Metadata * [get_media_meta_data](#get_media_meta_data) - Get Media Metadata
* [get_media_arts](#get_media_arts) - Get Media Background Artwork
* [post_media_arts](#post_media_arts) - Upload Media Background Artwork
* [get_media_posters](#get_media_posters) - Get Media Posters
* [post_media_poster](#post_media_poster) - Upload Media Poster
* [get_metadata_children](#get_metadata_children) - Get Items Children * [get_metadata_children](#get_metadata_children) - Get Items Children
* [get_top_watched_content](#get_top_watched_content) - Get Top Watched Content * [get_top_watched_content](#get_top_watched_content) - Get Top Watched Content
@@ -680,6 +684,150 @@ end
## get_media_arts
Returns the background artwork for a library item.
### Example Usage
```ruby
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.get_media_arts(rating_key=16_099)
if ! res.object.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetMediaArtsResponse)](../../models/operations/getmediaartsresponse.md)**
## post_media_arts
Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
### Example Usage
```ruby
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.post_media_arts(rating_key=2268, url="https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b", request_body="0xee51EFC6De".encode())
if res.status_code == 200
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *T.nilable(::String)* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `request_body` | *T.nilable(::String)* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
### Response
**[T.nilable(::PlexRubySDK::Operations::PostMediaArtsResponse)](../../models/operations/postmediaartsresponse.md)**
## get_media_posters
Returns the available posters for a library item.
### Example Usage
```ruby
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.get_media_posters(rating_key=16_099)
if ! res.object.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetMediaPostersResponse)](../../models/operations/getmediapostersresponse.md)**
## post_media_poster
Uploads a poster to a library item, either from a local file or a remote URL
### Example Usage
```ruby
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
security: ::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
),
)
res = s.library.post_media_poster(rating_key=2268, url="https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b", request_body="0x7C3d45ad4B".encode())
if res.status_code == 200
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *T.nilable(::String)* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `request_body` | *T.nilable(::String)* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
### Response
**[T.nilable(::PlexRubySDK::Operations::PostMediaPosterResponse)](../../models/operations/postmediaposterresponse.md)**
## get_metadata_children ## get_metadata_children
This endpoint will return the children of of a library item specified with the ratingKey. This endpoint will return the children of of a library item specified with the ratingKey.

View File

@@ -1523,6 +1523,400 @@ module PlexRubySDK
end end
sig { params(rating_key: ::Integer, timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetMediaArtsResponse) }
def get_media_arts(rating_key, timeout_ms = nil)
# get_media_arts - Get Media Background Artwork
# Returns the background artwork for a library item.
request = ::PlexRubySDK::Operations::GetMediaArtsRequest.new(
rating_key: rating_key
)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
::PlexRubySDK::Operations::GetMediaArtsRequest,
base_url,
'/library/metadata/{ratingKey}/arts',
request
)
headers = {}
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
timeout ||= @sdk_configuration.timeout
connection = @sdk_configuration.client
hook_ctx = SDKHooks::HookContext.new(
base_url: base_url,
oauth2_scopes: nil,
operation_id: 'get-media-arts',
security_source: @sdk_configuration.security_source
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.get(url) do |req|
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
Utils.configure_request_security(req, security)
@sdk_configuration.hooks.before_request(
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
hook_ctx: hook_ctx
),
request: req
)
end
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
else
r = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
end
if r.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::GetMediaArtsResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::GetMediaArtsResponseBody)
res.object = out
end
elsif r.status == 404
end
res
end
sig { params(rating_key: ::Integer, url: T.nilable(::String), request_body: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::PostMediaArtsResponse) }
def post_media_arts(rating_key, url = nil, request_body = nil, timeout_ms = nil)
# post_media_arts - Upload Media Background Artwork
# Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
request = ::PlexRubySDK::Operations::PostMediaArtsRequest.new(
rating_key: rating_key,
url: url,
request_body: request_body
)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
::PlexRubySDK::Operations::PostMediaArtsRequest,
base_url,
'/library/metadata/{ratingKey}/arts',
request
)
headers = {}
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :raw)
headers['content-type'] = req_content_type
if form
body = Utils.encode_form(form)
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
body = URI.encode_www_form(data)
else
body = data
end
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PostMediaArtsRequest, request)
headers['Accept'] = '*/*'
headers['user-agent'] = @sdk_configuration.user_agent
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
timeout ||= @sdk_configuration.timeout
connection = @sdk_configuration.client
hook_ctx = SDKHooks::HookContext.new(
base_url: base_url,
oauth2_scopes: nil,
operation_id: 'post-media-arts',
security_source: @sdk_configuration.security_source
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.post(url) do |req|
req.body = body
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
req.params = query_params
Utils.configure_request_security(req, security)
@sdk_configuration.hooks.before_request(
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
hook_ctx: hook_ctx
),
request: req
)
end
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
else
r = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
end
if r.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::PostMediaArtsResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
elsif r.status == 404
end
res
end
sig { params(rating_key: ::Integer, timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetMediaPostersResponse) }
def get_media_posters(rating_key, timeout_ms = nil)
# get_media_posters - Get Media Posters
# Returns the available posters for a library item.
request = ::PlexRubySDK::Operations::GetMediaPostersRequest.new(
rating_key: rating_key
)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
::PlexRubySDK::Operations::GetMediaPostersRequest,
base_url,
'/library/metadata/{ratingKey}/posters',
request
)
headers = {}
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
timeout ||= @sdk_configuration.timeout
connection = @sdk_configuration.client
hook_ctx = SDKHooks::HookContext.new(
base_url: base_url,
oauth2_scopes: nil,
operation_id: 'get-media-posters',
security_source: @sdk_configuration.security_source
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.get(url) do |req|
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
Utils.configure_request_security(req, security)
@sdk_configuration.hooks.before_request(
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
hook_ctx: hook_ctx
),
request: req
)
end
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
else
r = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
end
if r.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::GetMediaPostersResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::GetMediaPostersResponseBody)
res.object = out
end
elsif r.status == 404
end
res
end
sig { params(rating_key: ::Integer, url: T.nilable(::String), request_body: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::PostMediaPosterResponse) }
def post_media_poster(rating_key, url = nil, request_body = nil, timeout_ms = nil)
# post_media_poster - Upload Media Poster
# Uploads a poster to a library item, either from a local file or a remote URL
request = ::PlexRubySDK::Operations::PostMediaPosterRequest.new(
rating_key: rating_key,
url: url,
request_body: request_body
)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
::PlexRubySDK::Operations::PostMediaPosterRequest,
base_url,
'/library/metadata/{ratingKey}/posters',
request
)
headers = {}
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :raw)
headers['content-type'] = req_content_type
if form
body = Utils.encode_form(form)
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
body = URI.encode_www_form(data)
else
body = data
end
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PostMediaPosterRequest, request)
headers['Accept'] = '*/*'
headers['user-agent'] = @sdk_configuration.user_agent
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
timeout ||= @sdk_configuration.timeout
connection = @sdk_configuration.client
hook_ctx = SDKHooks::HookContext.new(
base_url: base_url,
oauth2_scopes: nil,
operation_id: 'post-media-poster',
security_source: @sdk_configuration.security_source
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.post(url) do |req|
req.body = body
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
req.params = query_params
Utils.configure_request_security(req, security)
@sdk_configuration.hooks.before_request(
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
hook_ctx: hook_ctx
),
request: req
)
end
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
else
r = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
end
if r.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::PostMediaPosterResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
elsif r.status == 404
end
res
end
sig { params(rating_key: ::Float, include_elements: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetMetadataChildrenResponse) } sig { params(rating_key: ::Float, include_elements: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetMetadataChildrenResponse) }
def get_metadata_children(rating_key, include_elements = nil, timeout_ms = nil) def get_metadata_children(rating_key, include_elements = nil, timeout_ms = nil)
# get_metadata_children - Get Items Children # get_metadata_children - Get Items Children

View File

@@ -574,6 +574,20 @@ module PlexRubySDK
autoload :GetMediaMetaDataMediaContainer, 'plex_ruby_sdk/models/operations/get_media_meta_data_mediacontainer.rb' autoload :GetMediaMetaDataMediaContainer, 'plex_ruby_sdk/models/operations/get_media_meta_data_mediacontainer.rb'
autoload :GetMediaMetaDataResponseBody, 'plex_ruby_sdk/models/operations/get_media_meta_data_responsebody.rb' autoload :GetMediaMetaDataResponseBody, 'plex_ruby_sdk/models/operations/get_media_meta_data_responsebody.rb'
autoload :GetMediaMetaDataResponse, 'plex_ruby_sdk/models/operations/get_media_meta_data_response.rb' autoload :GetMediaMetaDataResponse, 'plex_ruby_sdk/models/operations/get_media_meta_data_response.rb'
autoload :GetMediaArtsRequest, 'plex_ruby_sdk/models/operations/get_media_arts_request.rb'
autoload :GetMediaArtsMetadata, 'plex_ruby_sdk/models/operations/get_media_arts_metadata.rb'
autoload :GetMediaArtsMediaContainer, 'plex_ruby_sdk/models/operations/get_media_arts_mediacontainer.rb'
autoload :GetMediaArtsResponseBody, 'plex_ruby_sdk/models/operations/get_media_arts_responsebody.rb'
autoload :GetMediaArtsResponse, 'plex_ruby_sdk/models/operations/get_media_arts_response.rb'
autoload :PostMediaArtsRequest, 'plex_ruby_sdk/models/operations/post_media_arts_request.rb'
autoload :PostMediaArtsResponse, 'plex_ruby_sdk/models/operations/post_media_arts_response.rb'
autoload :GetMediaPostersRequest, 'plex_ruby_sdk/models/operations/get_media_posters_request.rb'
autoload :GetMediaPostersMetadata, 'plex_ruby_sdk/models/operations/get_media_posters_metadata.rb'
autoload :GetMediaPostersMediaContainer, 'plex_ruby_sdk/models/operations/get_media_posters_mediacontainer.rb'
autoload :GetMediaPostersResponseBody, 'plex_ruby_sdk/models/operations/get_media_posters_responsebody.rb'
autoload :GetMediaPostersResponse, 'plex_ruby_sdk/models/operations/get_media_posters_response.rb'
autoload :PostMediaPosterRequest, 'plex_ruby_sdk/models/operations/post_media_poster_request.rb'
autoload :PostMediaPosterResponse, 'plex_ruby_sdk/models/operations/post_media_poster_response.rb'
autoload :GetMetadataChildrenRequest, 'plex_ruby_sdk/models/operations/getmetadatachildren_request.rb' autoload :GetMetadataChildrenRequest, 'plex_ruby_sdk/models/operations/getmetadatachildren_request.rb'
autoload :GetMetadataChildrenLibraryErrors, 'plex_ruby_sdk/models/operations/getmetadatachildren_library_errors.rb' autoload :GetMetadataChildrenLibraryErrors, 'plex_ruby_sdk/models/operations/getmetadatachildren_library_errors.rb'
autoload :GetMetadataChildrenUnauthorized, 'plex_ruby_sdk/models/operations/getmetadatachildren_unauthorized.rb' autoload :GetMetadataChildrenUnauthorized, 'plex_ruby_sdk/models/operations/getmetadatachildren_unauthorized.rb'

View File

@@ -0,0 +1,36 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaArtsMediaContainer < ::Crystalline::FieldAugmented
extend T::Sig
# An plugin identifier for the media container.
field :identifier, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('identifier') } }
# The prefix used for media tag resource paths.
field :media_tag_prefix, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaTagPrefix') } }
# The version number for media tags.
field :media_tag_version, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaTagVersion') } }
field :metadata, T::Array[::PlexRubySDK::Operations::GetMediaArtsMetadata], { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Metadata') } }
# Number of media items returned in this response.
field :size, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('size') } }
sig { params(identifier: ::String, media_tag_prefix: ::String, media_tag_version: ::Integer, metadata: T::Array[::PlexRubySDK::Operations::GetMediaArtsMetadata], size: ::Integer).void }
def initialize(identifier: nil, media_tag_prefix: nil, media_tag_version: nil, metadata: nil, size: nil)
@identifier = identifier
@media_tag_prefix = media_tag_prefix
@media_tag_version = media_tag_version
@metadata = metadata
@size = size
end
end
end
end

View File

@@ -0,0 +1,36 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaArtsMetadata < ::Crystalline::FieldAugmented
extend T::Sig
# The URL of the artwork.
field :key, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('key') } }
# The URL of the artwork.
field :rating_key, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('ratingKey') } }
# Whether this is the selected artwork.
field :selected, T::Boolean, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('selected') } }
# The URL of the artwork thumbnail.
field :thumb, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('thumb') } }
# The provider of the artwork.
field :provider, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('provider') } }
sig { params(key: ::String, rating_key: ::String, selected: T::Boolean, thumb: ::String, provider: T.nilable(::String)).void }
def initialize(key: nil, rating_key: nil, selected: nil, thumb: nil, provider: nil)
@key = key
@rating_key = rating_key
@selected = selected
@thumb = thumb
@provider = provider
end
end
end
end

View File

@@ -0,0 +1,24 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaArtsRequest < ::Crystalline::FieldAugmented
extend T::Sig
# the id of the library item to return the artwork of.
field :rating_key, ::Integer, { 'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': false } }
sig { params(rating_key: ::Integer).void }
def initialize(rating_key: nil)
@rating_key = rating_key
end
end
end
end

View File

@@ -0,0 +1,33 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaArtsResponse < ::Crystalline::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
# The available background artwork for the library item.
field :object, T.nilable(::PlexRubySDK::Operations::GetMediaArtsResponseBody)
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::PlexRubySDK::Operations::GetMediaArtsResponseBody)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
@object = object
end
end
end
end

View File

@@ -0,0 +1,24 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
# The available background artwork for the library item.
class GetMediaArtsResponseBody < ::Crystalline::FieldAugmented
extend T::Sig
field :media_container, T.nilable(::PlexRubySDK::Operations::GetMediaArtsMediaContainer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('MediaContainer') } }
sig { params(media_container: T.nilable(::PlexRubySDK::Operations::GetMediaArtsMediaContainer)).void }
def initialize(media_container: nil)
@media_container = media_container
end
end
end
end

View File

@@ -0,0 +1,36 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaPostersMediaContainer < ::Crystalline::FieldAugmented
extend T::Sig
# An plugin identifier for the media container.
field :identifier, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('identifier') } }
# The prefix used for media tag resource paths.
field :media_tag_prefix, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaTagPrefix') } }
# The version number for media tags.
field :media_tag_version, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaTagVersion') } }
field :metadata, T::Array[::PlexRubySDK::Operations::GetMediaPostersMetadata], { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Metadata') } }
# Number of media items returned in this response.
field :size, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('size') } }
sig { params(identifier: ::String, media_tag_prefix: ::String, media_tag_version: ::Integer, metadata: T::Array[::PlexRubySDK::Operations::GetMediaPostersMetadata], size: ::Integer).void }
def initialize(identifier: nil, media_tag_prefix: nil, media_tag_version: nil, metadata: nil, size: nil)
@identifier = identifier
@media_tag_prefix = media_tag_prefix
@media_tag_version = media_tag_version
@metadata = metadata
@size = size
end
end
end
end

View File

@@ -0,0 +1,36 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaPostersMetadata < ::Crystalline::FieldAugmented
extend T::Sig
# The URL of the poster.
field :key, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('key') } }
# The URL of the poster.
field :rating_key, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('ratingKey') } }
# Whether this is the selected poster.
field :selected, T::Boolean, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('selected') } }
# The URL of the poster thumbnail.
field :thumb, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('thumb') } }
# The provider of the poster.
field :provider, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('provider') } }
sig { params(key: ::String, rating_key: ::String, selected: T::Boolean, thumb: ::String, provider: T.nilable(::String)).void }
def initialize(key: nil, rating_key: nil, selected: nil, thumb: nil, provider: nil)
@key = key
@rating_key = rating_key
@selected = selected
@thumb = thumb
@provider = provider
end
end
end
end

View File

@@ -0,0 +1,24 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaPostersRequest < ::Crystalline::FieldAugmented
extend T::Sig
# the id of the library item to return the posters of.
field :rating_key, ::Integer, { 'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': false } }
sig { params(rating_key: ::Integer).void }
def initialize(rating_key: nil)
@rating_key = rating_key
end
end
end
end

View File

@@ -0,0 +1,33 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class GetMediaPostersResponse < ::Crystalline::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
# The available posters for the library item.
field :object, T.nilable(::PlexRubySDK::Operations::GetMediaPostersResponseBody)
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::PlexRubySDK::Operations::GetMediaPostersResponseBody)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
@object = object
end
end
end
end

View File

@@ -0,0 +1,24 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
# The available posters for the library item.
class GetMediaPostersResponseBody < ::Crystalline::FieldAugmented
extend T::Sig
field :media_container, T.nilable(::PlexRubySDK::Operations::GetMediaPostersMediaContainer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('MediaContainer') } }
sig { params(media_container: T.nilable(::PlexRubySDK::Operations::GetMediaPostersMediaContainer)).void }
def initialize(media_container: nil)
@media_container = media_container
end
end
end
end

View File

@@ -0,0 +1,30 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class PostMediaArtsRequest < ::Crystalline::FieldAugmented
extend T::Sig
# the id of the library item to return the posters of.
field :rating_key, ::Integer, { 'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': false } }
# The contents of the image, if uploading a local file
field :request_body, T.nilable(::String), { 'request': { 'media_type': 'image/*' } }
# The URL of the image, if uploading a remote image
field :url, T.nilable(::String), { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
sig { params(rating_key: ::Integer, request_body: T.nilable(::String), url: T.nilable(::String)).void }
def initialize(rating_key: nil, request_body: nil, url: nil)
@rating_key = rating_key
@request_body = request_body
@url = url
end
end
end
end

View File

@@ -0,0 +1,30 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class PostMediaArtsResponse < ::Crystalline::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
end
end
end
end

View File

@@ -0,0 +1,30 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class PostMediaPosterRequest < ::Crystalline::FieldAugmented
extend T::Sig
# the id of the library item to return the posters of.
field :rating_key, ::Integer, { 'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': false } }
# The contents of the image, if uploading a local file
field :request_body, T.nilable(::String), { 'request': { 'media_type': 'image/*' } }
# The URL of the image, if uploading a remote image
field :url, T.nilable(::String), { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
sig { params(rating_key: ::Integer, request_body: T.nilable(::String), url: T.nilable(::String)).void }
def initialize(rating_key: nil, request_body: nil, url: nil)
@rating_key = rating_key
@request_body = request_body
@url = url
end
end
end
end

View File

@@ -0,0 +1,30 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
class PostMediaPosterResponse < ::Crystalline::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
end
end
end
end

View File

@@ -64,9 +64,9 @@ module PlexRubySDK
end end
@language = 'ruby' @language = 'ruby'
@openapi_doc_version = '0.0.3' @openapi_doc_version = '0.0.3'
@sdk_version = '0.8.0' @sdk_version = '0.8.1'
@gen_version = '2.563.1' @gen_version = '2.565.1'
@user_agent = 'speakeasy-sdk/ruby 0.8.0 2.563.1 0.0.3 plex_ruby_sdk' @user_agent = 'speakeasy-sdk/ruby 0.8.1 2.565.1 0.0.3 plex_ruby_sdk'
end end
sig { returns([String, T::Hash[Symbol, String]]) } sig { returns([String, T::Hash[Symbol, String]]) }

View File

@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = 'plex_ruby_sdk' s.name = 'plex_ruby_sdk'
s.version = '0.8.0' s.version = '0.8.1'
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.licenses = ['Apache-2.0'] s.licenses = ['Apache-2.0']
s.summary = '' s.summary = ''