plex_ruby_sdk 0.3.5 → 0.4.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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plex_ruby_sdk/authentication.rb +3 -10
  3. data/lib/plex_ruby_sdk/models/operations/autoselectsubtitle.rb +2 -2
  4. data/lib/plex_ruby_sdk/models/operations/connections.rb +10 -10
  5. data/lib/plex_ruby_sdk/models/operations/defaultsubtitleaccessibility.rb +3 -3
  6. data/lib/plex_ruby_sdk/models/operations/defaultsubtitleforced.rb +2 -2
  7. data/lib/plex_ruby_sdk/models/operations/geodata.rb +2 -2
  8. data/lib/plex_ruby_sdk/models/operations/get_all_libraries_directory.rb +25 -25
  9. data/lib/plex_ruby_sdk/models/operations/get_all_libraries_mediacontainer.rb +5 -5
  10. data/lib/plex_ruby_sdk/models/operations/get_all_libraries_responsebody.rb +2 -2
  11. data/lib/plex_ruby_sdk/models/operations/get_library_items_field.rb +33 -0
  12. data/lib/plex_ruby_sdk/models/operations/get_library_items_fieldtype.rb +27 -0
  13. data/lib/plex_ruby_sdk/models/operations/get_library_items_filter.rb +36 -0
  14. data/lib/plex_ruby_sdk/models/operations/get_library_items_mediacontainer.rb +23 -19
  15. data/lib/plex_ruby_sdk/models/operations/get_library_items_metadata.rb +30 -26
  16. data/lib/plex_ruby_sdk/models/operations/get_library_items_operator.rb +27 -0
  17. data/lib/plex_ruby_sdk/models/operations/get_library_items_sort.rb +39 -0
  18. data/lib/plex_ruby_sdk/models/operations/get_library_items_type.rb +42 -0
  19. data/lib/plex_ruby_sdk/models/operations/get_server_resources_request.rb +2 -8
  20. data/lib/plex_ruby_sdk/models/operations/getgeodata_geodata.rb +2 -2
  21. data/lib/plex_ruby_sdk/models/operations/getpin_authpincontainer.rb +2 -2
  22. data/lib/plex_ruby_sdk/models/operations/getpin_request.rb +14 -11
  23. data/lib/plex_ruby_sdk/models/operations/getplaylistcontents_queryparam_type.rb +4 -4
  24. data/lib/plex_ruby_sdk/models/operations/gettokenbypinid_authpincontainer.rb +2 -2
  25. data/lib/plex_ruby_sdk/models/operations/gettokenbypinid_geodata.rb +2 -2
  26. data/lib/plex_ruby_sdk/models/operations/gettokenbypinid_request.rb +2 -8
  27. data/lib/plex_ruby_sdk/models/operations/gettokendetails_userplexaccount.rb +2 -2
  28. data/lib/plex_ruby_sdk/models/operations/gettopwatchedcontent_queryparam_type.rb +4 -4
  29. data/lib/plex_ruby_sdk/models/operations/includeguids.rb +2 -2
  30. data/lib/plex_ruby_sdk/models/operations/includehttps.rb +2 -2
  31. data/lib/plex_ruby_sdk/models/operations/includeipv6.rb +2 -2
  32. data/lib/plex_ruby_sdk/models/operations/includemeta.rb +2 -2
  33. data/lib/plex_ruby_sdk/models/operations/includerelay.rb +2 -2
  34. data/lib/plex_ruby_sdk/models/operations/location.rb +3 -3
  35. data/lib/plex_ruby_sdk/models/operations/mediaguid.rb +26 -0
  36. data/lib/plex_ruby_sdk/models/operations/mediareviewsvisibility.rb +3 -3
  37. data/lib/plex_ruby_sdk/models/operations/meta.rb +28 -0
  38. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_autoselectsubtitle.rb +2 -2
  39. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_defaultsubtitleaccessibility.rb +3 -3
  40. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_defaultsubtitleforced.rb +2 -2
  41. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_mediareviewsvisibility.rb +3 -3
  42. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userplexaccount.rb +2 -2
  43. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userprofile.rb +14 -14
  44. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_watchedindicator.rb +3 -3
  45. data/lib/plex_ruby_sdk/models/operations/protocol.rb +21 -0
  46. data/lib/plex_ruby_sdk/models/operations/queryparam_type.rb +4 -4
  47. data/lib/plex_ruby_sdk/models/operations/type.rb +4 -4
  48. data/lib/plex_ruby_sdk/models/operations/uploadplaylist_request.rb +5 -2
  49. data/lib/plex_ruby_sdk/models/operations/userprofile.rb +14 -14
  50. data/lib/plex_ruby_sdk/models/operations/watchedindicator.rb +3 -3
  51. data/lib/plex_ruby_sdk/models/operations.rb +9 -1
  52. data/lib/plex_ruby_sdk/models/shared/security.rb +1 -1
  53. data/lib/plex_ruby_sdk/playlists.rb +4 -3
  54. data/lib/plex_ruby_sdk/plex.rb +9 -19
  55. data/lib/plex_ruby_sdk/plex_api.rb +20 -4
  56. data/lib/plex_ruby_sdk/sdkconfiguration.rb +3 -3
  57. metadata +11 -3
  58. data/lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_request.rb +0 -33
