ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.0

This commit is contained in:
speakeasybot
2025-02-07 00:09:14 +00:00
parent 05d9189c07
commit d0612f0118
60 changed files with 1185 additions and 30 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: 14b35829d4be91a88269761c3ed01426 docChecksum: 7dec92ab9151a1b5a35df5faa81811ba
docVersion: 0.0.3 docVersion: 0.0.3
speakeasyVersion: 1.484.1 speakeasyVersion: 1.487.0
generationVersion: 2.503.2 generationVersion: 2.506.0
releaseVersion: 0.7.2 releaseVersion: 0.7.3
configChecksum: f8b827052ae75626fa447b20a8597211 configChecksum: a483b18d4304a34e95c72b6b2855944c
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
@@ -41,6 +41,12 @@ generatedFiles:
- docs/models/operations/addplaylistcontentsresponse.md - docs/models/operations/addplaylistcontentsresponse.md
- docs/models/operations/addplaylistcontentsresponsebody.md - docs/models/operations/addplaylistcontentsresponsebody.md
- docs/models/operations/addplaylistcontentsunauthorized.md - docs/models/operations/addplaylistcontentsunauthorized.md
- docs/models/operations/alllibraries.md
- docs/models/operations/allowcameraupload.md
- docs/models/operations/allowchannels.md
- docs/models/operations/allowsubtitleadmin.md
- docs/models/operations/allowsync.md
- docs/models/operations/allowtuners.md
- docs/models/operations/applyupdatesbadrequest.md - docs/models/operations/applyupdatesbadrequest.md
- docs/models/operations/applyupdateserrors.md - docs/models/operations/applyupdateserrors.md
- docs/models/operations/applyupdatesrequest.md - docs/models/operations/applyupdatesrequest.md
@@ -618,6 +624,7 @@ generatedFiles:
- docs/models/operations/gettopwatchedcontentresponsebody.md - docs/models/operations/gettopwatchedcontentresponsebody.md
- docs/models/operations/gettopwatchedcontentrole.md - docs/models/operations/gettopwatchedcontentrole.md
- docs/models/operations/gettopwatchedcontentunauthorized.md - docs/models/operations/gettopwatchedcontentunauthorized.md
- docs/models/operations/gettopwatchedcontentuser.md
- docs/models/operations/gettranscodesessionsbadrequest.md - docs/models/operations/gettranscodesessionsbadrequest.md
- docs/models/operations/gettranscodesessionserrors.md - docs/models/operations/gettranscodesessionserrors.md
- docs/models/operations/gettranscodesessionsmediacontainer.md - docs/models/operations/gettranscodesessionsmediacontainer.md
@@ -644,6 +651,15 @@ generatedFiles:
- docs/models/operations/getuserfriendsplexerrors.md - docs/models/operations/getuserfriendsplexerrors.md
- docs/models/operations/getuserfriendsresponse.md - docs/models/operations/getuserfriendsresponse.md
- docs/models/operations/getuserfriendsunauthorized.md - docs/models/operations/getuserfriendsunauthorized.md
- docs/models/operations/getusersbadrequest.md
- docs/models/operations/getuserserrors.md
- docs/models/operations/getusersmediacontainer.md
- docs/models/operations/getusersrequest.md
- docs/models/operations/getusersresponse.md
- docs/models/operations/getusersresponsebody.md
- docs/models/operations/getusersserver.md
- docs/models/operations/getusersunauthorized.md
- docs/models/operations/getusersuserserrors.md
- docs/models/operations/getwatchlistbadrequest.md - docs/models/operations/getwatchlistbadrequest.md
- docs/models/operations/getwatchlisterrors.md - docs/models/operations/getwatchlisterrors.md
- docs/models/operations/getwatchlistrequest.md - docs/models/operations/getwatchlistrequest.md
@@ -653,6 +669,7 @@ generatedFiles:
- docs/models/operations/getwatchlistwatchlisterrors.md - docs/models/operations/getwatchlistwatchlisterrors.md
- docs/models/operations/guids.md - docs/models/operations/guids.md
- docs/models/operations/hasthumbnail.md - docs/models/operations/hasthumbnail.md
- docs/models/operations/home.md
- docs/models/operations/hub.md - docs/models/operations/hub.md
- docs/models/operations/image.md - docs/models/operations/image.md
- docs/models/operations/includecollections.md - docs/models/operations/includecollections.md
@@ -704,9 +721,11 @@ generatedFiles:
- docs/models/operations/onlytransient.md - docs/models/operations/onlytransient.md
- docs/models/operations/operator.md - docs/models/operations/operator.md
- docs/models/operations/optimizedforstreaming.md - docs/models/operations/optimizedforstreaming.md
- docs/models/operations/owned.md
- docs/models/operations/part.md - docs/models/operations/part.md
- docs/models/operations/pastsubscription.md - docs/models/operations/pastsubscription.md
- docs/models/operations/pathparamtaskname.md - docs/models/operations/pathparamtaskname.md
- docs/models/operations/pending.md
- docs/models/operations/performsearchbadrequest.md - docs/models/operations/performsearchbadrequest.md
- docs/models/operations/performsearcherrors.md - docs/models/operations/performsearcherrors.md
- docs/models/operations/performsearchrequest.md - docs/models/operations/performsearchrequest.md
@@ -746,6 +765,7 @@ generatedFiles:
- docs/models/operations/postuserssignindatauserprofile.md - docs/models/operations/postuserssignindatauserprofile.md
- docs/models/operations/postuserssignindatawatchedindicator.md - docs/models/operations/postuserssignindatawatchedindicator.md
- docs/models/operations/producer.md - docs/models/operations/producer.md
- docs/models/operations/protected.md
- docs/models/operations/protocol.md - docs/models/operations/protocol.md
- docs/models/operations/provider.md - docs/models/operations/provider.md
- docs/models/operations/queryparamfilter.md - docs/models/operations/queryparamfilter.md
@@ -759,6 +779,7 @@ generatedFiles:
- docs/models/operations/ratings.md - docs/models/operations/ratings.md
- docs/models/operations/release.md - docs/models/operations/release.md
- docs/models/operations/responsebody.md - docs/models/operations/responsebody.md
- docs/models/operations/restricted.md
- docs/models/operations/role.md - docs/models/operations/role.md
- docs/models/operations/scope.md - docs/models/operations/scope.md
- docs/models/operations/searchresult.md - docs/models/operations/searchresult.md
@@ -860,6 +881,7 @@ generatedFiles:
- docs/sdks/sessions/README.md - docs/sdks/sessions/README.md
- docs/sdks/statistics/README.md - docs/sdks/statistics/README.md
- docs/sdks/updater/README.md - docs/sdks/updater/README.md
- docs/sdks/users/README.md
- docs/sdks/video/README.md - docs/sdks/video/README.md
- docs/sdks/watchlist/README.md - docs/sdks/watchlist/README.md
- lib/plex_ruby_sdk.rb - lib/plex_ruby_sdk.rb
@@ -884,6 +906,12 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_response.rb - lib/plex_ruby_sdk/models/operations/addplaylistcontents_response.rb
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_responsebody.rb - lib/plex_ruby_sdk/models/operations/addplaylistcontents_responsebody.rb
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_unauthorized.rb - lib/plex_ruby_sdk/models/operations/addplaylistcontents_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/alllibraries.rb
- lib/plex_ruby_sdk/models/operations/allowcameraupload.rb
- lib/plex_ruby_sdk/models/operations/allowchannels.rb
- lib/plex_ruby_sdk/models/operations/allowsubtitleadmin.rb
- lib/plex_ruby_sdk/models/operations/allowsync.rb
- lib/plex_ruby_sdk/models/operations/allowtuners.rb
- lib/plex_ruby_sdk/models/operations/applyupdates_badrequest.rb - lib/plex_ruby_sdk/models/operations/applyupdates_badrequest.rb
- lib/plex_ruby_sdk/models/operations/applyupdates_errors.rb - lib/plex_ruby_sdk/models/operations/applyupdates_errors.rb
- lib/plex_ruby_sdk/models/operations/applyupdates_request.rb - lib/plex_ruby_sdk/models/operations/applyupdates_request.rb
@@ -1183,6 +1211,15 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/get_thumb_image_request.rb - lib/plex_ruby_sdk/models/operations/get_thumb_image_request.rb
- lib/plex_ruby_sdk/models/operations/get_thumb_image_response.rb - lib/plex_ruby_sdk/models/operations/get_thumb_image_response.rb
- lib/plex_ruby_sdk/models/operations/get_thumb_image_unauthorized.rb - lib/plex_ruby_sdk/models/operations/get_thumb_image_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/get_users_badrequest.rb
- lib/plex_ruby_sdk/models/operations/get_users_errors.rb
- lib/plex_ruby_sdk/models/operations/get_users_mediacontainer.rb
- lib/plex_ruby_sdk/models/operations/get_users_request.rb
- lib/plex_ruby_sdk/models/operations/get_users_response.rb
- lib/plex_ruby_sdk/models/operations/get_users_responsebody.rb
- lib/plex_ruby_sdk/models/operations/get_users_server.rb
- lib/plex_ruby_sdk/models/operations/get_users_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/get_users_users_errors.rb
- lib/plex_ruby_sdk/models/operations/get_watch_list_badrequest.rb - lib/plex_ruby_sdk/models/operations/get_watch_list_badrequest.rb
- lib/plex_ruby_sdk/models/operations/get_watch_list_errors.rb - lib/plex_ruby_sdk/models/operations/get_watch_list_errors.rb
- lib/plex_ruby_sdk/models/operations/get_watch_list_request.rb - lib/plex_ruby_sdk/models/operations/get_watch_list_request.rb
@@ -1468,6 +1505,7 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb - lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb - lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_unauthorized.rb - lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_user.rb
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_badrequest.rb - lib/plex_ruby_sdk/models/operations/gettranscodesessions_badrequest.rb
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_errors.rb - lib/plex_ruby_sdk/models/operations/gettranscodesessions_errors.rb
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_mediacontainer.rb - lib/plex_ruby_sdk/models/operations/gettranscodesessions_mediacontainer.rb
@@ -1496,6 +1534,7 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/getuserfriends_unauthorized.rb - lib/plex_ruby_sdk/models/operations/getuserfriends_unauthorized.rb
- lib/plex_ruby_sdk/models/operations/guids.rb - lib/plex_ruby_sdk/models/operations/guids.rb
- lib/plex_ruby_sdk/models/operations/hasthumbnail.rb - lib/plex_ruby_sdk/models/operations/hasthumbnail.rb
- lib/plex_ruby_sdk/models/operations/home.rb
- lib/plex_ruby_sdk/models/operations/hub.rb - lib/plex_ruby_sdk/models/operations/hub.rb
- lib/plex_ruby_sdk/models/operations/image.rb - lib/plex_ruby_sdk/models/operations/image.rb
- lib/plex_ruby_sdk/models/operations/includecollections.rb - lib/plex_ruby_sdk/models/operations/includecollections.rb
@@ -1547,9 +1586,11 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/onlytransient.rb - lib/plex_ruby_sdk/models/operations/onlytransient.rb
- lib/plex_ruby_sdk/models/operations/operator.rb - lib/plex_ruby_sdk/models/operations/operator.rb
- lib/plex_ruby_sdk/models/operations/optimizedforstreaming.rb - lib/plex_ruby_sdk/models/operations/optimizedforstreaming.rb
- lib/plex_ruby_sdk/models/operations/owned.rb
- lib/plex_ruby_sdk/models/operations/part.rb - lib/plex_ruby_sdk/models/operations/part.rb
- lib/plex_ruby_sdk/models/operations/pastsubscription.rb - lib/plex_ruby_sdk/models/operations/pastsubscription.rb
- lib/plex_ruby_sdk/models/operations/pathparam_taskname.rb - lib/plex_ruby_sdk/models/operations/pathparam_taskname.rb
- lib/plex_ruby_sdk/models/operations/pending.rb
- lib/plex_ruby_sdk/models/operations/performsearch_badrequest.rb - lib/plex_ruby_sdk/models/operations/performsearch_badrequest.rb
- lib/plex_ruby_sdk/models/operations/performsearch_errors.rb - lib/plex_ruby_sdk/models/operations/performsearch_errors.rb
- lib/plex_ruby_sdk/models/operations/performsearch_request.rb - lib/plex_ruby_sdk/models/operations/performsearch_request.rb
@@ -1589,6 +1630,7 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userprofile.rb - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userprofile.rb
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_watchedindicator.rb - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_watchedindicator.rb
- lib/plex_ruby_sdk/models/operations/producer.rb - lib/plex_ruby_sdk/models/operations/producer.rb
- lib/plex_ruby_sdk/models/operations/protected.rb
- lib/plex_ruby_sdk/models/operations/protocol.rb - lib/plex_ruby_sdk/models/operations/protocol.rb
- lib/plex_ruby_sdk/models/operations/provider.rb - lib/plex_ruby_sdk/models/operations/provider.rb
- lib/plex_ruby_sdk/models/operations/queryparam_filter.rb - lib/plex_ruby_sdk/models/operations/queryparam_filter.rb
@@ -1602,6 +1644,7 @@ generatedFiles:
- lib/plex_ruby_sdk/models/operations/ratings.rb - lib/plex_ruby_sdk/models/operations/ratings.rb
- lib/plex_ruby_sdk/models/operations/release.rb - lib/plex_ruby_sdk/models/operations/release.rb
- lib/plex_ruby_sdk/models/operations/responsebody.rb - lib/plex_ruby_sdk/models/operations/responsebody.rb
- lib/plex_ruby_sdk/models/operations/restricted.rb
- lib/plex_ruby_sdk/models/operations/role.rb - lib/plex_ruby_sdk/models/operations/role.rb
- lib/plex_ruby_sdk/models/operations/scope.rb - lib/plex_ruby_sdk/models/operations/scope.rb
- lib/plex_ruby_sdk/models/operations/searchresult.rb - lib/plex_ruby_sdk/models/operations/searchresult.rb
@@ -1700,6 +1743,7 @@ generatedFiles:
- lib/plex_ruby_sdk/sessions.rb - lib/plex_ruby_sdk/sessions.rb
- lib/plex_ruby_sdk/statistics.rb - lib/plex_ruby_sdk/statistics.rb
- lib/plex_ruby_sdk/updater.rb - lib/plex_ruby_sdk/updater.rb
- lib/plex_ruby_sdk/users.rb
- lib/plex_ruby_sdk/utils/metadata_fields.rb - lib/plex_ruby_sdk/utils/metadata_fields.rb
- lib/plex_ruby_sdk/utils/t.rb - lib/plex_ruby_sdk/utils/t.rb
- lib/plex_ruby_sdk/utils/utils.rb - lib/plex_ruby_sdk/utils/utils.rb
@@ -2754,5 +2798,29 @@ examples:
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"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}, {"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}, {"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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
get-users:
"":
parameters:
header:
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
X-Plex-Product: "Plex for Roku"
X-Plex-Device: "Roku 3"
X-Plex-Device-Name: "Chrome"
X-Plex-Device-Screen-Resolution: "1487x1165,2560x1440"
X-Plex-Version: "2.4.1"
X-Plex-Platform: "Roku"
X-Plex-Features: "external-media,indirect-media,hub-style-list"
X-Plex-Model: "4200X"
X-Plex-Session-Id: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca"
X-Plex-Language: "en"
X-Plex-Platform-Version: "4.3 build 1057"
X-Plex-Token: "CV5xoxjTpFKUzBTShsaf"
responses:
"200":
application/xml: "0xa9CdebeF9E"
"400":
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
examplesVersion: 1.0.0 examplesVersion: 1.0.0
generatedTests: {} generatedTests: {}

View File

@@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false oAuth2PasswordEnabled: false
ruby: ruby:
version: 0.7.2 version: 0.7.3
author: LukeHagar author: LukeHagar
description: Ruby Client SDK Generated by Speakeasy description: Ruby Client SDK Generated by Speakeasy
imports: imports:

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.484.1 speakeasyVersion: 1.487.0
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:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1738800499 - speakeasy-sdk-regen-1738886888
targets: targets:
plexruby: plexruby:
source: plexapi source: plexapi
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
codeSamplesNamespace: code-samples-ruby-plexruby codeSamplesNamespace: code-samples-ruby-plexruby
codeSamplesRevisionDigest: sha256:59f3668feed7de56e457d134757739c0aefb1abf56ac38710b6f9252f7c8bdf8 codeSamplesRevisionDigest: sha256:d208b8865c0f8cf051965436cf2d8c2215b12e221e9f425a7862e3ceb846fb96
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.7.2) plex_ruby_sdk (0.7.3)
faraday faraday
faraday-multipart faraday-multipart
rack rack

