mirror of
https://github.com/LukeHagar/plexruby.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.0
This commit is contained in:
@@ -541,7 +541,7 @@ module PlexRubySDK
|
||||
autoload :GetTopWatchedContentCountry, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_country.rb'
|
||||
autoload :GetTopWatchedContentGuids, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_guids.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 :GetTopWatchedContentMediaContainer, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_mediacontainer.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 :ApplyUpdatesBadRequest, 'plex_ruby_sdk/models/operations/applyupdates_badrequest.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
|
||||
|
||||
21
lib/plex_ruby_sdk/models/operations/alllibraries.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/alllibraries.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/allowcameraupload.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/allowcameraupload.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/allowchannels.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/allowchannels.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/allowsubtitleadmin.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/allowsubtitleadmin.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/allowsync.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/allowsync.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/allowtuners.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/allowtuners.rb
Normal 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
|
||||
27
lib/plex_ruby_sdk/models/operations/get_users_badrequest.rb
Normal file
27
lib/plex_ruby_sdk/models/operations/get_users_badrequest.rb
Normal 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
|
||||
33
lib/plex_ruby_sdk/models/operations/get_users_errors.rb
Normal file
33
lib/plex_ruby_sdk/models/operations/get_users_errors.rb
Normal 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
|
||||
@@ -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
|
||||
63
lib/plex_ruby_sdk/models/operations/get_users_request.rb
Normal file
63
lib/plex_ruby_sdk/models/operations/get_users_request.rb
Normal 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
|
||||
42
lib/plex_ruby_sdk/models/operations/get_users_response.rb
Normal file
42
lib/plex_ruby_sdk/models/operations/get_users_response.rb
Normal 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
|
||||
@@ -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
|
||||
51
lib/plex_ruby_sdk/models/operations/get_users_server.rb
Normal file
51
lib/plex_ruby_sdk/models/operations/get_users_server.rb
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -70,14 +70,14 @@ module PlexRubySDK
|
||||
|
||||
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 :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)
|
||||
@added_at = added_at
|
||||
@art = art
|
||||
|
||||
@@ -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
|
||||
21
lib/plex_ruby_sdk/models/operations/home.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/home.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/owned.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/owned.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/pending.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/pending.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/protected.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/protected.rb
Normal 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
|
||||
21
lib/plex_ruby_sdk/models/operations/restricted.rb
Normal file
21
lib/plex_ruby_sdk/models/operations/restricted.rb
Normal 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
|
||||
@@ -6,18 +6,78 @@
|
||||
|
||||
module PlexRubySDK
|
||||
module Operations
|
||||
USER_SERVERS = [
|
||||
'https://plex.tv/api'
|
||||
].freeze
|
||||
|
||||
|
||||
class User < ::PlexRubySDK::Utils::FieldAugmented
|
||||
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 }
|
||||
def initialize(id: nil)
|
||||
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(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
|
||||
@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
|
||||
|
||||
@@ -13,7 +13,7 @@ module PlexRubySDK
|
||||
class PlexAPI
|
||||
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
|
||||
params(client: Faraday::Request,
|
||||
@@ -114,6 +114,7 @@ module PlexRubySDK
|
||||
@statistics = Statistics.new(@sdk_configuration)
|
||||
@sessions = Sessions.new(@sdk_configuration)
|
||||
@updater = Updater.new(@sdk_configuration)
|
||||
@users = Users.new(@sdk_configuration)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,9 +40,9 @@ module PlexRubySDK
|
||||
@security = security
|
||||
@language = 'ruby'
|
||||
@openapi_doc_version = '0.0.3'
|
||||
@sdk_version = '0.7.2'
|
||||
@gen_version = '2.503.2'
|
||||
@user_agent = 'speakeasy-sdk/ruby 0.7.2 2.503.2 0.0.3 plex_ruby_sdk'
|
||||
@sdk_version = '0.7.3'
|
||||
@gen_version = '2.506.0'
|
||||
@user_agent = 'speakeasy-sdk/ruby 0.7.3 2.506.0 0.0.3 plex_ruby_sdk'
|
||||
end
|
||||
|
||||
sig { returns([String, T::Hash[Symbol, String]]) }
|
||||
|
||||
65
lib/plex_ruby_sdk/users.rb
Normal file
65
lib/plex_ruby_sdk/users.rb
Normal 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
|
||||
Reference in New Issue
Block a user