@@ -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
+ PROTOCOL_SERVERS = [
10
+ 'https://plex.tv/api/v2/'
11
+ ].freeze
12
+
13
+ # Protocol - The protocol used for the connection (http, https, etc)
14
+ class Protocol < T::Enum
15
+ enums do
16
+ HTTP = new('http')
17
+ HTTPS = new('https')
18
+ end
19
+ end
20
+ end
21
+ end
@@ -16,10 +16,10 @@ module PlexRubySDK
16
16
  #
17
17
  class QueryParamType < T::Enum
18
18
  enums do
19
- ONE = new(1)
20
- TWO = new(2)
21
- THREE = new(3)
22
- FOUR = new(4)
19
+ MOVIE = new(1)
20
+ SHOW = new(2)
21
+ SEASON = new(3)
22
+ EPISODE = new(4)
23
23
  end
24
24
  end
25
25
  end
@@ -16,10 +16,10 @@ module PlexRubySDK
16
16
  #
17
17
  class Type < T::Enum
18
18
  enums do
19
- ONE = new(1)
20
- TWO = new(2)
21
- THREE = new(3)
22
- FOUR = new(4)
19
+ MOVIE = new(1)
20
+ SHOW = new(2)
21
+ SEASON = new(3)
22
+ EPISODE = new(4)
23
23
  end
24
24
  end
25
25
  end
@@ -25,12 +25,15 @@ module PlexRubySDK
25
25
  # The GUID of each playlist is based on the filename.
26
26
  #
27
27
  field :path, ::String, { 'query_param': { 'field_name': 'path', 'style': 'form', 'explode': true } }
28
+ # Possibly the section ID to upload the playlist to, we are not certain.
29
+ field :section_id, ::Integer, { 'query_param': { 'field_name': 'sectionID', 'style': 'form', 'explode': true } }
28
30
 
29
31
 
30
- sig { params(force: ::PlexRubySDK::Operations::QueryParamForce, path: ::String).void }
31
- def initialize(force: nil, path: nil)
32
+ sig { params(force: ::PlexRubySDK::Operations::QueryParamForce, path: ::String, section_id: ::Integer).void }
33
+ def initialize(force: nil, path: nil, section_id: nil)
32
34
  @force = force
33
35
  @path = path
36
+ @section_id = section_id
34
37
  end
35
38
  end
36
39
  end
@@ -14,32 +14,32 @@ module PlexRubySDK
14
14
  class UserProfile < ::PlexRubySDK::Utils::FieldAugmented