View File

@@ -215,6 +215,10 @@ end
* [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates * [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates
* [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates * [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates
### [users](docs/sdks/users/README.md)
* [get_users](docs/sdks/users/README.md#get_users) - Get list of all connected users
### [video](docs/sdks/video/README.md) ### [video](docs/sdks/video/README.md)
* [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item * [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item

View File

@@ -696,4 +696,14 @@ Based on:
### Generated ### Generated
- [ruby v0.7.2] . - [ruby v0.7.2] .
### Releases ### Releases
- [Ruby Gems v0.7.2] https://rubygems.org/gems/plex_ruby_sdk/versions/0.7.2 - . - [Ruby Gems v0.7.2] https://rubygems.org/gems/plex_ruby_sdk/versions/0.7.2 - .
## 2025-02-07 00:07:54
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.487.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v0.7.3] .
### Releases
- [Ruby Gems v0.7.3] https://rubygems.org/gems/plex_ruby_sdk/versions/0.7.3 - .

View File

@@ -459,6 +459,12 @@ actions:
- lang: ruby - lang: ruby
label: getTokenDetails label: getTokenDetails
source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"<YOUR_API_KEY_HERE>\",\n )\n)\n\n \nres = s.authentication.get_token_details()\n\nif ! res.user_plex_account.nil?\n # handle response\nend" source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\ns.config_security(\n ::PlexRubySDK::Shared::Security.new(\n access_token: \"<YOUR_API_KEY_HERE>\",\n )\n)\n\n \nres = s.authentication.get_token_details()\n\nif ! res.user_plex_account.nil?\n # handle response\nend"
- target: $["paths"]["/users"]["get"]
update:
x-codeSamples:
- lang: ruby
label: users
source: "require 'plex_ruby_sdk'\n\n\ns = ::PlexRubySDK::PlexAPI.new\n\n\nreq = ::PlexRubySDK::Operations::GetUsersRequest.new(\n client_id: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n client_name: \"Plex for Roku\",\n device_nickname: \"Roku 3\",\n device_name: \"Chrome\",\n device_screen_resolution: \"1487x1165,2560x1440\",\n client_version: \"2.4.1\",\n platform: \"Roku\",\n client_features: \"external-media,indirect-media,hub-style-list\",\n model: \"4200X\",\n x_plex_session_id: \"97e136ef-4ddd-4ff3-89a7-a5820c96c2ca\",\n x_plex_language: \"en\",\n platform_version: \"4.3 build 1057\",\n x_plex_token: \"CV5xoxjTpFKUzBTShsaf\",\n)\n \nres = s.users.get_users(req)\n\nif ! res.body.nil?\n # handle response\nend"
- target: $["paths"]["/users/signin"]["post"] - target: $["paths"]["/users/signin"]["post"]
update: update:
x-codeSamples: x-codeSamples:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -36,4 +36,4 @@
| `country` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentCountry](../../models/operations/gettopwatchedcontentcountry.md)> | :heavy_minus_sign: | N/A | | | `country` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentCountry](../../models/operations/gettopwatchedcontentcountry.md)> | :heavy_minus_sign: | N/A | |
| `guids` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentGuids](../../models/operations/gettopwatchedcontentguids.md)> | :heavy_minus_sign: | N/A | | | `guids` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentGuids](../../models/operations/gettopwatchedcontentguids.md)> | :heavy_minus_sign: | N/A | |
| `role` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentRole](../../models/operations/gettopwatchedcontentrole.md)> | :heavy_minus_sign: | N/A | | | `role` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentRole](../../models/operations/gettopwatchedcontentrole.md)> | :heavy_minus_sign: | N/A | |
| `user` | T::Array<[::PlexRubySDK::Operations::User](../../models/operations/user.md)> | :heavy_minus_sign: | N/A | | | `user` | T::Array<[::PlexRubySDK::Operations::GetTopWatchedContentUser](../../models/operations/gettopwatchedcontentuser.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetTopWatchedContentUser
## Fields
| Field | Type | Required | Description | Example |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `id` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 220 |

View File

@@ -0,0 +1,10 @@
# GetUsersBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `errors` | T::Array<[::PlexRubySDK::Operations::GetUsersErrors](../../models/operations/getuserserrors.md)> | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# GetUsersErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,15 @@
# GetUsersMediaContainer
Container holding user and server details.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `friendly_name` | *::String* | :heavy_check_mark: | The friendly name of the Plex instance. | myPlex |
| `identifier` | *::String* | :heavy_check_mark: | N/A | com.plexapp.plugins.myplex |
| `machine_identifier` | *::String* | :heavy_check_mark: | Unique Machine identifier of the Plex server. | 3dff4c4da3b1229a649aa574a9e2b419a684a20e |
| `total_size` | *::Integer* | :heavy_check_mark: | Total number of users. | 30 |
| `size` | *::Integer* | :heavy_check_mark: | Number of users in the current response. | 30 |
| `user` | T::Array<[::PlexRubySDK::Operations::User](../../models/operations/user.md)> | :heavy_check_mark: | List of users with access to the Plex server. | |

View File

@@ -0,0 +1,20 @@
# GetUsersRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client_id` | *::String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `client_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `device_nickname` | *T.nilable(::String)* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `device_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) | Chrome |
| `device_screen_resolution` | *T.nilable(::String)* | :heavy_minus_sign: | The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) | 1487x1165,2560x1440 |
| `client_version` | *T.nilable(::String)* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `platform` | *T.nilable(::String)* | :heavy_minus_sign: | The platform of the client application. | Roku |
| `client_features` | *T.nilable(::String)* | :heavy_minus_sign: | The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) | external-media,indirect-media,hub-style-list |
| `model` | *T.nilable(::String)* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X |
| `x_plex_session_id` | *T.nilable(::String)* | :heavy_minus_sign: | The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) | 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca |
| `x_plex_language` | *T.nilable(::String)* | :heavy_minus_sign: | The language of the client application. | en |
| `platform_version` | *T.nilable(::String)* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 |
| `x_plex_token` | *::String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf |

