plex_ruby_sdk 0.5.1 → 0.7.0
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/activities.rb +3 -2
- data/lib/plex_ruby_sdk/authentication.rb +7 -3
- data/lib/plex_ruby_sdk/butler.rb +9 -5
- data/lib/plex_ruby_sdk/hubs.rb +7 -5
- data/lib/plex_ruby_sdk/library.rb +31 -24
- data/lib/plex_ruby_sdk/log.rb +6 -2
- data/lib/plex_ruby_sdk/media.rb +14 -13
- data/lib/plex_ruby_sdk/models/operations/enablecreditsmarkergeneration.rb +18 -0
- data/lib/plex_ruby_sdk/models/operations/episodesort.rb +19 -0
- data/lib/plex_ruby_sdk/models/operations/flattenseasons.rb +4 -3
- data/lib/plex_ruby_sdk/models/operations/get_library_items_enablecreditsmarkergeneration.rb +18 -0
- data/lib/plex_ruby_sdk/models/operations/get_library_items_episodesort.rb +19 -0
- data/lib/plex_ruby_sdk/models/operations/get_library_items_flattenseasons.rb +4 -3
- data/lib/plex_ruby_sdk/models/operations/get_library_items_metadata.rb +15 -9
- data/lib/plex_ruby_sdk/models/operations/get_library_items_queryparam_type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations/get_library_items_showordering.rb +9 -9
- data/lib/plex_ruby_sdk/models/operations/get_meta_data_by_rating_key_metadata.rb +17 -2
- data/lib/plex_ruby_sdk/models/operations/get_recently_added_metadata.rb +15 -9
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_enablecreditsmarkergeneration.rb +18 -0
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_episodesort.rb +19 -0
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_flattenseasons.rb +4 -3
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_metadata.rb +15 -9
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_request.rb +5 -5
- data/lib/plex_ruby_sdk/models/operations/get_search_all_libraries_showordering.rb +9 -9
- data/lib/plex_ruby_sdk/models/operations/get_search_library_queryparam_type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations/get_server_resources_request.rb +2 -2
- data/lib/plex_ruby_sdk/models/operations/getpin_request.rb +2 -2
- data/lib/plex_ruby_sdk/models/operations/getplaylistcontents_queryparam_type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations/getsessions_metadata.rb +5 -2
- data/lib/plex_ruby_sdk/models/operations/gettokenbypinid_request.rb +5 -5
- data/lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_queryparam_type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_request.rb +2 -2
- data/lib/plex_ruby_sdk/models/operations/queryparam_type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations/showordering.rb +9 -9
- data/lib/plex_ruby_sdk/models/operations/tag.rb +1 -0
- data/lib/plex_ruby_sdk/models/operations/type.rb +2 -0
- data/lib/plex_ruby_sdk/models/operations.rb +6 -0
- data/lib/plex_ruby_sdk/playlists.rb +21 -18
- data/lib/plex_ruby_sdk/plex.rb +17 -11
- data/lib/plex_ruby_sdk/plex_api.rb +1 -32
- data/lib/plex_ruby_sdk/sdkconfiguration.rb +5 -7
- data/lib/plex_ruby_sdk/search.rb +6 -3
- data/lib/plex_ruby_sdk/server.rb +11 -2
- data/lib/plex_ruby_sdk/sessions.rb +6 -3
- data/lib/plex_ruby_sdk/statistics.rb +6 -3
- data/lib/plex_ruby_sdk/updater.rb +7 -3
- data/lib/plex_ruby_sdk/utils/utils.rb +3 -4
- data/lib/plex_ruby_sdk/video.rb +4 -2
- data/lib/plex_ruby_sdk/watchlist.rb +4 -4
- metadata +10 -4
@@ -15,7 +15,7 @@ module PlexRubySDK
|
|
15
15
|
extend T::Sig
|
16
16
|
|
17
17
|
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
18
|
-
field :client_id,
|
18
|
+
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
19
19
|
# The name of the client application. (Plex Web, Plex Media Server, etc.)
|
20
20
|
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
|
21
21
|
# The version of the client application.
|
@@ -28,7 +28,7 @@ module PlexRubySDK
|
|
28
28
|
field :request_body, T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataRequestBody), { 'request': { 'media_type': 'application/x-www-form-urlencoded' } }
|
29
29
|
|
30
30
|
|
31
|
-
sig { params(client_id:
|
31
|
+
sig { params(client_id: ::String, client_name: T.nilable(::String), client_version: T.nilable(::String), device_nickname: T.nilable(::String), platform: T.nilable(::String), request_body: T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataRequestBody)).void }
|
32
32
|
def initialize(client_id: nil, client_name: nil, client_version: nil, device_nickname: nil, platform: nil, request_body: nil)
|
33
33
|
@client_id = client_id
|
34
34
|
@client_name = client_name
|
@@ -7,20 +7,20 @@
|
|
7
7
|
module PlexRubySDK
|
8
8
|
module Operations
|
9
9
|
|
10
|
-
# ShowOrdering - Setting that indicates the episode ordering for the show
|
11
|
-
# None = Library default,
|
12
|
-
# tmdbAiring = The Movie Database (Aired),
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
10
|
+
# ShowOrdering - Setting that indicates the episode ordering for the show
|
11
|
+
# None = Library default,
|
12
|
+
# tmdbAiring = The Movie Database (Aired),
|
13
|
+
# tvdbAiring = TheTVDB (Aired),
|
14
|
+
# tvdbDvd = TheTVDB (DVD),
|
15
|
+
# tvdbAbsolute = TheTVDB (Absolute)).
|
16
16
|
#
|
17
17
|
class ShowOrdering < T::Enum
|
18
18
|
enums do
|
19
19
|
NONE = new('None')
|
20
20
|
TMDB_AIRING = new('tmdbAiring')
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
TVDB_AIRING = new('tvdbAiring')
|
22
|
+
TVDB_DVD = new('tvdbDvd')
|
23
|
+
TVDB_ABSOLUTE = new('tvdbAbsolute')
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -245,6 +245,8 @@ module PlexRubySDK
|
|
245
245
|
autoload :Meta, 'plex_ruby_sdk/models/operations/meta.rb'
|
246
246
|
autoload :GetRecentlyAddedHubsType, 'plex_ruby_sdk/models/operations/get_recently_added_hubs_type.rb'
|
247
247
|
autoload :FlattenSeasons, 'plex_ruby_sdk/models/operations/flattenseasons.rb'
|
248
|
+
autoload :EpisodeSort, 'plex_ruby_sdk/models/operations/episodesort.rb'
|
249
|
+
autoload :EnableCreditsMarkerGeneration, 'plex_ruby_sdk/models/operations/enablecreditsmarkergeneration.rb'
|
248
250
|
autoload :ShowOrdering, 'plex_ruby_sdk/models/operations/showordering.rb'
|
249
251
|
autoload :OptimizedForStreaming, 'plex_ruby_sdk/models/operations/optimizedforstreaming.rb'
|
250
252
|
autoload :HasThumbnail, 'plex_ruby_sdk/models/operations/hasthumbnail.rb'
|
@@ -396,6 +398,8 @@ module PlexRubySDK
|
|
396
398
|
autoload :GetLibraryItemsFieldType, 'plex_ruby_sdk/models/operations/get_library_items_fieldtype.rb'
|
397
399
|
autoload :GetLibraryItemsLibraryType, 'plex_ruby_sdk/models/operations/get_library_items_library_type.rb'
|
398
400
|
autoload :GetLibraryItemsFlattenSeasons, 'plex_ruby_sdk/models/operations/get_library_items_flattenseasons.rb'
|
401
|
+
autoload :GetLibraryItemsEpisodeSort, 'plex_ruby_sdk/models/operations/get_library_items_episodesort.rb'
|
402
|
+
autoload :GetLibraryItemsEnableCreditsMarkerGeneration, 'plex_ruby_sdk/models/operations/get_library_items_enablecreditsmarkergeneration.rb'
|
399
403
|
autoload :GetLibraryItemsShowOrdering, 'plex_ruby_sdk/models/operations/get_library_items_showordering.rb'
|
400
404
|
autoload :GetLibraryItemsOptimizedForStreaming, 'plex_ruby_sdk/models/operations/get_library_items_optimizedforstreaming.rb'
|
401
405
|
autoload :GetLibraryItemsHasThumbnail, 'plex_ruby_sdk/models/operations/get_library_items_hasthumbnail.rb'
|
@@ -454,6 +458,8 @@ module PlexRubySDK
|
|
454
458
|
autoload :GetSearchAllLibrariesBadRequest, 'plex_ruby_sdk/models/operations/get_search_all_libraries_badrequest.rb'
|
455
459
|
autoload :GetSearchAllLibrariesType, 'plex_ruby_sdk/models/operations/get_search_all_libraries_type.rb'
|
456
460
|
autoload :GetSearchAllLibrariesFlattenSeasons, 'plex_ruby_sdk/models/operations/get_search_all_libraries_flattenseasons.rb'
|
461
|
+
autoload :GetSearchAllLibrariesEpisodeSort, 'plex_ruby_sdk/models/operations/get_search_all_libraries_episodesort.rb'
|
462
|
+
autoload :GetSearchAllLibrariesEnableCreditsMarkerGeneration, 'plex_ruby_sdk/models/operations/get_search_all_libraries_enablecreditsmarkergeneration.rb'
|
457
463
|
autoload :GetSearchAllLibrariesShowOrdering, 'plex_ruby_sdk/models/operations/get_search_all_libraries_showordering.rb'
|
458
464
|
autoload :GetSearchAllLibrariesOptimizedForStreaming, 'plex_ruby_sdk/models/operations/get_search_all_libraries_optimizedforstreaming.rb'
|
459
465
|
autoload :GetSearchAllLibrariesHasThumbnail, 'plex_ruby_sdk/models/operations/get_search_all_libraries_hasthumbnail.rb'
|
@@ -34,7 +34,7 @@ module PlexRubySDK
|
|
34
34
|
base_url = Utils.template_url(url, params)
|
35
35
|
url = "#{base_url}/playlists"
|
36
36
|
headers = {}
|
37
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CreatePlaylistRequest, request
|
37
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CreatePlaylistRequest, request)
|
38
38
|
headers['Accept'] = 'application/json'
|
39
39
|
headers['user-agent'] = @sdk_configuration.user_agent
|
40
40
|
|
@@ -65,6 +65,7 @@ module PlexRubySDK
|
|
65
65
|
res.unauthorized = out
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
68
69
|
res
|
69
70
|
end
|
70
71
|
|
@@ -82,7 +83,7 @@ module PlexRubySDK
|
|
82
83
|
base_url = Utils.template_url(url, params)
|
83
84
|
url = "#{base_url}/playlists"
|
84
85
|
headers = {}
|
85
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistsRequest, request
|
86
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistsRequest, request)
|
86
87
|
headers['Accept'] = 'application/json'
|
87
88
|
headers['user-agent'] = @sdk_configuration.user_agent
|
88
89
|
|
@@ -113,6 +114,7 @@ module PlexRubySDK
|
|
113
114
|
res.unauthorized = out
|
114
115
|
end
|
115
116
|
end
|
117
|
+
|
116
118
|
res
|
117
119
|
end
|
118
120
|
|
@@ -133,8 +135,7 @@ module PlexRubySDK
|
|
133
135
|
::PlexRubySDK::Operations::GetPlaylistRequest,
|
134
136
|
base_url,
|
135
137
|
'/playlists/{playlistID}',
|
136
|
-
request
|
137
|
-
@sdk_configuration.globals
|
138
|
+
request
|
138
139
|
)
|
139
140
|
headers = {}
|
140
141
|
headers['Accept'] = 'application/json'
|
@@ -166,6 +167,7 @@ module PlexRubySDK
|
|
166
167
|
res.unauthorized = out
|
167
168
|
end
|
168
169
|
end
|
170
|
+
|
169
171
|
res
|
170
172
|
end
|
171
173
|
|
@@ -185,8 +187,7 @@ module PlexRubySDK
|
|
185
187
|
::PlexRubySDK::Operations::DeletePlaylistRequest,
|
186
188
|
base_url,
|
187
189
|
'/playlists/{playlistID}',
|
188
|
-
request
|
189
|
-
@sdk_configuration.globals
|
190
|
+
request
|
190
191
|
)
|
191
192
|
headers = {}
|
192
193
|
headers['Accept'] = 'application/json'
|
@@ -214,6 +215,7 @@ module PlexRubySDK
|
|
214
215
|
res.unauthorized = out
|
215
216
|
end
|
216
217
|
end
|
218
|
+
|
217
219
|
res
|
218
220
|
end
|
219
221
|
|
@@ -235,11 +237,10 @@ module PlexRubySDK
|
|
235
237
|
::PlexRubySDK::Operations::UpdatePlaylistRequest,
|
236
238
|
base_url,
|
237
239
|
'/playlists/{playlistID}',
|
238
|
-
request
|
239
|
-
@sdk_configuration.globals
|
240
|
+
request
|
240
241
|
)
|
241
242
|
headers = {}
|
242
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlaylistRequest, request
|
243
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlaylistRequest, request)
|
243
244
|
headers['Accept'] = 'application/json'
|
244
245
|
headers['user-agent'] = @sdk_configuration.user_agent
|
245
246
|
|
@@ -266,6 +267,7 @@ module PlexRubySDK
|
|
266
267
|
res.unauthorized = out
|
267
268
|
end
|
268
269
|
end
|
270
|
+
|
269
271
|
res
|
270
272
|
end
|
271
273
|
|
@@ -289,11 +291,10 @@ module PlexRubySDK
|
|
289
291
|
::PlexRubySDK::Operations::GetPlaylistContentsRequest,
|
290
292
|
base_url,
|
291
293
|
'/playlists/{playlistID}/items',
|
292
|
-
request
|
293
|
-
@sdk_configuration.globals
|
294
|
+
request
|
294
295
|
)
|
295
296
|
headers = {}
|
296
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistContentsRequest, request
|
297
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistContentsRequest, request)
|
297
298
|
headers['Accept'] = 'application/json'
|
298
299
|
headers['user-agent'] = @sdk_configuration.user_agent
|
299
300
|
|
@@ -324,6 +325,7 @@ module PlexRubySDK
|
|
324
325
|
res.unauthorized = out
|
325
326
|
end
|
326
327
|
end
|
328
|
+
|
327
329
|
res
|
328
330
|
end
|
329
331
|
|
@@ -343,8 +345,7 @@ module PlexRubySDK
|
|
343
345
|
::PlexRubySDK::Operations::ClearPlaylistContentsRequest,
|
344
346
|
base_url,
|
345
347
|
'/playlists/{playlistID}/items',
|
346
|
-
request
|
347
|
-
@sdk_configuration.globals
|
348
|
+
request
|
348
349
|
)
|
349
350
|
headers = {}
|
350
351
|
headers['Accept'] = 'application/json'
|
@@ -372,6 +373,7 @@ module PlexRubySDK
|
|
372
373
|
res.unauthorized = out
|
373
374
|
end
|
374
375
|
end
|
376
|
+
|
375
377
|
res
|
376
378
|
end
|
377
379
|
|
@@ -394,11 +396,10 @@ module PlexRubySDK
|
|
394
396
|
::PlexRubySDK::Operations::AddPlaylistContentsRequest,
|
395
397
|
base_url,
|
396
398
|
'/playlists/{playlistID}/items',
|
397
|
-
request
|
398
|
-
@sdk_configuration.globals
|
399
|
+
request
|
399
400
|
)
|
400
401
|
headers = {}
|
401
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::AddPlaylistContentsRequest, request
|
402
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::AddPlaylistContentsRequest, request)
|
402
403
|
headers['Accept'] = 'application/json'
|
403
404
|
headers['user-agent'] = @sdk_configuration.user_agent
|
404
405
|
|
@@ -429,6 +430,7 @@ module PlexRubySDK
|
|
429
430
|
res.unauthorized = out
|
430
431
|
end
|
431
432
|
end
|
433
|
+
|
432
434
|
res
|
433
435
|
end
|
434
436
|
|
@@ -448,7 +450,7 @@ module PlexRubySDK
|
|
448
450
|
base_url = Utils.template_url(url, params)
|
449
451
|
url = "#{base_url}/playlists/upload"
|
450
452
|
headers = {}
|
451
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UploadPlaylistRequest, request
|
453
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UploadPlaylistRequest, request)
|
452
454
|
headers['Accept'] = 'application/json'
|
453
455
|
headers['user-agent'] = @sdk_configuration.user_agent
|
454
456
|
|
@@ -475,6 +477,7 @@ module PlexRubySDK
|
|
475
477
|
res.unauthorized = out
|
476
478
|
end
|
477
479
|
end
|
480
|
+
|
478
481
|
res
|
479
482
|
end
|
480
483
|
end
|
data/lib/plex_ruby_sdk/plex.rb
CHANGED
@@ -88,6 +88,7 @@ module PlexRubySDK
|
|
88
88
|
res.unauthorized = out
|
89
89
|
end
|
90
90
|
end
|
91
|
+
|
91
92
|
res
|
92
93
|
end
|
93
94
|
|
@@ -130,6 +131,7 @@ module PlexRubySDK
|
|
130
131
|
res.unauthorized = out
|
131
132
|
end
|
132
133
|
end
|
134
|
+
|
133
135
|
res
|
134
136
|
end
|
135
137
|
|
@@ -171,6 +173,7 @@ module PlexRubySDK
|
|
171
173
|
res.unauthorized = out
|
172
174
|
end
|
173
175
|
end
|
176
|
+
|
174
177
|
res
|
175
178
|
end
|
176
179
|
|
@@ -212,27 +215,28 @@ module PlexRubySDK
|
|
212
215
|
res.unauthorized = out
|
213
216
|
end
|
214
217
|
end
|
218
|
+
|
215
219
|
res
|
216
220
|
end
|
217
221
|
|
218
222
|
|
219
|
-
sig { params(include_https: T.nilable(::PlexRubySDK::Operations::IncludeHttps), include_relay: T.nilable(::PlexRubySDK::Operations::IncludeRelay), include_i_pv6: T.nilable(::PlexRubySDK::Operations::IncludeIPv6),
|
220
|
-
def get_server_resources(include_https = nil, include_relay = nil, include_i_pv6 = nil,
|
223
|
+
sig { params(client_id: ::String, include_https: T.nilable(::PlexRubySDK::Operations::IncludeHttps), include_relay: T.nilable(::PlexRubySDK::Operations::IncludeRelay), include_i_pv6: T.nilable(::PlexRubySDK::Operations::IncludeIPv6), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetServerResourcesResponse) }
|
224
|
+
def get_server_resources(client_id, include_https = nil, include_relay = nil, include_i_pv6 = nil, server_url = nil)
|
221
225
|
# get_server_resources - Get Server Resources
|
222
226
|
# Get Plex server access tokens and server connections
|
223
227
|
request = ::PlexRubySDK::Operations::GetServerResourcesRequest.new(
|
224
228
|
|
229
|
+
client_id: client_id,
|
225
230
|
include_https: include_https,
|
226
231
|
include_relay: include_relay,
|
227
|
-
include_i_pv6: include_i_pv6
|
228
|
-
client_id: client_id
|
232
|
+
include_i_pv6: include_i_pv6
|
229
233
|
)
|
230
234
|
base_url = Utils.template_url(GET_SERVER_RESOURCES_SERVERS[0], {
|
231
235
|
})
|
232
236
|
base_url = server_url if !server_url.nil?
|
233
237
|
url = "#{base_url}/resources"
|
234
|
-
headers = Utils.get_headers(request
|
235
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetServerResourcesRequest, request
|
238
|
+
headers = Utils.get_headers(request)
|
239
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetServerResourcesRequest, request)
|
236
240
|
headers['Accept'] = 'application/json'
|
237
241
|
headers['user-agent'] = @sdk_configuration.user_agent
|
238
242
|
|
@@ -263,6 +267,7 @@ module PlexRubySDK
|
|
263
267
|
res.unauthorized = out
|
264
268
|
end
|
265
269
|
end
|
270
|
+
|
266
271
|
res
|
267
272
|
end
|
268
273
|
|
@@ -275,8 +280,8 @@ module PlexRubySDK
|
|
275
280
|
})
|
276
281
|
base_url = server_url if !server_url.nil?
|
277
282
|
url = "#{base_url}/pins"
|
278
|
-
headers = Utils.get_headers(request
|
279
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPinRequest, request
|
283
|
+
headers = Utils.get_headers(request)
|
284
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPinRequest, request)
|
280
285
|
headers['Accept'] = 'application/json'
|
281
286
|
headers['user-agent'] = @sdk_configuration.user_agent
|
282
287
|
|
@@ -301,6 +306,7 @@ module PlexRubySDK
|
|
301
306
|
res.bad_request = out
|
302
307
|
end
|
303
308
|
end
|
309
|
+
|
304
310
|
res
|
305
311
|
end
|
306
312
|
|
@@ -316,10 +322,9 @@ module PlexRubySDK
|
|
316
322
|
::PlexRubySDK::Operations::GetTokenByPinIdRequest,
|
317
323
|
base_url,
|
318
324
|
'/pins/{pinID}',
|
319
|
-
request
|
320
|
-
@sdk_configuration.globals
|
325
|
+
request
|
321
326
|
)
|
322
|
-
headers = Utils.get_headers(request
|
327
|
+
headers = Utils.get_headers(request)
|
323
328
|
headers['Accept'] = 'application/json'
|
324
329
|
headers['user-agent'] = @sdk_configuration.user_agent
|
325
330
|
|
@@ -348,6 +353,7 @@ module PlexRubySDK
|
|
348
353
|
res.object = out
|
349
354
|
end
|
350
355
|
end
|
356
|
+
|
351
357
|
res
|
352
358
|
end
|
353
359
|
end
|
@@ -18,11 +18,6 @@ module PlexRubySDK
|
|
18
18
|
sig do
|
19
19
|
params(client: Faraday::Request,
|
20
20
|
security: T.nilable(Shared::Security),
|
21
|
-
client_id: ::String,
|
22
|
-
client_name: ::String,
|
23
|
-
client_version: ::String,
|
24
|
-
platform: ::String,
|
25
|
-
device_nickname: ::String,
|
26
21
|
protocol: T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol),
|
27
22
|
ip: T.nilable(::String),
|
28
23
|
port: T.nilable(::String),
|
@@ -32,11 +27,6 @@ module PlexRubySDK
|
|
32
27
|
end
|
33
28
|
def initialize(client: nil,
|
34
29
|
security: nil,
|
35
|
-
client_id: nil,
|
36
|
-
client_name: nil,
|
37
|
-
client_version: nil,
|
38
|
-
platform: nil,
|
39
|
-
device_nickname: nil,
|
40
30
|
protocol: nil,
|
41
31
|
ip: nil,
|
42
32
|
port: nil,
|
@@ -47,11 +37,6 @@ module PlexRubySDK
|
|
47
37
|
## Instantiates the SDK configuring it with the provided parameters.
|
48
38
|
# @param [Faraday::Request] client The faraday HTTP client to use for all operations
|
49
39
|
# @param [Shared::Security] security The security details required for authentication
|
50
|
-
# @param [::String] client_id: Configures the client_id parameter for all supported operations
|
51
|
-
# @param [::String] client_name: Configures the client_name parameter for all supported operations
|
52
|
-
# @param [::String] client_version: Configures the client_version parameter for all supported operations
|
53
|
-
# @param [::String] platform: Configures the platform parameter for all supported operations
|
54
|
-
# @param [::String] device_nickname: Configures the device_nickname parameter for all supported operations
|
55
40
|
# @param [T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol)] protocol: Allows setting the protocol variable for url substitution
|
56
41
|
# @param [T.nilable(::String)] ip: Allows setting the ip variable for url substitution
|
57
42
|
# @param [T.nilable(::String)] port: Allows setting the port variable for url substitution
|
@@ -83,23 +68,7 @@ module PlexRubySDK
|
|
83
68
|
},
|
84
69
|
]
|
85
70
|
|
86
|
-
|
87
|
-
'parameters': {
|
88
|
-
'queryParam': {
|
89
|
-
},
|
90
|
-
'pathParam': {
|
91
|
-
},
|
92
|
-
'header': {
|
93
|
-
'client_id': client_id,
|
94
|
-
'client_name': client_name,
|
95
|
-
'client_version': client_version,
|
96
|
-
'platform': platform,
|
97
|
-
'device_nickname': device_nickname,
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params, globals)
|
71
|
+
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params)
|
103
72
|
init_sdks
|
104
73
|
end
|
105
74
|
|
@@ -23,7 +23,6 @@ module PlexRubySDK
|
|
23
23
|
field :server_url, T.nilable(String)
|
24
24
|
field :server_idx, T.nilable(Integer)
|
25
25
|
field :server_params, Array[Hash[Symbol, String]], { 'default_factory': Array}
|
26
|
-
field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]]
|
27
26
|
field :language, String
|
28
27
|
field :openapi_doc_version, String
|
29
28
|
field :sdk_version, String
|
@@ -31,20 +30,19 @@ module PlexRubySDK
|
|
31
30
|
field :user_agent, String
|
32
31
|
|
33
32
|
|
34
|
-
sig { params(client: Faraday::Connection, security: T.nilable(::PlexRubySDK::Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer), server_params: T::Array[String]
|
35
|
-
def initialize(client, security, server_url, server_idx, server_params
|
33
|
+
sig { params(client: Faraday::Connection, security: T.nilable(::PlexRubySDK::Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer), server_params: T::Array[String]).void }
|
34
|
+
def initialize(client, security, server_url, server_idx, server_params)
|
36
35
|
@client = client
|
37
36
|
@server_url = server_url
|
38
37
|
@server_idx = server_idx.nil? ? 0 : server_idx
|
39
38
|
raise StandardError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
|
40
39
|
@server_params = server_params
|
41
40
|
@security = security
|
42
|
-
@globals = globals.nil? ? {} : globals
|
43
41
|
@language = 'ruby'
|
44
42
|
@openapi_doc_version = '0.0.3'
|
45
|
-
@sdk_version = '0.
|
46
|
-
@gen_version = '2.
|
47
|
-
@user_agent = 'speakeasy-sdk/ruby 0.
|
43
|
+
@sdk_version = '0.7.0'
|
44
|
+
@gen_version = '2.496.0'
|
45
|
+
@user_agent = 'speakeasy-sdk/ruby 0.7.0 2.496.0 0.0.3 plex_ruby_sdk'
|
48
46
|
end
|
49
47
|
|
50
48
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
data/lib/plex_ruby_sdk/search.rb
CHANGED
@@ -46,7 +46,7 @@ module PlexRubySDK
|
|
46
46
|
base_url = Utils.template_url(url, params)
|
47
47
|
url = "#{base_url}/hubs/search"
|
48
48
|
headers = {}
|
49
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformSearchRequest, request
|
49
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformSearchRequest, request)
|
50
50
|
headers['Accept'] = 'application/json'
|
51
51
|
headers['user-agent'] = @sdk_configuration.user_agent
|
52
52
|
|
@@ -73,6 +73,7 @@ module PlexRubySDK
|
|
73
73
|
res.unauthorized = out
|
74
74
|
end
|
75
75
|
end
|
76
|
+
|
76
77
|
res
|
77
78
|
end
|
78
79
|
|
@@ -95,7 +96,7 @@ module PlexRubySDK
|
|
95
96
|
base_url = Utils.template_url(url, params)
|
96
97
|
url = "#{base_url}/hubs/search/voice"
|
97
98
|
headers = {}
|
98
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformVoiceSearchRequest, request
|
99
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformVoiceSearchRequest, request)
|
99
100
|
headers['Accept'] = 'application/json'
|
100
101
|
headers['user-agent'] = @sdk_configuration.user_agent
|
101
102
|
|
@@ -122,6 +123,7 @@ module PlexRubySDK
|
|
122
123
|
res.unauthorized = out
|
123
124
|
end
|
124
125
|
end
|
126
|
+
|
125
127
|
res
|
126
128
|
end
|
127
129
|
|
@@ -138,7 +140,7 @@ module PlexRubySDK
|
|
138
140
|
base_url = Utils.template_url(url, params)
|
139
141
|
url = "#{base_url}/search"
|
140
142
|
headers = {}
|
141
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchResultsRequest, request
|
143
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchResultsRequest, request)
|
142
144
|
headers['Accept'] = 'application/json'
|
143
145
|
headers['user-agent'] = @sdk_configuration.user_agent
|
144
146
|
|
@@ -169,6 +171,7 @@ module PlexRubySDK
|
|
169
171
|
res.unauthorized = out
|
170
172
|
end
|
171
173
|
end
|
174
|
+
|
172
175
|
res
|
173
176
|
end
|
174
177
|
end
|
data/lib/plex_ruby_sdk/server.rb
CHANGED
@@ -57,6 +57,7 @@ module PlexRubySDK
|
|
57
57
|
res.unauthorized = out
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
60
61
|
res
|
61
62
|
end
|
62
63
|
|
@@ -98,6 +99,7 @@ module PlexRubySDK
|
|
98
99
|
res.unauthorized = out
|
99
100
|
end
|
100
101
|
end
|
102
|
+
|
101
103
|
res
|
102
104
|
end
|
103
105
|
|
@@ -139,6 +141,7 @@ module PlexRubySDK
|
|
139
141
|
res.unauthorized = out
|
140
142
|
end
|
141
143
|
end
|
144
|
+
|
142
145
|
res
|
143
146
|
end
|
144
147
|
|
@@ -180,6 +183,7 @@ module PlexRubySDK
|
|
180
183
|
res.unauthorized = out
|
181
184
|
end
|
182
185
|
end
|
186
|
+
|
183
187
|
res
|
184
188
|
end
|
185
189
|
|
@@ -215,6 +219,7 @@ module PlexRubySDK
|
|
215
219
|
res.request_timeout = out
|
216
220
|
end
|
217
221
|
end
|
222
|
+
|
218
223
|
res
|
219
224
|
end
|
220
225
|
|
@@ -256,6 +261,7 @@ module PlexRubySDK
|
|
256
261
|
res.unauthorized = out
|
257
262
|
end
|
258
263
|
end
|
264
|
+
|
259
265
|
res
|
260
266
|
end
|
261
267
|
|
@@ -269,7 +275,7 @@ module PlexRubySDK
|
|
269
275
|
base_url = Utils.template_url(url, params)
|
270
276
|
url = "#{base_url}/photo/:/transcode"
|
271
277
|
headers = {}
|
272
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResizedPhotoRequest, request
|
278
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResizedPhotoRequest, request)
|
273
279
|
headers['Accept'] = 'application/json'
|
274
280
|
headers['user-agent'] = @sdk_configuration.user_agent
|
275
281
|
|
@@ -296,6 +302,7 @@ module PlexRubySDK
|
|
296
302
|
res.unauthorized = out
|
297
303
|
end
|
298
304
|
end
|
305
|
+
|
299
306
|
res
|
300
307
|
end
|
301
308
|
|
@@ -311,7 +318,7 @@ module PlexRubySDK
|
|
311
318
|
url, params = @sdk_configuration.get_server_details
|
312
319
|
base_url = Utils.template_url(url, params)
|
313
320
|
url = "#{base_url}/media/providers"
|
314
|
-
headers = Utils.get_headers(request
|
321
|
+
headers = Utils.get_headers(request)
|
315
322
|
headers['Accept'] = 'application/json'
|
316
323
|
headers['user-agent'] = @sdk_configuration.user_agent
|
317
324
|
|
@@ -341,6 +348,7 @@ module PlexRubySDK
|
|
341
348
|
res.unauthorized = out
|
342
349
|
end
|
343
350
|
end
|
351
|
+
|
344
352
|
res
|
345
353
|
end
|
346
354
|
|
@@ -382,6 +390,7 @@ module PlexRubySDK
|
|
382
390
|
res.unauthorized = out
|
383
391
|
end
|
384
392
|
end
|
393
|
+
|
385
394
|
res
|
386
395
|
end
|
387
396
|
end
|
@@ -57,6 +57,7 @@ module PlexRubySDK
|
|
57
57
|
res.unauthorized = out
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
60
61
|
res
|
61
62
|
end
|
62
63
|
|
@@ -76,7 +77,7 @@ module PlexRubySDK
|
|
76
77
|
base_url = Utils.template_url(url, params)
|
77
78
|
url = "#{base_url}/status/sessions/history/all"
|
78
79
|
headers = {}
|
79
|
-
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSessionHistoryRequest, request
|
80
|
+
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSessionHistoryRequest, request)
|
80
81
|
headers['Accept'] = 'application/json'
|
81
82
|
headers['user-agent'] = @sdk_configuration.user_agent
|
82
83
|
|
@@ -107,6 +108,7 @@ module PlexRubySDK
|
|
107
108
|
res.unauthorized = out
|
108
109
|
end
|
109
110
|
end
|
111
|
+
|
110
112
|
res
|
111
113
|
end
|
112
114
|
|
@@ -148,6 +150,7 @@ module PlexRubySDK
|
|
148
150
|
res.unauthorized = out
|
149
151
|
end
|
150
152
|
end
|
153
|
+
|
151
154
|
res
|
152
155
|
end
|
153
156
|
|
@@ -166,8 +169,7 @@ module PlexRubySDK
|
|
166
169
|
::PlexRubySDK::Operations::StopTranscodeSessionRequest,
|
167
170
|
base_url,
|
168
171
|
'/transcode/sessions/{sessionKey}',
|
169
|
-
request
|
170
|
-
@sdk_configuration.globals
|
172
|
+
request
|
171
173
|
)
|
172
174
|
headers = {}
|
173
175
|
headers['Accept'] = 'application/json'
|
@@ -195,6 +197,7 @@ module PlexRubySDK
|
|
195
197
|
res.unauthorized = out
|
196
198
|
end
|
197
199
|
end
|
200
|
+
|
198
201
|
res
|
199
202
|
end
|
200
203
|
end
|