15
15
  extend T::Sig
16
16
 
17
+ # If the account has automatically select audio and subtitle tracks enabled
18
+ field :auto_select_audio, T::Boolean, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('autoSelectAudio') } }
19
+
20
+ field :auto_select_subtitle, ::PlexRubySDK::Operations::AutoSelectSubtitle, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('autoSelectSubtitle'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::AutoSelectSubtitle, false) } }
17
21
  # The preferred audio language for the account
18
22
  field :default_audio_language, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultAudioLanguage') } }
23
+
24
+ field :default_subtitle_accessibility, ::PlexRubySDK::Operations::DefaultSubtitleAccessibility, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultSubtitleAccessibility'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::DefaultSubtitleAccessibility, false) } }
25
+
26
+ field :default_subtitle_forced, ::PlexRubySDK::Operations::DefaultSubtitleForced, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultSubtitleForced'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::DefaultSubtitleForced, false) } }
19
27
  # The preferred subtitle language for the account
20
28
  field :default_subtitle_language, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultSubtitleLanguage') } }
21
- # If the account has automatically select audio and subtitle tracks enabled
22
- field :auto_select_audio, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('autoSelectAudio') } }
23
- # The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
24
- field :auto_select_subtitle, T.nilable(::PlexRubySDK::Operations::AutoSelectSubtitle), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('autoSelectSubtitle'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::AutoSelectSubtitle, true) } }
25
- # The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
26
- field :default_subtitle_accessibility, T.nilable(::PlexRubySDK::Operations::DefaultSubtitleAccessibility), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultSubtitleAccessibility'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::DefaultSubtitleAccessibility, true) } }
27
- # The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
28
- field :default_subtitle_forced, T.nilable(::PlexRubySDK::Operations::DefaultSubtitleForced), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('defaultSubtitleForced'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::DefaultSubtitleForced, true) } }
29
29
 
30
- field :media_reviews_visibility, T.nilable(::PlexRubySDK::Operations::MediaReviewsVisibility), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaReviewsVisibility'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::MediaReviewsVisibility, true) } }
30
+ field :media_reviews_visibility, ::PlexRubySDK::Operations::MediaReviewsVisibility, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('mediaReviewsVisibility'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::MediaReviewsVisibility, false) } }
31
31
 
32
- field :watched_indicator, T.nilable(::PlexRubySDK::Operations::WatchedIndicator), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('watchedIndicator'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::WatchedIndicator, true) } }
32
+ field :watched_indicator, ::PlexRubySDK::Operations::WatchedIndicator, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('watchedIndicator'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::WatchedIndicator, false) } }
33
33
 
34
34
 
35
- sig { params(default_audio_language: ::String, default_subtitle_language: ::String, auto_select_audio: T.nilable(T::Boolean), auto_select_subtitle: T.nilable(::PlexRubySDK::Operations::AutoSelectSubtitle), default_subtitle_accessibility: T.nilable(::PlexRubySDK::Operations::DefaultSubtitleAccessibility), default_subtitle_forced: T.nilable(::PlexRubySDK::Operations::DefaultSubtitleForced), media_reviews_visibility: T.nilable(::PlexRubySDK::Operations::MediaReviewsVisibility), watched_indicator: T.nilable(::PlexRubySDK::Operations::WatchedIndicator)).void }
36
- def initialize(default_audio_language: nil, default_subtitle_language: nil, auto_select_audio: nil, auto_select_subtitle: nil, default_subtitle_accessibility: nil, default_subtitle_forced: nil, media_reviews_visibility: nil, watched_indicator: nil)
37
- @default_audio_language = default_audio_language
38
- @default_subtitle_language = default_subtitle_language
35
+ sig { params(auto_select_audio: T::Boolean, auto_select_subtitle: ::PlexRubySDK::Operations::AutoSelectSubtitle, default_audio_language: ::String, default_subtitle_accessibility: ::PlexRubySDK::Operations::DefaultSubtitleAccessibility, default_subtitle_forced: ::PlexRubySDK::Operations::DefaultSubtitleForced, default_subtitle_language: ::String, media_reviews_visibility: ::PlexRubySDK::Operations::MediaReviewsVisibility, watched_indicator: ::PlexRubySDK::Operations::WatchedIndicator).void }
36
+ def initialize(auto_select_audio: nil, auto_select_subtitle: nil, default_audio_language: nil, default_subtitle_accessibility: nil, default_subtitle_forced: nil, default_subtitle_language: nil, media_reviews_visibility: nil, watched_indicator: nil)
39
37
  @auto_select_audio = auto_select_audio