View File

@@ -0,0 +1,13 @@
# GetUsersResponse
## 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 |
| `body` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `bad_request` | [T.nilable(::PlexRubySDK::Operations::GetUsersBadRequest)](../../models/operations/getusersbadrequest.md) | :heavy_minus_sign: | Bad Request - A parameter was not specified, or was specified incorrectly. |
| `unauthorized` | [T.nilable(::PlexRubySDK::Operations::GetUsersUnauthorized)](../../models/operations/getusersunauthorized.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. |

View File

@@ -0,0 +1,10 @@
# GetUsersResponseBody
Successful response with media container data in XML
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `media_container` | [T.nilable(::PlexRubySDK::Operations::GetUsersMediaContainer)](../../models/operations/getusersmediacontainer.md) | :heavy_minus_sign: | Container holding user and server details. |

View File

@@ -0,0 +1,16 @@
# GetUsersServer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `id` | *::Integer* | :heavy_check_mark: | Unique ID of the server of the connected user | 907759180 |
| `server_id` | *::Integer* | :heavy_check_mark: | ID of the actual Plex server. | 9999999 |
| `machine_identifier` | *::String* | :heavy_check_mark: | Machine identifier of the Plex server. | fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 |
| `name` | *::String* | :heavy_check_mark: | Name of the Plex server of the connected user. | ConnectedUserFlix |
| `last_seen_at` | *::Integer* | :heavy_check_mark: | N/A | 1556281940 |
| `num_libraries` | *::Integer* | :heavy_check_mark: | Number of libraries in the server this user has access to. | 16 |
| `all_libraries` | [::PlexRubySDK::Operations::AllLibraries](../../models/operations/alllibraries.md) | :heavy_check_mark: | N/A | 1 |
| `owned` | [::PlexRubySDK::Operations::Owned](../../models/operations/owned.md) | :heavy_check_mark: | N/A | 1 |
| `pending` | [::PlexRubySDK::Operations::Pending](../../models/operations/pending.md) | :heavy_check_mark: | N/A | 1 |

View File

@@ -0,0 +1,10 @@
# GetUsersUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `errors` | T::Array<[::PlexRubySDK::Operations::GetUsersUsersErrors](../../models/operations/getusersuserserrors.md)> | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# GetUsersUsersErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# Home
Indicates if the user is part of a home group.
## Values
| Name | Value |
| --------- | --------- |
| `DISABLE` | 0 |
| `ENABLE` | 1 |

View File

@@ -0,0 +1,11 @@
# Owned
Indicates if the user owns the server.
## Values
| Name | Value |
| --------- | --------- |
| `DISABLE` | 0 |
| `ENABLE` | 1 |

View File

@@ -0,0 +1,11 @@
# Pending
Indicates if the server is pending approval.
## Values
| Name | Value |
| --------- | --------- |
| `DISABLE` | 0 |
| `ENABLE` | 1 |

View File

@@ -0,0 +1,11 @@
# Protected
Indicates whether the account is protected.
## Values
| Name | Value |
| --------- | --------- |
| `DISABLE` | 0 |
| `ENABLE` | 1 |

View File

@@ -0,0 +1,11 @@
# Restricted
Indicates if the user has restricted access.
## Values
| Name | Value |
| --------- | --------- |
| `DISABLE` | 0 |
| `ENABLE` | 1 |

View File

@@ -3,6 +3,25 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `id` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | 220 | | `id` | *::Integer* | :heavy_check_mark: | User's unique ID. | 22526914 |
| `title` | *::String* | :heavy_check_mark: | User's display name. | Plex User |
| `username` | *::String* | :heavy_check_mark: | User's username. | zgfuc7krcqfimrmb9lsl5j |
| `email` | *::String* | :heavy_check_mark: | User's email address. | zgfuc7krcqfimrmb9lsl5j@protonmail.com |
| `recommendations_playlist_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the user's recommendation playlist. | |
| `thumb` | *::String* | :heavy_check_mark: | URL to the user's avatar image. | https://plex.tv/users/3346028014e93acd/avatar?c=1731605021 |
| `protected` | [::PlexRubySDK::Operations::Protected](../../models/operations/protected.md) | :heavy_check_mark: | N/A | 1 |
| `home` | [::PlexRubySDK::Operations::Home](../../models/operations/home.md) | :heavy_check_mark: | N/A | 1 |
| `allow_tuners` | [::PlexRubySDK::Operations::AllowTuners](../../models/operations/allowtuners.md) | :heavy_check_mark: | N/A | 1 |
| `allow_sync` | [::PlexRubySDK::Operations::AllowSync](../../models/operations/allowsync.md) | :heavy_check_mark: | N/A | 1 |
| `allow_camera_upload` | [::PlexRubySDK::Operations::AllowCameraUpload](../../models/operations/allowcameraupload.md) | :heavy_check_mark: | N/A | 1 |
| `allow_channels` | [::PlexRubySDK::Operations::AllowChannels](../../models/operations/allowchannels.md) | :heavy_check_mark: | N/A | 1 |
| `allow_subtitle_admin` | [::PlexRubySDK::Operations::AllowSubtitleAdmin](../../models/operations/allowsubtitleadmin.md) | :heavy_check_mark: | N/A | 1 |
| `filter_all` | *T.nilable(::String)* | :heavy_minus_sign: | Filters applied for all content. | |
| `filter_movies` | *T.nilable(::String)* | :heavy_minus_sign: | Filters applied for movies. | |
| `filter_music` | *T.nilable(::String)* | :heavy_minus_sign: | Filters applied for music. | |
| `filter_photos` | *T.nilable(::String)* | :heavy_minus_sign: | Filters applied for photos. | |
| `filter_television` | *T.nilable(::String)* | :heavy_minus_sign: | Filters applied for television. | |
| `restricted` | [::PlexRubySDK::Operations::Restricted](../../models/operations/restricted.md) | :heavy_check_mark: | N/A | 1 |
| `server` | T::Array<[::PlexRubySDK::Operations::GetUsersServer](../../models/operations/getusersserver.md)> | :heavy_check_mark: | List of servers owned by the user. | |

57
docs/sdks/users/README.md Normal file
View File

@@ -0,0 +1,57 @@
# Users
(*users*)
## Overview
### Available Operations
* [get_users](#get_users) - Get list of all connected users
## get_users
Get list of all users that are friends and have library access with the provided Plex authentication token
### Example Usage
```ruby
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new
req = ::PlexRubySDK::Operations::GetUsersRequest.new(
client_id: "3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name: "Plex for Roku",
device_nickname: "Roku 3",
device_name: "Chrome",
device_screen_resolution: "1487x1165,2560x1440",
client_version: "2.4.1",
platform: "Roku",
client_features: "external-media,indirect-media,hub-style-list",
model: "4200X",
x_plex_session_id: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca",
x_plex_language: "en",
platform_version: "4.3 build 1057",
x_plex_token: "CV5xoxjTpFKUzBTShsaf",
)
res = s.users.get_users(req)
if ! res.body.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::GetUsersRequest](../../models/operations/getusersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetUsersResponse)](../../models/operations/getusersresponse.md)**

