plex_ruby_sdk 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/plex_ruby_sdk/models/operations/alllibraries.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/allowcameraupload.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/allowchannels.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/allowsubtitleadmin.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/allowsync.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/allowtuners.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_badrequest.rb +27 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_errors.rb +33 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_mediacontainer.rb +42 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_request.rb +63 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_response.rb +42 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_responsebody.rb +27 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_server.rb +51 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_unauthorized.rb +27 -0
- data/lib/plex_ruby_sdk/models/operations/get_users_users_errors.rb +33 -0
- data/lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_metadata.rb +2 -2
- data/lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_user.rb +24 -0
- data/lib/plex_ruby_sdk/models/operations/home.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/owned.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/pending.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/protected.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/restricted.rb +21 -0
- data/lib/plex_ruby_sdk/models/operations/user.rb +63 -3
- data/lib/plex_ruby_sdk/models/operations.rb +22 -1
- data/lib/plex_ruby_sdk/plex_api.rb +2 -1
- data/lib/plex_ruby_sdk/sdkconfiguration.rb +3 -3
- data/lib/plex_ruby_sdk/users.rb +65 -0
- data/lib/plex_ruby_sdk.rb +1 -0
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0fef6b031792cfea7644383065d3cecf372b88e136a4ecddcc2ab9b4600129a
|
4
|
+
data.tar.gz: 6020a201d6613231fe50babdda652b6ec25bc74681823c88896b4fde2b6f6771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff59308559343b89c91afab9ba331e60e811a4396a31c4551d800fb5772e68165e9799ed606f186bf86b12325ccecf377639169a920749151019f54fd9cad48a
|
7
|
+
data.tar.gz: 0bd2510d6c3188e2eb361081da03cde880f8ebe6fb26fe5e89f37a6c04cce68edc4cdce48d3240cf07ebea77b4c89b4fb40ad66b13987972b380bad26a86eb38
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALL_LIBRARIES_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllLibraries - Indicates if the user has access to all libraries.
|
14
|
+
class AllLibraries < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALLOW_CAMERA_UPLOAD_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllowCameraUpload - Indicates if the user is allowed to upload from a camera.
|
14
|
+
class AllowCameraUpload < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALLOW_CHANNELS_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllowChannels - Indicates if the user has access to channels.
|
14
|
+
class AllowChannels < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALLOW_SUBTITLE_ADMIN_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllowSubtitleAdmin - Indicates if the user can manage subtitles.
|
14
|
+
class AllowSubtitleAdmin < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALLOW_SYNC_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllowSync - Indicates if the user is allowed to sync media.
|
14
|
+
class AllowSync < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
ALLOW_TUNERS_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# AllowTuners - Indicates if the user is allowed to use tuners.
|
14
|
+
class AllowTuners < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_BAD_REQUEST_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Bad Request - A parameter was not specified, or was specified incorrectly.
|
14
|
+
class GetUsersBadRequest < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
|
18
|
+
field :errors, T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersErrors]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('errors') } }
|
19
|
+
|
20
|
+
|
21
|
+
sig { params(errors: T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersErrors])).void }
|
22
|
+
def initialize(errors: nil)
|
23
|
+
@errors = errors
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_ERRORS_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
|
14
|
+
class GetUsersErrors < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
|
18
|
+
field :code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('code') } }
|
19
|
+
|
20
|
+
field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('message') } }
|
21
|
+
|
22
|
+
field :status, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('status') } }
|
23
|
+
|
24
|
+
|
25
|
+
sig { params(code: T.nilable(::Integer), message: T.nilable(::String), status: T.nilable(::Integer)).void }
|
26
|
+
def initialize(code: nil, message: nil, status: nil)
|
27
|
+
@code = code
|
28
|
+
@message = message
|
29
|
+
@status = status
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_MEDIA_CONTAINER_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Container holding user and server details.
|
14
|
+
class GetUsersMediaContainer < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
# The friendly name of the Plex instance.
|
18
|
+
field :friendly_name, ::String
|
19
|
+
|
20
|
+
field :identifier, ::String
|
21
|
+
# Unique Machine identifier of the Plex server.
|
22
|
+
field :machine_identifier, ::String
|
23
|
+
# Number of users in the current response.
|
24
|
+
field :size, ::Integer
|
25
|
+
# Total number of users.
|
26
|
+
field :total_size, ::Integer
|
27
|
+
# List of users with access to the Plex server.
|
28
|
+
field :user, T::Array[::PlexRubySDK::Operations::User]
|
29
|
+
|
30
|
+
|
31
|
+
sig { params(friendly_name: ::String, identifier: ::String, machine_identifier: ::String, size: ::Integer, total_size: ::Integer, user: T::Array[::PlexRubySDK::Operations::User]).void }
|
32
|
+
def initialize(friendly_name: nil, identifier: nil, machine_identifier: nil, size: nil, total_size: nil, user: nil)
|
33
|
+
@friendly_name = friendly_name
|
34
|
+
@identifier = identifier
|
35
|
+
@machine_identifier = machine_identifier
|
36
|
+
@size = size
|
37
|
+
@total_size = total_size
|
38
|
+
@user = user
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_REQUEST_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
|
14
|
+
class GetUsersRequest < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
18
|
+
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
19
|
+
# An authentication token, obtained from plex.tv
|
20
|
+
field :x_plex_token, ::String, { 'header': { 'field_name': 'X-Plex-Token', 'style': 'simple', 'explode': false } }
|
21
|
+
# The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
|
22
|
+
field :client_features, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Features', 'style': 'simple', 'explode': false } }
|
23
|
+
# The name of the client application. (Plex Web, Plex Media Server, etc.)
|
24
|
+
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
|
25
|
+
# The version of the client application.
|
26
|
+
field :client_version, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Version', 'style': 'simple', 'explode': false } }
|
27
|
+
# 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.)
|
28
|
+
field :device_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device-Name', 'style': 'simple', 'explode': false } }
|
29
|
+
# A relatively friendly name for the client device
|
30
|
+
field :device_nickname, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device', 'style': 'simple', 'explode': false } }
|
31
|
+
# The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
|
32
|
+
field :device_screen_resolution, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Device-Screen-Resolution', 'style': 'simple', 'explode': false } }
|
33
|
+
# A potentially less friendly identifier for the device model
|
34
|
+
field :model, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Model', 'style': 'simple', 'explode': false } }
|
35
|
+
# The platform of the client application.
|
36
|
+
field :platform, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Platform', 'style': 'simple', 'explode': false } }
|
37
|
+
# The version of the platform
|
38
|
+
field :platform_version, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Platform-Version', 'style': 'simple', 'explode': false } }
|
39
|
+
# The language of the client application.
|
40
|
+
field :x_plex_language, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Language', 'style': 'simple', 'explode': false } }
|
41
|
+
# The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
|
42
|
+
field :x_plex_session_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Session-Id', 'style': 'simple', 'explode': false } }
|
43
|
+
|
44
|
+
|
45
|
+
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 }
|
46
|
+
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)
|
47
|
+
@client_id = client_id
|
48
|
+
@x_plex_token = x_plex_token
|
49
|
+
@client_features = client_features
|
50
|
+
@client_name = client_name
|
51
|
+
@client_version = client_version
|
52
|
+
@device_name = device_name
|
53
|
+
@device_nickname = device_nickname
|
54
|
+
@device_screen_resolution = device_screen_resolution
|
55
|
+
@model = model
|
56
|
+
@platform = platform
|
57
|
+
@platform_version = platform_version
|
58
|
+
@x_plex_language = x_plex_language
|
59
|
+
@x_plex_session_id = x_plex_session_id
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_RESPONSE_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
|
14
|
+
class GetUsersResponse < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
# HTTP response content type for this operation
|
18
|
+
field :content_type, ::String
|
19
|
+
# Raw HTTP response; suitable for custom response parsing
|
20
|
+
field :raw_response, ::Faraday::Response
|
21
|
+
# HTTP response status code for this operation
|
22
|
+
field :status_code, ::Integer
|
23
|
+
# Bad Request - A parameter was not specified, or was specified incorrectly.
|
24
|
+
field :bad_request, T.nilable(::PlexRubySDK::Operations::GetUsersBadRequest)
|
25
|
+
|
26
|
+
field :body, T.nilable(::String)
|
27
|
+
# Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
28
|
+
field :unauthorized, T.nilable(::PlexRubySDK::Operations::GetUsersUnauthorized)
|
29
|
+
|
30
|
+
|
31
|
+
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 }
|
32
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, body: nil, unauthorized: nil)
|
33
|
+
@content_type = content_type
|
34
|
+
@raw_response = raw_response
|
35
|
+
@status_code = status_code
|
36
|
+
@bad_request = bad_request
|
37
|
+
@body = body
|
38
|
+
@unauthorized = unauthorized
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_RESPONSE_BODY_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Successful response with media container data in XML
|
14
|
+
class GetUsersResponseBody < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
# Container holding user and server details.
|
18
|
+
field :media_container, T.nilable(::PlexRubySDK::Operations::GetUsersMediaContainer)
|
19
|
+
|
20
|
+
|
21
|
+
sig { params(media_container: T.nilable(::PlexRubySDK::Operations::GetUsersMediaContainer)).void }
|
22
|
+
def initialize(media_container: nil)
|
23
|
+
@media_container = media_container
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_SERVER_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
|
14
|
+
class GetUsersServer < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
|
18
|
+
field :all_libraries, ::PlexRubySDK::Operations::AllLibraries
|
19
|
+
# Unique ID of the server of the connected user
|
20
|
+
field :id, ::Integer
|
21
|
+
|
22
|
+
field :last_seen_at, ::Integer
|
23
|
+
# Machine identifier of the Plex server.
|
24
|
+
field :machine_identifier, ::String
|
25
|
+
# Name of the Plex server of the connected user.
|
26
|
+
field :name, ::String
|
27
|
+
# Number of libraries in the server this user has access to.
|
28
|
+
field :num_libraries, ::Integer
|
29
|
+
|
30
|
+
field :owned, ::PlexRubySDK::Operations::Owned
|
31
|
+
|
32
|
+
field :pending, ::PlexRubySDK::Operations::Pending
|
33
|
+
# ID of the actual Plex server.
|
34
|
+
field :server_id, ::Integer
|
35
|
+
|
36
|
+
|
37
|
+
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 }
|
38
|
+
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)
|
39
|
+
@all_libraries = all_libraries
|
40
|
+
@id = id
|
41
|
+
@last_seen_at = last_seen_at
|
42
|
+
@machine_identifier = machine_identifier
|
43
|
+
@name = name
|
44
|
+
@num_libraries = num_libraries
|
45
|
+
@owned = owned
|
46
|
+
@pending = pending
|
47
|
+
@server_id = server_id
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_UNAUTHORIZED_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
14
|
+
class GetUsersUnauthorized < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
|
18
|
+
field :errors, T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersUsersErrors]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('errors') } }
|
19
|
+
|
20
|
+
|
21
|
+
sig { params(errors: T.nilable(T::Array[::PlexRubySDK::Operations::GetUsersUsersErrors])).void }
|
22
|
+
def initialize(errors: nil)
|
23
|
+
@errors = errors
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
GET_USERS_USERS_ERRORS_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
|
14
|
+
class GetUsersUsersErrors < ::PlexRubySDK::Utils::FieldAugmented
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
|
18
|
+
field :code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('code') } }
|
19
|
+
|
20
|
+
field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('message') } }
|
21
|
+
|
22
|
+
field :status, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('status') } }
|
23
|
+
|
24
|
+
|
25
|
+
sig { params(code: T.nilable(::Integer), message: T.nilable(::String), status: T.nilable(::Integer)).void }
|
26
|
+
def initialize(code: nil, message: nil, status: nil)
|
27
|
+
@code = code
|
28
|
+
@message = message
|
29
|
+
@status = status
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -70,14 +70,14 @@ module PlexRubySDK
|
|
70
70
|
|
71
71
|
field :updated_at, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('updatedAt') } }
|
72
72
|
|
73
|
-
field :user, T.nilable(T::Array[::PlexRubySDK::Operations::
|
73
|
+
field :user, T.nilable(T::Array[::PlexRubySDK::Operations::GetTopWatchedContentUser]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('User') } }
|
74
74
|
|
75
75
|
field :viewed_leaf_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('viewedLeafCount') } }
|
76
76
|
|
77
77
|
field :year, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('year') } }
|
78
78
|
|
79
79
|
|
80
|
-
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::
|
80
|
+
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 }
|
81
81
|
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)
|
82
82
|
@added_at = added_at
|
83
83
|
@art = art
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class GetTopWatchedContentUser < ::PlexRubySDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :id, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('id') } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(id: T.nilable(::Integer)).void }
|
19
|
+
def initialize(id: nil)
|
20
|
+
@id = id
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
HOME_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Home - Indicates if the user is part of a home group.
|
14
|
+
class Home < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
OWNED_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Owned - Indicates if the user owns the server.
|
14
|
+
class Owned < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
PENDING_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Pending - Indicates if the server is pending approval.
|
14
|
+
class Pending < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
PROTECTED_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Protected - Indicates whether the account is protected.
|
14
|
+
class Protected < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module PlexRubySDK
|
8
|
+
module Operations
|
9
|
+
RESTRICTED_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
# Restricted - Indicates if the user has restricted access.
|
14
|
+
class Restricted < T::Enum
|
15
|
+
enums do
|
16
|
+
DISABLE = new(0)
|
17
|
+
ENABLE = new(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -6,18 +6,78 @@
|
|
6
6
|
|
7
7
|
module PlexRubySDK
|
8
8
|
module Operations
|
9
|
+
USER_SERVERS = [
|
10
|
+
'https://plex.tv/api'
|
11
|
+
].freeze
|
9
12
|
|
10
13
|
|
11
14
|
class User < ::PlexRubySDK::Utils::FieldAugmented
|
12
15
|
extend T::Sig
|
13
16
|
|
14
17
|
|
15
|
-
field :
|
18
|
+
field :allow_camera_upload, ::PlexRubySDK::Operations::AllowCameraUpload
|
16
19
|
|
20
|
+
field :allow_channels, ::PlexRubySDK::Operations::AllowChannels
|
17
21
|
|
18
|
-
|
19
|
-
|
22
|
+
field :allow_subtitle_admin, ::PlexRubySDK::Operations::AllowSubtitleAdmin
|
23
|
+
|
24
|
+
field :allow_sync, ::PlexRubySDK::Operations::AllowSync
|
25
|
+
|
26
|
+
field :allow_tuners, ::PlexRubySDK::Operations::AllowTuners
|
27
|
+
# User's email address.
|
28
|
+
field :email, ::String
|
29
|
+
|
30
|
+
field :home, ::PlexRubySDK::Operations::Home
|
31
|
+
# User's unique ID.
|
32
|
+
field :id, ::Integer
|
33
|
+
|
34
|
+
field :protected, ::PlexRubySDK::Operations::Protected
|
35
|
+
|
36
|
+
field :restricted, ::PlexRubySDK::Operations::Restricted
|
37
|
+
# List of servers owned by the user.
|
38
|
+
field :server, T::Array[::PlexRubySDK::Operations::GetUsersServer]
|
39
|
+
# URL to the user's avatar image.
|
40
|
+
field :thumb, ::String
|
41
|
+
# User's display name.
|
42
|
+
field :title, ::String
|
43
|
+
# User's username.
|
44
|
+
field :username, ::String
|
45
|
+
# Filters applied for all content.
|
46
|
+
field :filter_all, T.nilable(::String)
|
47
|
+
# Filters applied for movies.
|
48
|
+
field :filter_movies, T.nilable(::String)
|
49
|
+
# Filters applied for music.
|
50
|
+
field :filter_music, T.nilable(::String)
|
51
|
+
# Filters applied for photos.
|
52
|
+
field :filter_photos, T.nilable(::String)
|
53
|
+
# Filters applied for television.
|
54
|
+
field :filter_television, T.nilable(::String)
|
55
|
+
# ID of the user's recommendation playlist.
|
56
|
+
field :recommendations_playlist_id, T.nilable(::String)
|
57
|
+
|
58
|
+
|
59
|
+
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 }
|
60
|
+
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)
|
61
|
+
@allow_camera_upload = allow_camera_upload
|
62
|
+
@allow_channels = allow_channels
|
63
|
+
@allow_subtitle_admin = allow_subtitle_admin
|
64
|
+
@allow_sync = allow_sync
|
65
|
+
@allow_tuners = allow_tuners
|
66
|
+
@email = email
|
67
|
+
@home = home
|
20
68
|
@id = id
|
69
|
+
@protected = protected
|
70
|
+
@restricted = restricted
|
71
|
+
@server = server
|
72
|
+
@thumb = thumb
|
73
|
+
@title = title
|
74
|
+
@username = username
|
75
|
+
@filter_all = filter_all
|
76
|
+
@filter_movies = filter_movies
|
77
|
+
@filter_music = filter_music
|
78
|
+
@filter_photos = filter_photos
|
79
|
+
@filter_television = filter_television
|
80
|
+
@recommendations_playlist_id = recommendations_playlist_id
|
21
81
|
end
|
22
82
|
end
|
23
83
|
end
|
@@ -541,7 +541,7 @@ module PlexRubySDK
|
|
541
541
|
autoload :GetTopWatchedContentCountry, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_country.rb'
|
542
542
|
autoload :GetTopWatchedContentGuids, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_guids.rb'
|
543
543
|
autoload :GetTopWatchedContentRole, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb'
|
544
|
-
autoload :
|
544
|
+
autoload :GetTopWatchedContentUser, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_user.rb'
|
545
545
|
autoload :GetTopWatchedContentMetadata, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_metadata.rb'
|
546
546
|
autoload :GetTopWatchedContentMediaContainer, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_mediacontainer.rb'
|
547
547
|
autoload :GetTopWatchedContentResponseBody, 'plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb'
|
@@ -821,5 +821,26 @@ module PlexRubySDK
|
|
821
821
|
autoload :ApplyUpdatesErrors, 'plex_ruby_sdk/models/operations/applyupdates_errors.rb'
|
822
822
|
autoload :ApplyUpdatesBadRequest, 'plex_ruby_sdk/models/operations/applyupdates_badrequest.rb'
|
823
823
|
autoload :ApplyUpdatesResponse, 'plex_ruby_sdk/models/operations/applyupdates_response.rb'
|
824
|
+
autoload :GetUsersRequest, 'plex_ruby_sdk/models/operations/get_users_request.rb'
|
825
|
+
autoload :GetUsersUsersErrors, 'plex_ruby_sdk/models/operations/get_users_users_errors.rb'
|
826
|
+
autoload :GetUsersUnauthorized, 'plex_ruby_sdk/models/operations/get_users_unauthorized.rb'
|
827
|
+
autoload :GetUsersErrors, 'plex_ruby_sdk/models/operations/get_users_errors.rb'
|
828
|
+
autoload :GetUsersBadRequest, 'plex_ruby_sdk/models/operations/get_users_badrequest.rb'
|
829
|
+
autoload :Protected, 'plex_ruby_sdk/models/operations/protected.rb'
|
830
|
+
autoload :Home, 'plex_ruby_sdk/models/operations/home.rb'
|
831
|
+
autoload :AllowTuners, 'plex_ruby_sdk/models/operations/allowtuners.rb'
|
832
|
+
autoload :AllowSync, 'plex_ruby_sdk/models/operations/allowsync.rb'
|
833
|
+
autoload :AllowCameraUpload, 'plex_ruby_sdk/models/operations/allowcameraupload.rb'
|
834
|
+
autoload :AllowChannels, 'plex_ruby_sdk/models/operations/allowchannels.rb'
|
835
|
+
autoload :AllowSubtitleAdmin, 'plex_ruby_sdk/models/operations/allowsubtitleadmin.rb'
|
836
|
+
autoload :Restricted, 'plex_ruby_sdk/models/operations/restricted.rb'
|
837
|
+
autoload :AllLibraries, 'plex_ruby_sdk/models/operations/alllibraries.rb'
|
838
|
+
autoload :Owned, 'plex_ruby_sdk/models/operations/owned.rb'
|
839
|
+
autoload :Pending, 'plex_ruby_sdk/models/operations/pending.rb'
|
840
|
+
autoload :GetUsersServer, 'plex_ruby_sdk/models/operations/get_users_server.rb'
|
841
|
+
autoload :User, 'plex_ruby_sdk/models/operations/user.rb'
|
842
|
+
autoload :GetUsersMediaContainer, 'plex_ruby_sdk/models/operations/get_users_mediacontainer.rb'
|
843
|
+
autoload :GetUsersResponseBody, 'plex_ruby_sdk/models/operations/get_users_responsebody.rb'
|
844
|
+
autoload :GetUsersResponse, 'plex_ruby_sdk/models/operations/get_users_response.rb'
|
824
845
|
end
|
825
846
|
end
|
@@ -13,7 +13,7 @@ module PlexRubySDK
|
|
13
13
|
class PlexAPI
|
14
14
|
extend T::Sig
|
15
15
|
|
16
|
-
attr_accessor :server, :media, :video, :activities, :butler, :plex, :hubs, :search, :library, :watchlist, :log, :playlists, :authentication, :statistics, :sessions, :updater
|
16
|
+
attr_accessor :server, :media, :video, :activities, :butler, :plex, :hubs, :search, :library, :watchlist, :log, :playlists, :authentication, :statistics, :sessions, :updater, :users
|
17
17
|
|
18
18
|
sig do
|
19
19
|
params(client: Faraday::Request,
|
@@ -114,6 +114,7 @@ module PlexRubySDK
|
|
114
114
|
@statistics = Statistics.new(@sdk_configuration)
|
115
115
|
@sessions = Sessions.new(@sdk_configuration)
|
116
116
|
@updater = Updater.new(@sdk_configuration)
|
117
|
+
@users = Users.new(@sdk_configuration)
|
117
118
|
end
|
118
119
|
end
|
119
120
|
end
|
@@ -40,9 +40,9 @@ module PlexRubySDK
|
|
40
40
|
@security = security
|
41
41
|
@language = 'ruby'
|
42
42
|
@openapi_doc_version = '0.0.3'
|
43
|
-
@sdk_version = '0.7.
|
44
|
-
@gen_version = '2.
|
45
|
-
@user_agent = 'speakeasy-sdk/ruby 0.7.
|
43
|
+
@sdk_version = '0.7.3'
|
44
|
+
@gen_version = '2.506.0'
|
45
|
+
@user_agent = 'speakeasy-sdk/ruby 0.7.3 2.506.0 0.0.3 plex_ruby_sdk'
|
46
46
|
end
|
47
47
|
|
48
48
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
require 'faraday'
|
7
|
+
require 'faraday/multipart'
|
8
|
+
require 'sorbet-runtime'
|
9
|
+
|
10
|
+
module PlexRubySDK
|
11
|
+
extend T::Sig
|
12
|
+
class Users
|
13
|
+
extend T::Sig
|
14
|
+
|
15
|
+
# GET_USERS_SERVERS contains the list of server urls available to the SDK.
|
16
|
+
GET_USERS_SERVERS = [
|
17
|
+
'https://plex.tv/api',
|
18
|
+
].freeze
|
19
|
+
|
20
|
+
|
21
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
22
|
+
def initialize(sdk_config)
|
23
|
+
@sdk_configuration = sdk_config
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
sig { params(request: T.nilable(::PlexRubySDK::Operations::GetUsersRequest), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetUsersResponse) }
|
28
|
+
def get_users(request, server_url = nil)
|
29
|
+
# get_users - Get list of all connected users
|
30
|
+
# Get list of all users that are friends and have library access with the provided Plex authentication token
|
31
|
+
base_url = Utils.template_url(GET_USERS_SERVERS[0], {
|
32
|
+
})
|
33
|
+
base_url = server_url if !server_url.nil?
|
34
|
+
url = "#{base_url}/users"
|
35
|
+
headers = Utils.get_headers(request)
|
36
|
+
headers['Accept'] = 'application/json;q=1, application/xml;q=0'
|
37
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
38
|
+
|
39
|
+
r = @sdk_configuration.client.get(url) do |req|
|
40
|
+
req.headers = headers
|
41
|
+
end
|
42
|
+
|
43
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
44
|
+
|
45
|
+
res = ::PlexRubySDK::Operations::GetUsersResponse.new(
|
46
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
47
|
+
)
|
48
|
+
if r.status == 200
|
49
|
+
res.body = r.env.response_body if Utils.match_content_type(content_type, 'application/xml')
|
50
|
+
elsif r.status == 400
|
51
|
+
if Utils.match_content_type(content_type, 'application/json')
|
52
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetUsersBadRequest)
|
53
|
+
res.bad_request = out
|
54
|
+
end
|
55
|
+
elsif r.status == 401
|
56
|
+
if Utils.match_content_type(content_type, 'application/json')
|
57
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetUsersUnauthorized)
|
58
|
+
res.unauthorized = out
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
res
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/lib/plex_ruby_sdk.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plex_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LukeHagar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -164,6 +164,12 @@ files:
|
|
164
164
|
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_response.rb
|
165
165
|
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_responsebody.rb
|
166
166
|
- lib/plex_ruby_sdk/models/operations/addplaylistcontents_unauthorized.rb
|
167
|
+
- lib/plex_ruby_sdk/models/operations/alllibraries.rb
|
168
|
+
- lib/plex_ruby_sdk/models/operations/allowcameraupload.rb
|
169
|
+
- lib/plex_ruby_sdk/models/operations/allowchannels.rb
|
170
|
+
- lib/plex_ruby_sdk/models/operations/allowsubtitleadmin.rb
|
171
|
+
- lib/plex_ruby_sdk/models/operations/allowsync.rb
|
172
|
+
- lib/plex_ruby_sdk/models/operations/allowtuners.rb
|
167
173
|
- lib/plex_ruby_sdk/models/operations/applyupdates_badrequest.rb
|
168
174
|
- lib/plex_ruby_sdk/models/operations/applyupdates_errors.rb
|
169
175
|
- lib/plex_ruby_sdk/models/operations/applyupdates_request.rb
|
@@ -463,6 +469,15 @@ files:
|
|
463
469
|
- lib/plex_ruby_sdk/models/operations/get_thumb_image_request.rb
|
464
470
|
- lib/plex_ruby_sdk/models/operations/get_thumb_image_response.rb
|
465
471
|
- lib/plex_ruby_sdk/models/operations/get_thumb_image_unauthorized.rb
|
472
|
+
- lib/plex_ruby_sdk/models/operations/get_users_badrequest.rb
|
473
|
+
- lib/plex_ruby_sdk/models/operations/get_users_errors.rb
|
474
|
+
- lib/plex_ruby_sdk/models/operations/get_users_mediacontainer.rb
|
475
|
+
- lib/plex_ruby_sdk/models/operations/get_users_request.rb
|
476
|
+
- lib/plex_ruby_sdk/models/operations/get_users_response.rb
|
477
|
+
- lib/plex_ruby_sdk/models/operations/get_users_responsebody.rb
|
478
|
+
- lib/plex_ruby_sdk/models/operations/get_users_server.rb
|
479
|
+
- lib/plex_ruby_sdk/models/operations/get_users_unauthorized.rb
|
480
|
+
- lib/plex_ruby_sdk/models/operations/get_users_users_errors.rb
|
466
481
|
- lib/plex_ruby_sdk/models/operations/get_watch_list_badrequest.rb
|
467
482
|
- lib/plex_ruby_sdk/models/operations/get_watch_list_errors.rb
|
468
483
|
- lib/plex_ruby_sdk/models/operations/get_watch_list_request.rb
|
@@ -748,6 +763,7 @@ files:
|
|
748
763
|
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_responsebody.rb
|
749
764
|
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_role.rb
|
750
765
|
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_unauthorized.rb
|
766
|
+
- lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_user.rb
|
751
767
|
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_badrequest.rb
|
752
768
|
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_errors.rb
|
753
769
|
- lib/plex_ruby_sdk/models/operations/gettranscodesessions_mediacontainer.rb
|
@@ -776,6 +792,7 @@ files:
|
|
776
792
|
- lib/plex_ruby_sdk/models/operations/getuserfriends_unauthorized.rb
|
777
793
|
- lib/plex_ruby_sdk/models/operations/guids.rb
|
778
794
|
- lib/plex_ruby_sdk/models/operations/hasthumbnail.rb
|
795
|
+
- lib/plex_ruby_sdk/models/operations/home.rb
|
779
796
|
- lib/plex_ruby_sdk/models/operations/hub.rb
|
780
797
|
- lib/plex_ruby_sdk/models/operations/image.rb
|
781
798
|
- lib/plex_ruby_sdk/models/operations/includecollections.rb
|
@@ -827,9 +844,11 @@ files:
|
|
827
844
|
- lib/plex_ruby_sdk/models/operations/onlytransient.rb
|
828
845
|
- lib/plex_ruby_sdk/models/operations/operator.rb
|
829
846
|
- lib/plex_ruby_sdk/models/operations/optimizedforstreaming.rb
|
847
|
+
- lib/plex_ruby_sdk/models/operations/owned.rb
|
830
848
|
- lib/plex_ruby_sdk/models/operations/part.rb
|
831
849
|
- lib/plex_ruby_sdk/models/operations/pastsubscription.rb
|
832
850
|
- lib/plex_ruby_sdk/models/operations/pathparam_taskname.rb
|
851
|
+
- lib/plex_ruby_sdk/models/operations/pending.rb
|
833
852
|
- lib/plex_ruby_sdk/models/operations/performsearch_badrequest.rb
|
834
853
|
- lib/plex_ruby_sdk/models/operations/performsearch_errors.rb
|
835
854
|
- lib/plex_ruby_sdk/models/operations/performsearch_request.rb
|
@@ -869,6 +888,7 @@ files:
|
|
869
888
|
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userprofile.rb
|
870
889
|
- lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_watchedindicator.rb
|
871
890
|
- lib/plex_ruby_sdk/models/operations/producer.rb
|
891
|
+
- lib/plex_ruby_sdk/models/operations/protected.rb
|
872
892
|
- lib/plex_ruby_sdk/models/operations/protocol.rb
|
873
893
|
- lib/plex_ruby_sdk/models/operations/provider.rb
|
874
894
|
- lib/plex_ruby_sdk/models/operations/queryparam_filter.rb
|
@@ -882,6 +902,7 @@ files:
|
|
882
902
|
- lib/plex_ruby_sdk/models/operations/ratings.rb
|
883
903
|
- lib/plex_ruby_sdk/models/operations/release.rb
|
884
904
|
- lib/plex_ruby_sdk/models/operations/responsebody.rb
|
905
|
+
- lib/plex_ruby_sdk/models/operations/restricted.rb
|
885
906
|
- lib/plex_ruby_sdk/models/operations/role.rb
|
886
907
|
- lib/plex_ruby_sdk/models/operations/scope.rb
|
887
908
|
- lib/plex_ruby_sdk/models/operations/searchresult.rb
|
@@ -980,6 +1001,7 @@ files:
|
|
980
1001
|
- lib/plex_ruby_sdk/sessions.rb
|
981
1002
|
- lib/plex_ruby_sdk/statistics.rb
|
982
1003
|
- lib/plex_ruby_sdk/updater.rb
|
1004
|
+
- lib/plex_ruby_sdk/users.rb
|
983
1005
|
- lib/plex_ruby_sdk/utils/metadata_fields.rb
|
984
1006
|
- lib/plex_ruby_sdk/utils/t.rb
|
985
1007
|
- lib/plex_ruby_sdk/utils/utils.rb
|