40
38
  @auto_select_subtitle = auto_select_subtitle
39
+ @default_audio_language = default_audio_language
41
40
  @default_subtitle_accessibility = default_subtitle_accessibility
42
41
  @default_subtitle_forced = default_subtitle_forced
42
+ @default_subtitle_language = default_subtitle_language
43
43
  @media_reviews_visibility = media_reviews_visibility
44
44
  @watched_indicator = watched_indicator
45
45
  end
@@ -10,11 +10,11 @@ module PlexRubySDK
10
10
  'https://plex.tv/api/v2/'
11
11
  ].freeze
12
12
 
13
-
13
+ # WatchedIndicator - Whether or not media watched indicators are enabled (little orange dot on media)
14
14
  class WatchedIndicator < T::Enum
15
15
  enums do
16
- ZERO = new('0')
17
- ONE = new('1')
16
+ DISABLE = new(0)
17
+ ENABLE = new(1)
18
18
  end
19
19
  end
20
20
  end
@@ -201,6 +201,7 @@ module PlexRubySDK
201
201
  autoload :GetServerResourcesUnauthorized, 'plex_ruby_sdk/models/operations/get_server_resources_unauthorized.rb'
202
202
  autoload :GetServerResourcesErrors, 'plex_ruby_sdk/models/operations/get_server_resources_errors.rb'
203
203
  autoload :GetServerResourcesBadRequest, 'plex_ruby_sdk/models/operations/get_server_resources_badrequest.rb'
204
+ autoload :Protocol, 'plex_ruby_sdk/models/operations/protocol.rb'
204
205
  autoload :Connections, 'plex_ruby_sdk/models/operations/connections.rb'
205
206
  autoload :PlexDevice, 'plex_ruby_sdk/models/operations/plexdevice.rb'
206
207
  autoload :GetServerResourcesResponse, 'plex_ruby_sdk/models/operations/get_server_resources_response.rb'
@@ -345,7 +346,15 @@ module PlexRubySDK
345
346
  autoload :GetLibraryItemsDirector, 'plex_ruby_sdk/models/operations/get_library_items_director.rb'
346
347
  autoload :GetLibraryItemsWriter, 'plex_ruby_sdk/models/operations/get_library_items_writer.rb'
347
348
  autoload :GetLibraryItemsRole, 'plex_ruby_sdk/models/operations/get_library_items_role.rb'
349
+ autoload :MediaGuid, 'plex_ruby_sdk/models/operations/mediaguid.rb'
348
350
  autoload :GetLibraryItemsMetadata, 'plex_ruby_sdk/models/operations/get_library_items_metadata.rb'
351
+ autoload :GetLibraryItemsFilter, 'plex_ruby_sdk/models/operations/get_library_items_filter.rb'
352
+ autoload :GetLibraryItemsSort, 'plex_ruby_sdk/models/operations/get_library_items_sort.rb'
353
+ autoload :GetLibraryItemsField, 'plex_ruby_sdk/models/operations/get_library_items_field.rb'
354
+ autoload :GetLibraryItemsType, 'plex_ruby_sdk/models/operations/get_library_items_type.rb'
355
+ autoload :GetLibraryItemsOperator, 'plex_ruby_sdk/models/operations/get_library_items_operator.rb'
356
+ autoload :GetLibraryItemsFieldType, 'plex_ruby_sdk/models/operations/get_library_items_fieldtype.rb'
357
+ autoload :Meta, 'plex_ruby_sdk/models/operations/meta.rb'
349
358
  autoload :GetLibraryItemsMediaContainer, 'plex_ruby_sdk/models/operations/get_library_items_mediacontainer.rb'