View File

@@ -24,6 +24,7 @@ module PlexRubySDK
autoload :Statistics, 'plex_ruby_sdk/statistics' autoload :Statistics, 'plex_ruby_sdk/statistics'
autoload :Sessions, 'plex_ruby_sdk/sessions' autoload :Sessions, 'plex_ruby_sdk/sessions'
autoload :Updater, 'plex_ruby_sdk/updater' autoload :Updater, 'plex_ruby_sdk/updater'
autoload :Users, 'plex_ruby_sdk/users'
end end
require_relative 'plex_ruby_sdk/utils/t' require_relative 'plex_ruby_sdk/utils/t'

View File

@@ -541,7 +541,7 @@ module PlexRubySDK
autoload :GetTopWatchedContentCountry, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_country.rb' autoload :GetTopWatchedContentCountry, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_country.rb'
autoload :GetTopWatchedContentGuids, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_guids.rb' autoload :GetTopWatchedContentGuids, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_guids.rb'
autoload :GetTopWatchedContentRole, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb' autoload :GetTopWatchedContentRole, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb'
autoload :User, 'plex_ruby_sdk/models/operations/user.rb' autoload :GetTopWatchedContentUser, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_user.rb'
autoload :GetTopWatchedContentMetadata, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_metadata.rb' autoload :GetTopWatchedContentMetadata, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_metadata.rb'
autoload :GetTopWatchedContentMediaContainer, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_mediacontainer.rb' autoload :GetTopWatchedContentMediaContainer, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_mediacontainer.rb'
autoload :GetTopWatchedContentResponseBody, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb' autoload :GetTopWatchedContentResponseBody, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb'
@@ -821,5 +821,26 @@ module PlexRubySDK
autoload :ApplyUpdatesErrors, 'plex_ruby_sdk/models/operations/applyupdates_errors.rb' autoload :ApplyUpdatesErrors, 'plex_ruby_sdk/models/operations/applyupdates_errors.rb'
autoload :ApplyUpdatesBadRequest, 'plex_ruby_sdk/models/operations/applyupdates_badrequest.rb' autoload :ApplyUpdatesBadRequest, 'plex_ruby_sdk/models/operations/applyupdates_badrequest.rb'
autoload :ApplyUpdatesResponse, 'plex_ruby_sdk/models/operations/applyupdates_response.rb' autoload :ApplyUpdatesResponse, 'plex_ruby_sdk/models/operations/applyupdates_response.rb'
autoload :GetUsersRequest, 'plex_ruby_sdk/models/operations/get_users_request.rb'
autoload :GetUsersUsersErrors, 'plex_ruby_sdk/models/operations/get_users_users_errors.rb'
autoload :GetUsersUnauthorized, 'plex_ruby_sdk/models/operations/get_users_unauthorized.rb'
autoload :GetUsersErrors, 'plex_ruby_sdk/models/operations/get_users_errors.rb'
autoload :GetUsersBadRequest, 'plex_ruby_sdk/models/operations/get_users_badrequest.rb'
autoload :Protected, 'plex_ruby_sdk/models/operations/protected.rb'
autoload :Home, 'plex_ruby_sdk/models/operations/home.rb'
autoload :AllowTuners, 'plex_ruby_sdk/models/operations/allowtuners.rb'
autoload :AllowSync, 'plex_ruby_sdk/models/operations/allowsync.rb'
autoload :AllowCameraUpload, 'plex_ruby_sdk/models/operations/allowcameraupload.rb'
autoload :AllowChannels, 'plex_ruby_sdk/models/operations/allowchannels.rb'
autoload :AllowSubtitleAdmin, 'plex_ruby_sdk/models/operations/allowsubtitleadmin.rb'
autoload :Restricted, 'plex_ruby_sdk/models/operations/restricted.rb'
autoload :AllLibraries, 'plex_ruby_sdk/models/operations/alllibraries.rb'
autoload :Owned, 'plex_ruby_sdk/models/operations/owned.rb'
autoload :Pending, 'plex_ruby_sdk/models/operations/pending.rb'
autoload :GetUsersServer, 'plex_ruby_sdk/models/operations/get_users_server.rb'
autoload :User, 'plex_ruby_sdk/models/operations/user.rb'
autoload :GetUsersMediaContainer, 'plex_ruby_sdk/models/operations/get_users_mediacontainer.rb'
autoload :GetUsersResponseBody, 'plex_ruby_sdk/models/operations/get_users_responsebody.rb'
autoload :GetUsersResponse, 'plex_ruby_sdk/models/operations/get_users_response.rb'
end end
end end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALL_LIBRARIES_SERVERS = [
'https://plex.tv/api'
].freeze
# AllLibraries - Indicates if the user has access to all libraries.
class AllLibraries < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALLOW_CAMERA_UPLOAD_SERVERS = [
'https://plex.tv/api'
].freeze
# AllowCameraUpload - Indicates if the user is allowed to upload from a camera.
class AllowCameraUpload < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALLOW_CHANNELS_SERVERS = [
'https://plex.tv/api'
].freeze
# AllowChannels - Indicates if the user has access to channels.
class AllowChannels < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALLOW_SUBTITLE_ADMIN_SERVERS = [
'https://plex.tv/api'
].freeze
# AllowSubtitleAdmin - Indicates if the user can manage subtitles.
class AllowSubtitleAdmin < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALLOW_SYNC_SERVERS = [
'https://plex.tv/api'
].freeze
# AllowSync - Indicates if the user is allowed to sync media.
class AllowSync < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
ALLOW_TUNERS_SERVERS = [
'https://plex.tv/api'
].freeze
# AllowTuners - Indicates if the user is allowed to use tuners.
class AllowTuners < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,27 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_BAD_REQUEST_SERVERS = [
'https://plex.tv/api'
].freeze
# Bad Request - A parameter was not specified, or was specified incorrectly.
class GetUsersBadRequest < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :errors, T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersErrors]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('errors') } }
sig { params(errors: T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersErrors])).void }
def initialize(errors: nil)
@errors = errors
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
GET_USERS_ERRORS_SERVERS = [
'https://plex.tv/api'
].freeze
class GetUsersErrors < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('code') } }
field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('message') } }
field :status, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('status') } }
sig { params(code: T.nilable(::Integer), message: T.nilable(::String), status: T.nilable(::Integer)).void }
def initialize(code: nil, message: nil, status: nil)
@code = code
@message = message
@status = status
end
end
end
end

View File

@@ -0,0 +1,42 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_MEDIA_CONTAINER_SERVERS = [
'https://plex.tv/api'
].freeze
# Container holding user and server details.
class GetUsersMediaContainer < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
# The friendly name of the Plex instance.
field :friendly_name, ::String
field :identifier, ::String
# Unique Machine identifier of the Plex server.
field :machine_identifier, ::String
# Number of users in the current response.
field :size, ::Integer
# Total number of users.
field :total_size, ::Integer
# List of users with access to the Plex server.
field :user, T::Array[::PlexRubySDK::Operations::User]
sig { params(friendly_name: ::String, identifier: ::String, machine_identifier: ::String, size: ::Integer, total_size: ::Integer, user: T::Array[::PlexRubySDK::Operations::User]).void }
def initialize(friendly_name: nil, identifier: nil, machine_identifier: nil, size: nil, total_size: nil, user: nil)
@friendly_name = friendly_name
@identifier = identifier
@machine_identifier = machine_identifier
@size = size
@total_size = total_size
@user = user
end
end
end
end

View File

@@ -0,0 +1,63 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_REQUEST_SERVERS = [
'https://plex.tv/api'
].freeze
class GetUsersRequest < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
# An authentication token, obtained from plex.tv
field :x_plex_token, ::String, { 'header': { 'field_name': 'X-Plex-Token', 'style': 'simple', 'explode': false } }
# The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
field :client_features, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Features', 'style': 'simple', 'explode': false } }
# The name of the client application. (Plex Web, Plex Media Server, etc.)
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
# The version of the client application.
field :client_version, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Version', 'style': 'simple', 'explode': false } }
# The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
field :device_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device-Name', 'style': 'simple', 'explode': false } }
# A relatively friendly name for the client device
field :device_nickname, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device', 'style': 'simple', 'explode': false } }
# The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
field :device_screen_resolution, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device-Screen-Resolution', 'style': 'simple', 'explode': false } }
# A potentially less friendly identifier for the device model
field :model, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Model', 'style': 'simple', 'explode': false } }
# The platform of the client application.
field :platform, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Platform', 'style': 'simple', 'explode': false } }
# The version of the platform
field :platform_version, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Platform-Version', 'style': 'simple', 'explode': false } }
# The language of the client application.
field :x_plex_language, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Language', 'style': 'simple', 'explode': false } }
# The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
field :x_plex_session_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Session-Id', 'style': 'simple', 'explode': false } }
sig { params(client_id: ::String, x_plex_token: ::String, client_features: T.nilable(::String), client_name: T.nilable(::String), client_version: T.nilable(::String), device_name: T.nilable(::String), device_nickname: T.nilable(::String), device_screen_resolution: T.nilable(::String), model: T.nilable(::String), platform: T.nilable(::String), platform_version: T.nilable(::String), x_plex_language: T.nilable(::String), x_plex_session_id: T.nilable(::String)).void }
def initialize(client_id: nil, x_plex_token: nil, client_features: nil, client_name: nil, client_version: nil, device_name: nil, device_nickname: nil, device_screen_resolution: nil, model: nil, platform: nil, platform_version: nil, x_plex_language: nil, x_plex_session_id: nil)
@client_id = client_id
@x_plex_token = x_plex_token
@client_features = client_features
@client_name = client_name
@client_version = client_version
@device_name = device_name
@device_nickname = device_nickname
@device_screen_resolution = device_screen_resolution
@model = model
@platform = platform
@platform_version = platform_version
@x_plex_language = x_plex_language
@x_plex_session_id = x_plex_session_id
end
end
end
end