350
359
  autoload :GetLibraryItemsResponseBody, 'plex_ruby_sdk/models/operations/get_library_items_responsebody.rb'
351
360
  autoload :GetLibraryItemsResponse, 'plex_ruby_sdk/models/operations/get_library_items_response.rb'
@@ -571,7 +580,6 @@ module PlexRubySDK
571
580
  autoload :GetTokenDetailsUserPlexAccount, 'plex_ruby_sdk/models/operations/gettokendetails_userplexaccount.rb'
572
581
  autoload :GetTokenDetailsResponse, 'plex_ruby_sdk/models/operations/gettokendetails_response.rb'
573
582
  autoload :PostUsersSignInDataRequestBody, 'plex_ruby_sdk/models/operations/post_users_sign_in_data_requestbody.rb'
574
- autoload :PostUsersSignInDataRequest, 'plex_ruby_sdk/models/operations/post_users_sign_in_data_request.rb'
575
583
  autoload :PostUsersSignInDataAuthenticationErrors, 'plex_ruby_sdk/models/operations/post_users_sign_in_data_authentication_errors.rb'
576
584
  autoload :PostUsersSignInDataUnauthorized, 'plex_ruby_sdk/models/operations/post_users_sign_in_data_unauthorized.rb'
577
585
  autoload :PostUsersSignInDataErrors, 'plex_ruby_sdk/models/operations/post_users_sign_in_data_errors.rb'
@@ -12,7 +12,7 @@ module PlexRubySDK
12
12
  extend T::Sig
13
13
 
14
14
 
15
- field :access_token, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'query', 'field_name': 'X-Plex-Token' } }
15
+ field :access_token, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'X-Plex-Token' } }
16
16
 
17
17
 
18
18
  sig { params(access_token: T.nilable(::String)).void }
@@ -433,15 +433,16 @@ module PlexRubySDK
433
433
  end
434
434
 
435
435
 
436
- sig { params(path: ::String, force: ::PlexRubySDK::Operations::QueryParamForce).returns(::PlexRubySDK::Operations::UploadPlaylistResponse) }
437
- def upload_playlist(path, force)
436
+ sig { params(path: ::String, force: ::PlexRubySDK::Operations::QueryParamForce, section_id: ::Integer).returns(::PlexRubySDK::Operations::UploadPlaylistResponse) }
437
+ def upload_playlist(path, force, section_id)
438
438
  # upload_playlist - Upload Playlist
439
439
  # Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
440
440
  #
441
441
  request = ::PlexRubySDK::Operations::UploadPlaylistRequest.new(
442
442
 
443
443
  path: path,
444
- force: force
444
+ force: force,
445
+ section_id: section_id
445
446
  )
446
447
  url, params = @sdk_configuration.get_server_details
447
448
  base_url = Utils.template_url(url, params)
@@ -216,13 +216,12 @@ module PlexRubySDK
216
216
  end
217
217
 
218
218
 
219
- sig { params(x_plex_client_identifier: T.nilable(::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) }
220
- def get_server_resources(x_plex_client_identifier = nil, include_https = nil, include_relay = nil, include_i_pv6 = nil, server_url = nil)
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), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetServerResourcesResponse) }
220
+ def get_server_resources(include_https = nil, include_relay = nil, include_i_pv6 = nil, server_url = nil)
221
221
  # get_server_resources - Get Server Resources