View File

@@ -0,0 +1,42 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_RESPONSE_SERVERS = [
'https://plex.tv/api'
].freeze
class GetUsersResponse < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
# Bad Request - A parameter was not specified, or was specified incorrectly.
field :bad_request, T.nilable(::PlexRubySDK::Operations::GetUsersBadRequest)
field :body, T.nilable(::String)
# Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
field :unauthorized, T.nilable(::PlexRubySDK::Operations::GetUsersUnauthorized)
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::PlexRubySDK::Operations::GetUsersBadRequest), body: T.nilable(::String), unauthorized: T.nilable(::PlexRubySDK::Operations::GetUsersUnauthorized)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, body: nil, unauthorized: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
@bad_request = bad_request
@body = body
@unauthorized = unauthorized
end
end
end
end

View File

@@ -0,0 +1,27 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_RESPONSE_BODY_SERVERS = [
'https://plex.tv/api'
].freeze
# Successful response with media container data in XML
class GetUsersResponseBody < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
# Container holding user and server details.
field :media_container, T.nilable(::PlexRubySDK::Operations::GetUsersMediaContainer)
sig { params(media_container: T.nilable(::PlexRubySDK::Operations::GetUsersMediaContainer)).void }
def initialize(media_container: nil)
@media_container = media_container
end
end
end
end

View File