222
222
  # Get Plex server access tokens and server connections
223
223
  request = ::PlexRubySDK::Operations::GetServerResourcesRequest.new(
224
224
 
225
- x_plex_client_identifier: x_plex_client_identifier,
226
225
  include_https: include_https,
227
226
  include_relay: include_relay,
228
227
  include_i_pv6: include_i_pv6
@@ -267,16 +266,10 @@ module PlexRubySDK
267
266
  end
268
267
 
269
268
 
270
- sig { params(strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String), x_plex_product: T.nilable(::String), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetPinResponse) }
271
- def get_pin(strong = nil, x_plex_client_identifier = nil, x_plex_product = nil, server_url = nil)
269
+ sig { params(request: T.nilable(::PlexRubySDK::Operations::GetPinRequest), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetPinResponse) }
270
+ def get_pin(request, server_url = nil)
272
271
  # get_pin - Get a Pin
273
- # Retrieve a Pin from Plex.tv for authentication flows
274
- request = ::PlexRubySDK::Operations::GetPinRequest.new(
275
-
276
- strong: strong,
277
- x_plex_client_identifier: x_plex_client_identifier,
278
- x_plex_product: x_plex_product
279
- )
272
+ # Retrieve a Pin ID from Plex.tv to use for authentication flows
280
273
  base_url = Utils.template_url(GET_PIN_SERVERS[0], {
281
274
  })
282
275
  base_url = server_url if !server_url.nil?
@@ -296,7 +289,7 @@ module PlexRubySDK
296
289
  res = ::PlexRubySDK::Operations::GetPinResponse.new(
297
290
  status_code: r.status, content_type: content_type, raw_response: r
298
291
  )
299
- if r.status == 200
292
+ if r.status == 201
300
293
  if Utils.match_content_type(content_type, 'application/json')
301
294
  out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetPinAuthPinContainer)
302
295
  res.auth_pin_container = out
@@ -311,14 +304,13 @@ module PlexRubySDK
311
304
  end
312
305
 
313
306
 
314
- sig { params(pin_id: ::Integer, x_plex_client_identifier: T.nilable(::String), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetTokenByPinIdResponse) }
315
- def get_token_by_pin_id(pin_id, x_plex_client_identifier = nil, server_url = nil)
307
+ sig { params(pin_id: ::Integer, server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetTokenByPinIdResponse) }
308
+ def get_token_by_pin_id(pin_id, server_url = nil)
316
309
  # get_token_by_pin_id - Get Access Token by PinId
317
310
  # Retrieve an Access Token from Plex.tv after the Pin has been authenticated
318
311
  request = ::PlexRubySDK::Operations::GetTokenByPinIdRequest.new(
319
312
 
320
- pin_id: pin_id,
321
- x_plex_client_identifier: x_plex_client_identifier
313
+ pin_id: pin_id
322
314
  )
323
315
  base_url = Utils.template_url(GET_TOKEN_BY_PIN_ID_SERVERS[0], {
324
316
  })
@@ -331,13 +323,11 @@ module PlexRubySDK
331
323
  @sdk_configuration.globals
332
324
  )
333
325
  headers = {}
334
- query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTokenByPinIdRequest, request, @sdk_configuration.globals)
335
326
  headers['Accept'] = 'application/json'
336
327
  headers['user-agent'] = @sdk_configuration.user_agent
337
328
 
338
329
  r = @sdk_configuration.client.get(url) do |req|
339
330
  req.headers = headers
340
- req.params = query_params
341
331
  end
342
332
 
343
333
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
@@ -18,7 +18,11 @@ module PlexRubySDK
18
18
  sig do
19
19
  params(client: Faraday::Request,
20
20
  security: T.nilable(Shared::Security),
21
- x_plex_client_identifier: ::String,
21
+ client_id: ::String,
22
+ client_name: ::String,
23
+ client_version: ::String,
24
+ client_platform: ::String,
25
+ device_name: ::String,
22
26
  protocol: T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol),