@@ -0,0 +1,51 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_SERVER_SERVERS = [
'https://plex.tv/api'
].freeze
class GetUsersServer < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :all_libraries, ::PlexRubySDK::Operations::AllLibraries
# Unique ID of the server of the connected user
field :id, ::Integer
field :last_seen_at, ::Integer
# Machine identifier of the Plex server.
field :machine_identifier, ::String
# Name of the Plex server of the connected user.
field :name, ::String
# Number of libraries in the server this user has access to.
field :num_libraries, ::Integer
field :owned, ::PlexRubySDK::Operations::Owned
field :pending, ::PlexRubySDK::Operations::Pending
# ID of the actual Plex server.
field :server_id, ::Integer
sig { params(all_libraries: ::PlexRubySDK::Operations::AllLibraries, id: ::Integer, last_seen_at: ::Integer, machine_identifier: ::String, name: ::String, num_libraries: ::Integer, owned: ::PlexRubySDK::Operations::Owned, pending: ::PlexRubySDK::Operations::Pending, server_id: ::Integer).void }
def initialize(all_libraries: nil, id: nil, last_seen_at: nil, machine_identifier: nil, name: nil, num_libraries: nil, owned: nil, pending: nil, server_id: nil)
@all_libraries = all_libraries
@id = id
@last_seen_at = last_seen_at
@machine_identifier = machine_identifier
@name = name
@num_libraries = num_libraries
@owned = owned
@pending = pending
@server_id = server_id
end
end
end
end

View File

@@ -0,0 +1,27 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
GET_USERS_UNAUTHORIZED_SERVERS = [
'https://plex.tv/api'
].freeze
# Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
class GetUsersUnauthorized < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :errors, T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersUsersErrors]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('errors') } }
sig { params(errors: T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersUsersErrors])).void }
def initialize(errors: nil)
@errors = errors
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
GET_USERS_USERS_ERRORS_SERVERS = [
'https://plex.tv/api'
].freeze
class GetUsersUsersErrors < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('code') } }
field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('message') } }
field :status, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('status') } }
sig { params(code: T.nilable(::Integer), message: T.nilable(::String), status: T.nilable(::Integer)).void }
def initialize(code: nil, message: nil, status: nil)
@code = code
@message = message
@status = status
end
end
end
end

View File

@@ -70,14 +70,14 @@ module PlexRubySDK
field :updated_at, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('updatedAt') } } field :updated_at, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('updatedAt') } }
field :user, T.nilable(T::Array[::PlexRubySDK::Operations::User]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('User') } } field :user, T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentUser]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('User') } }
field :viewed_leaf_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('viewedLeafCount') } } field :viewed_leaf_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('viewedLeafCount') } }
field :year, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('year') } } field :year, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('year') } }
sig { params(added_at: T.nilable(::Integer), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), child_count: T.nilable(::Integer), content_rating: T.nilable(::String), country: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentCountry]), duration: T.nilable(::Integer), genre: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentGenre]), global_view_count: T.nilable(::Integer), guid: T.nilable(::String), guids: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentGuids]), index: T.nilable(::Integer), key: T.nilable(::String), leaf_count: T.nilable(::Integer), library_section_id: T.nilable(::Integer), library_section_key: T.nilable(::String), library_section_title: T.nilable(::String), originally_available_at: T.nilable(::Date), rating_key: T.nilable(::String), role: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentRole]), slug: T.nilable(::String), studio: T.nilable(::String), summary: T.nilable(::String), tagline: T.nilable(::String), thumb: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String), updated_at: T.nilable(::Integer), user: T.nilable(T::Array[::PlexRubySDK::Operations::User]), viewed_leaf_count: T.nilable(::Integer), year: T.nilable(::Integer)).void } sig { params(added_at: T.nilable(::Integer), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), child_count: T.nilable(::Integer), content_rating: T.nilable(::String), country: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentCountry]), duration: T.nilable(::Integer), genre: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentGenre]), global_view_count: T.nilable(::Integer), guid: T.nilable(::String), guids: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentGuids]), index: T.nilable(::Integer), key: T.nilable(::String), leaf_count: T.nilable(::Integer), library_section_id: T.nilable(::Integer), library_section_key: T.nilable(::String), library_section_title: T.nilable(::String), originally_available_at: T.nilable(::Date), rating_key: T.nilable(::String), role: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentRole]), slug: T.nilable(::String), studio: T.nilable(::String), summary: T.nilable(::String), tagline: T.nilable(::String), thumb: T.nilable(::String), title: T.nilable(::String), type: T.nilable(::String), updated_at: T.nilable(::Integer), user: T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentUser]), viewed_leaf_count: T.nilable(::Integer), year: T.nilable(::Integer)).void }
def initialize(added_at: nil, art: nil, audience_rating: nil, audience_rating_image: nil, child_count: nil, content_rating: nil, country: nil, duration: nil, genre: nil, global_view_count: nil, guid: nil, guids: nil, index: nil, key: nil, leaf_count: nil, library_section_id: nil, library_section_key: nil, library_section_title: nil, originally_available_at: nil, rating_key: nil, role: nil, slug: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, user: nil, viewed_leaf_count: nil, year: nil) def initialize(added_at: nil, art: nil, audience_rating: nil, audience_rating_image: nil, child_count: nil, content_rating: nil, country: nil, duration: nil, genre: nil, global_view_count: nil, guid: nil, guids: nil, index: nil, key: nil, leaf_count: nil, library_section_id: nil, library_section_key: nil, library_section_title: nil, originally_available_at: nil, rating_key: nil, role: nil, slug: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, user: nil, viewed_leaf_count: nil, year: nil)
@added_at = added_at @added_at = added_at
@art = art @art = art

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 GetTopWatchedContentUser < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig
field :id, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('id') } }
sig { params(id: T.nilable(::Integer)).void }
def initialize(id: nil)
@id = id
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
HOME_SERVERS = [
'https://plex.tv/api'
].freeze
# Home - Indicates if the user is part of a home group.
class Home < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
OWNED_SERVERS = [
'https://plex.tv/api'
].freeze
# Owned - Indicates if the user owns the server.
class Owned < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
PENDING_SERVERS = [
'https://plex.tv/api'
].freeze
# Pending - Indicates if the server is pending approval.
class Pending < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
PROTECTED_SERVERS = [
'https://plex.tv/api'
].freeze
# Protected - Indicates whether the account is protected.
class Protected < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -0,0 +1,21 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Operations
RESTRICTED_SERVERS = [
'https://plex.tv/api'
].freeze
# Restricted - Indicates if the user has restricted access.
class Restricted < T::Enum
enums do
DISABLE = new(0)
ENABLE = new(1)
end
end
end
end

View File