23
27
  ip: T.nilable(::String),
24
28
  port: T.nilable(::String),
@@ -28,7 +32,11 @@ module PlexRubySDK
28
32
  end
29
33
  def initialize(client: nil,
30
34
  security: nil,
31
- x_plex_client_identifier: nil,
35
+ client_id: nil,
36
+ client_name: nil,
37
+ client_version: nil,
38
+ client_platform: nil,
39
+ device_name: nil,
32
40
  protocol: nil,
33
41
  ip: nil,
34
42
  port: nil,
@@ -39,7 +47,11 @@ module PlexRubySDK
39
47
  ## Instantiates the SDK configuring it with the provided parameters.
40
48
  # @param [Faraday::Request] client The faraday HTTP client to use for all operations
41
49
  # @param [Shared::Security] security The security details required for authentication
42
- # @param [::String] x_plex_client_identifier: Configures the x_plex_client_identifier parameter for all supported operations
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] client_platform: Configures the client_platform parameter for all supported operations
54
+ # @param [::String] device_name: Configures the device_name parameter for all supported operations
43
55
  # @param [T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol)] protocol: Allows setting the protocol variable for url substitution
44
56
  # @param [T.nilable(::String)] ip: Allows setting the ip variable for url substitution
45
57
  # @param [T.nilable(::String)] port: Allows setting the port variable for url substitution