@@ -6,18 +6,78 @@
module PlexRubySDK module PlexRubySDK
module Operations module Operations
USER_SERVERS = [
'https://plex.tv/api'
].freeze
class User < ::PlexRubySDK::Utils::FieldAugmented class User < ::PlexRubySDK::Utils::FieldAugmented
extend T::Sig extend T::Sig
field :id, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('id') } } field :allow_camera_upload, ::PlexRubySDK::Operations::AllowCameraUpload
field :allow_channels, ::PlexRubySDK::Operations::AllowChannels
field :allow_subtitle_admin, ::PlexRubySDK::Operations::AllowSubtitleAdmin
field :allow_sync, ::PlexRubySDK::Operations::AllowSync
field :allow_tuners, ::PlexRubySDK::Operations::AllowTuners
# User's email address.
field :email, ::String
field :home, ::PlexRubySDK::Operations::Home
# User's unique ID.
field :id, ::Integer
field :protected, ::PlexRubySDK::Operations::Protected
field :restricted, ::PlexRubySDK::Operations::Restricted
# List of servers owned by the user.
field :server, T::Array[::PlexRubySDK::Operations::GetUsersServer]
# URL to the user's avatar image.
field :thumb, ::String
# User's display name.
field :title, ::String
# User's username.
field :username, ::String
# Filters applied for all content.
field :filter_all, T.nilable(::String)
# Filters applied for movies.
field :filter_movies, T.nilable(::String)
# Filters applied for music.
field :filter_music, T.nilable(::String)
# Filters applied for photos.
field :filter_photos, T.nilable(::String)
# Filters applied for television.
field :filter_television, T.nilable(::String)
# ID of the user's recommendation playlist.
field :recommendations_playlist_id, T.nilable(::String)
sig { params(id: T.nilable(::Integer)).void } sig { params(allow_camera_upload: ::PlexRubySDK::Operations::AllowCameraUpload, allow_channels: ::PlexRubySDK::Operations::AllowChannels, allow_subtitle_admin: ::PlexRubySDK::Operations::AllowSubtitleAdmin, allow_sync: ::PlexRubySDK::Operations::AllowSync, allow_tuners: ::PlexRubySDK::Operations::AllowTuners, email: ::String, home: ::PlexRubySDK::Operations::Home, id: ::Integer, protected: ::PlexRubySDK::Operations::Protected, restricted: ::PlexRubySDK::Operations::Restricted, server: T::Array[::PlexRubySDK::Operations::GetUsersServer], thumb: ::String, title: ::String, username: ::String, filter_all: T.nilable(::String), filter_movies: T.nilable(::String), filter_music: T.nilable(::String), filter_photos: T.nilable(::String), filter_television: T.nilable(::String), recommendations_playlist_id: T.nilable(::String)).void }
def initialize(id: nil) def initialize(allow_camera_upload: nil, allow_channels: nil, allow_subtitle_admin: nil, allow_sync: nil, allow_tuners: nil, email: nil, home: nil, id: nil, protected: nil, restricted: nil, server: nil, thumb: nil, title: nil, username: nil, filter_all: nil, filter_movies: nil, filter_music: nil, filter_photos: nil, filter_television: nil, recommendations_playlist_id: nil)
@allow_camera_upload = allow_camera_upload
@allow_channels = allow_channels
@allow_subtitle_admin = allow_subtitle_admin
@allow_sync = allow_sync
@allow_tuners = allow_tuners
@email = email
@home = home
@id = id @id = id
@protected = protected
@restricted = restricted
@server = server
@thumb = thumb
@title = title
@username = username
@filter_all = filter_all
@filter_movies = filter_movies
@filter_music = filter_music
@filter_photos = filter_photos
@filter_television = filter_television
@recommendations_playlist_id = recommendations_playlist_id
end end
end end
end end

View File

@@ -13,7 +13,7 @@ module PlexRubySDK
class PlexAPI class PlexAPI
extend T::Sig extend T::Sig
attr_accessor :server, :media, :video, :activities, :butler, :plex, :hubs, :search, :library, :watchlist, :log, :playlists, :authentication, :statistics, :sessions, :updater attr_accessor :server, :media, :video, :activities, :butler, :plex, :hubs, :search, :library, :watchlist, :log, :playlists, :authentication, :statistics, :sessions, :updater, :users
sig do sig do
params(client: Faraday::Request, params(client: Faraday::Request,
@@ -114,6 +114,7 @@ module PlexRubySDK
@statistics = Statistics.new(@sdk_configuration) @statistics = Statistics.new(@sdk_configuration)
@sessions = Sessions.new(@sdk_configuration) @sessions = Sessions.new(@sdk_configuration)
@updater = Updater.new(@sdk_configuration) @updater = Updater.new(@sdk_configuration)
@users = Users.new(@sdk_configuration)
end end
end end
end end

View File

@@ -40,9 +40,9 @@ module PlexRubySDK
@security = security @security = security
@language = 'ruby' @language = 'ruby'
@openapi_doc_version = '0.0.3' @openapi_doc_version = '0.0.3'
@sdk_version = '0.7.2' @sdk_version = '0.7.3'
@gen_version = '2.503.2' @gen_version = '2.506.0'
@user_agent = 'speakeasy-sdk/ruby 0.7.2 2.503.2 0.0.3 plex_ruby_sdk' @user_agent = 'speakeasy-sdk/ruby 0.7.3 2.506.0 0.0.3 plex_ruby_sdk'
end end
sig { returns([String, T::Hash[Symbol, String]]) } sig { returns([String, T::Hash[Symbol, String]]) }

View File

@@ -0,0 +1,65 @@
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
require 'faraday'
require 'faraday/multipart'
require 'sorbet-runtime'
module PlexRubySDK
extend T::Sig
class Users
extend T::Sig
# GET_USERS_SERVERS contains the list of server urls available to the SDK.
GET_USERS_SERVERS = [
'https://plex.tv/api',
].freeze
sig { params(sdk_config: SDKConfiguration).void }
def initialize(sdk_config)
@sdk_configuration = sdk_config
end
sig { params(request: T.nilable(::PlexRubySDK::Operations::GetUsersRequest), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetUsersResponse) }
def get_users(request, server_url = nil)
# get_users - Get list of all connected users
# Get list of all users that are friends and have library access with the provided Plex authentication token
base_url = Utils.template_url(GET_USERS_SERVERS[0], {
})
base_url = server_url if !server_url.nil?
url = "#{base_url}/users"
headers = Utils.get_headers(request)
headers['Accept'] = 'application/json;q=1, application/xml;q=0'
headers['user-agent'] = @sdk_configuration.user_agent
r = @sdk_configuration.client.get(url) do |req|
req.headers = headers
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::GetUsersResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
res.body = r.env.response_body if Utils.match_content_type(content_type, 'application/xml')
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetUsersBadRequest)
res.bad_request = out
end
elsif r.status == 401
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetUsersUnauthorized)
res.unauthorized = out
end
end
res
end
end
end

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.7.2' s.version = '0.7.3'
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.licenses = ['Apache-2.0'] s.licenses = ['Apache-2.0']
s.summary = '' s.summary = ''