@@ -74,7 +86,11 @@ module PlexRubySDK
74
86
  globals = {
75
87
  'parameters': {
76
88
  'queryParam': {
77
- 'x_plex_client_identifier': x_plex_client_identifier,
89
+ 'client_id': client_id,
90
+ 'client_name': client_name,
91
+ 'client_version': client_version,
92
+ 'client_platform': client_platform,
93
+ 'device_name': device_name,
78
94
  },
79
95
  'pathParam': {
80
96
  },
@@ -42,9 +42,9 @@ module PlexRubySDK
42
42
  @globals = globals.nil? ? {} : globals
43
43
  @language = 'ruby'
44
44
  @openapi_doc_version = '0.0.3'
45
- @sdk_version = '0.3.5'
46
- @gen_version = '2.415.8'
47
- @user_agent = 'speakeasy-sdk/ruby 0.3.5 2.415.8 0.0.3 plex_ruby_sdk'
45
+ @sdk_version = '0.4.0'
46
+ @gen_version = '2.421.3'
47
+ @user_agent = 'speakeasy-sdk/ruby 0.4.0 2.421.3 0.0.3 plex_ruby_sdk'
48
48
  end
49
49
 
50
50
  sig { returns([String, T::Hash[Symbol, String]]) }
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.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LukeHagar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2024-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -265,16 +265,22 @@ files:
265
265
  - lib/plex_ruby_sdk/models/operations/get_library_items_country.rb
266
266
  - lib/plex_ruby_sdk/models/operations/get_library_items_director.rb
267
267
  - lib/plex_ruby_sdk/models/operations/get_library_items_errors.rb
268
+ - lib/plex_ruby_sdk/models/operations/get_library_items_field.rb
269
+ - lib/plex_ruby_sdk/models/operations/get_library_items_fieldtype.rb
270
+ - lib/plex_ruby_sdk/models/operations/get_library_items_filter.rb
268
271
  - lib/plex_ruby_sdk/models/operations/get_library_items_genre.rb
269
272
  - lib/plex_ruby_sdk/models/operations/get_library_items_library_errors.rb
270
273
  - lib/plex_ruby_sdk/models/operations/get_library_items_media.rb
271
274
  - lib/plex_ruby_sdk/models/operations/get_library_items_mediacontainer.rb
272
275
  - lib/plex_ruby_sdk/models/operations/get_library_items_metadata.rb
276
+ - lib/plex_ruby_sdk/models/operations/get_library_items_operator.rb
273
277
  - lib/plex_ruby_sdk/models/operations/get_library_items_part.rb
274
278
  - lib/plex_ruby_sdk/models/operations/get_library_items_request.rb
275
279
  - lib/plex_ruby_sdk/models/operations/get_library_items_response.rb
276
280
  - lib/plex_ruby_sdk/models/operations/get_library_items_responsebody.rb
277
281
  - lib/plex_ruby_sdk/models/operations/get_library_items_role.rb
282
+ - lib/plex_ruby_sdk/models/operations/get_library_items_sort.rb
283
+ - lib/plex_ruby_sdk/models/operations/get_library_items_type.rb
278
284
  - lib/plex_ruby_sdk/models/operations/get_library_items_unauthorized.rb
279
285
  - lib/plex_ruby_sdk/models/operations/get_library_items_writer.rb
280
286
  - lib/plex_ruby_sdk/models/operations/get_media_providers_badrequest.rb
@@ -695,8 +701,10 @@ files:
695
701
  - lib/plex_ruby_sdk/models/operations/markunplayed_unauthorized.rb
696
702
  - lib/plex_ruby_sdk/models/operations/media.rb
697
703
  - lib/plex_ruby_sdk/models/operations/mediacontainer.rb
704
+ - lib/plex_ruby_sdk/models/operations/mediaguid.rb
698
705
  - lib/plex_ruby_sdk/models/operations/mediaprovider.rb
699
706
  - lib/plex_ruby_sdk/models/operations/mediareviewsvisibility.rb
707
+ - lib/plex_ruby_sdk/models/operations/meta.rb
700
708
  - lib/plex_ruby_sdk/models/operations/metadata.rb
701
709
  - lib/plex_ruby_sdk/models/operations/minsize.rb
702
710
  - lib/plex_ruby_sdk/models/operations/myplex.rb
@@ -734,7 +742,6 @@ files:
734
742
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_features.rb
735
743
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_mailingliststatus.rb
736
744
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_mediareviewsvisibility.rb
737
- - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_request.rb
738
745
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_requestbody.rb
739
746
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_response.rb
740
747
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_services.rb
@@ -746,6 +753,7 @@ files:
746
753
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_userprofile.rb
747
754
  - lib/plex_ruby_sdk/models/operations/post_users_sign_in_data_watchedindicator.rb
748
755
  - lib/plex_ruby_sdk/models/operations/producer.rb
756
+ - lib/plex_ruby_sdk/models/operations/protocol.rb
749
757
  - lib/plex_ruby_sdk/models/operations/provider.rb
750
758
  - lib/plex_ruby_sdk/models/operations/queryparam_filter.rb
751
759
  - lib/plex_ruby_sdk/models/operations/queryparam_force.rb
@@ -1,33 +0,0 @@
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
- POST_USERS_SIGN_IN_DATA_REQUEST_SERVERS = [
10
- 'https://plex.tv/api/v2/'
11
- ].freeze
12
-
13
-
14
- class PostUsersSignInDataRequest < ::PlexRubySDK::Utils::FieldAugmented
15
- extend T::Sig
16
-
17
- # Login credentials
18
- field :request_body, T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataRequestBody), { 'request': { 'media_type': 'application/x-www-form-urlencoded' } }
19
- # The unique identifier for the client application
20
- # This is used to track the client application and its usage
21
- # (UUID, serial number, or other number unique per device)
22
- #
23
- field :x_plex_client_identifier, T.nilable(::String), { 'query_param': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'form', 'explode': true } }
24
-
25
-
26
- sig { params(request_body: T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataRequestBody), x_plex_client_identifier: T.nilable(::String)).void }
27
- def initialize(request_body: nil, x_plex_client_identifier: nil)
28
- @request_body = request_body
29
- @x_plex_client_identifier = x_plex_client_identifier
30
- end
31
- end
32
- end
33
- end