mirror of
https://github.com/LukeHagar/plexruby.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2
This commit is contained in:
@@ -63,6 +63,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -81,8 +82,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::CancelServerActivitiesRequest,
|
||||
base_url,
|
||||
'/activities/{activityUUID}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -110,6 +110,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,7 +44,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/security/token"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTransientTokenRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTransientTokenRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -71,6 +71,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -89,7 +90,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/security/resources"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSourceConnectionInformationRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSourceConnectionInformationRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -116,6 +117,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -158,6 +160,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -170,7 +173,7 @@ module PlexRubySDK
|
||||
})
|
||||
base_url = server_url if !server_url.nil?
|
||||
url = "#{base_url}/users/signin"
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :form)
|
||||
headers['content-type'] = req_content_type
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -208,6 +211,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,6 +57,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -99,6 +100,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -137,6 +139,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -160,8 +163,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::StartTaskRequest,
|
||||
base_url,
|
||||
'/butler/{taskName}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -189,6 +191,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -208,8 +211,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::StopTaskRequest,
|
||||
base_url,
|
||||
'/butler/{taskName}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -237,6 +239,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/hubs"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetGlobalHubsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetGlobalHubsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -64,6 +64,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -77,7 +78,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/hubs/home/recentlyAdded"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRecentlyAddedRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRecentlyAddedRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -99,6 +100,7 @@ module PlexRubySDK
|
||||
end
|
||||
elsif [400, 401].include?(r.status)
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -120,11 +122,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetLibraryHubsRequest,
|
||||
base_url,
|
||||
'/hubs/sections/{sectionId}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryHubsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryHubsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -155,6 +156,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/library/hashes"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetFileHashRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetFileHashRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -60,6 +60,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -73,7 +74,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/library/recentlyAdded"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRecentlyAddedLibraryRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRecentlyAddedLibraryRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -104,6 +105,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -151,6 +153,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -209,11 +212,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetLibraryDetailsRequest,
|
||||
base_url,
|
||||
'/library/sections/{sectionKey}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryDetailsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryDetailsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -244,6 +246,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -262,8 +265,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::DeleteLibraryRequest,
|
||||
base_url,
|
||||
'/library/sections/{sectionKey}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -291,6 +293,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -318,6 +321,7 @@ module PlexRubySDK
|
||||
# - `resolution`: Items categorized by resolution.
|
||||
# - `firstCharacter`: Items categorized by the first letter.
|
||||
# - `folder`: Items categorized by folder.
|
||||
# - `albums`: Items categorized by album.
|
||||
#
|
||||
url, params = @sdk_configuration.get_server_details
|
||||
base_url = Utils.template_url(url, params)
|
||||
@@ -325,11 +329,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetLibraryItemsRequest,
|
||||
base_url,
|
||||
'/library/sections/{sectionKey}/{tag}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryItemsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetLibraryItemsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -360,6 +363,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -380,11 +384,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetRefreshLibraryMetadataRequest,
|
||||
base_url,
|
||||
'/library/sections/{sectionKey}/refresh',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRefreshLibraryMetadataRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetRefreshLibraryMetadataRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -411,6 +414,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -448,11 +452,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetSearchLibraryRequest,
|
||||
base_url,
|
||||
'/library/sections/{sectionKey}/search',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchLibraryRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchLibraryRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -483,6 +486,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -495,8 +499,8 @@ module PlexRubySDK
|
||||
url, params = @sdk_configuration.get_server_details
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/library/search"
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchAllLibrariesRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchAllLibrariesRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -527,6 +531,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -546,8 +551,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetMetaDataByRatingKeyRequest,
|
||||
base_url,
|
||||
'/library/metadata/{ratingKey}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -579,6 +583,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -599,11 +604,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetMetadataChildrenRequest,
|
||||
base_url,
|
||||
'/library/metadata/{ratingKey}/children',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetMetadataChildrenRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetMetadataChildrenRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -634,6 +638,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -652,7 +657,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/library/all/top"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTopWatchedContentRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTopWatchedContentRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -683,6 +688,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -725,6 +731,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/log"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::LogLineRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::LogLineRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -62,6 +62,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -130,6 +131,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -168,6 +170,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/:/scrobble"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::MarkPlayedRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::MarkPlayedRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -59,6 +59,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -75,7 +76,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/:/unscrobble"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::MarkUnplayedRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::MarkUnplayedRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -102,6 +103,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -121,7 +123,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/:/progress"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlayProgressRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlayProgressRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -148,6 +150,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -162,11 +165,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetBannerImageRequest,
|
||||
base_url,
|
||||
'/library/metadata/{ratingKey}/banner',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetBannerImageRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetBannerImageRequest, request)
|
||||
headers['Accept'] = 'application/json;q=1, image/jpeg;q=0'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -184,7 +186,6 @@ module PlexRubySDK
|
||||
if r.status == 200
|
||||
res.headers = r.headers
|
||||
res.bytes = r.env.response_body if Utils.match_content_type(content_type, 'image/jpeg')
|
||||
|
||||
elsif r.status == 400
|
||||
if Utils.match_content_type(content_type, 'application/json')
|
||||
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetBannerImageBadRequest)
|
||||
@@ -196,6 +197,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -210,11 +212,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetThumbImageRequest,
|
||||
base_url,
|
||||
'/library/metadata/{ratingKey}/thumb',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetThumbImageRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetThumbImageRequest, request)
|
||||
headers['Accept'] = 'application/json;q=1, image/jpeg;q=0'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -232,7 +233,6 @@ module PlexRubySDK
|
||||
if r.status == 200
|
||||
res.headers = r.headers
|
||||
res.bytes = r.env.response_body if Utils.match_content_type(content_type, 'image/jpeg')
|
||||
|
||||
elsif r.status == 400
|
||||
if Utils.match_content_type(content_type, 'application/json')
|
||||
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetThumbImageBadRequest)
|
||||
@@ -244,6 +244,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -133,12 +133,12 @@ module PlexRubySDK
|
||||
field :role, T.nilable(T::Array[::PlexRubySDK::Operations::GetLibraryItemsRole]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Role') } }
|
||||
|
||||
field :season_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('seasonCount') } }
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
field :show_ordering, T.nilable(::PlexRubySDK::Operations::GetLibraryItemsShowOrdering), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('showOrdering'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::GetLibraryItemsShowOrdering, true) } }
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
module PlexRubySDK
|
||||
module Operations
|
||||
|
||||
# GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
class GetLibraryItemsShowOrdering < T::Enum
|
||||
enums do
|
||||
NONE = new('None')
|
||||
TMDB_AIRING = new('tmdbAiring')
|
||||
AIRED = new('aired')
|
||||
DVD = new('dvd')
|
||||
ABSOLUTE = new('absolute')
|
||||
TVDB_AIRING = new('tvdbAiring')
|
||||
TVDB_DVD = new('tvdbDvd')
|
||||
TVDB_ABSOLUTE = new('tvdbAbsolute')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,12 +29,16 @@ module PlexRubySDK
|
||||
field :duration, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('duration') } }
|
||||
|
||||
field :genre, T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyGenre]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Genre') } }
|
||||
# The name of the album artist for the track when audio, and the name of the TV show for the episode when video.
|
||||
field :grandparent_title, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('grandparentTitle') } }
|
||||
|
||||
field :guid, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('guid') } }
|
||||
|
||||
field :guids, T.nilable(T::Array[::PlexRubySDK::Operations::Guids]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Guid') } }
|
||||
|
||||
field :has_premium_primary_extra, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('hasPremiumPrimaryExtra') } }
|
||||
# The index starting from 0 of this media item in the MetaData array.
|
||||
field :index, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('index') } }
|
||||
|
||||
field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('key') } }
|
||||
|
||||
@@ -47,6 +51,12 @@ module PlexRubySDK
|
||||
field :media, T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyMedia]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Media') } }
|
||||
|
||||
field :originally_available_at, T.nilable(::Date), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('originallyAvailableAt'), 'decoder': Utils.date_from_iso_format(true) } }
|
||||
# The orginal untranslated name of the media item when non-english.
|
||||
field :original_title, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('originalTitle') } }
|
||||
# The parent index starting from 0 of this media item in the parent MetaData array.
|
||||
field :parent_index, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('parentIndex') } }
|
||||
# The name of the album for the track when audio, and the name of the season for the episode when TV show.
|
||||
field :parent_title, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('parentTitle') } }
|
||||
|
||||
field :producer, T.nilable(T::Array[::PlexRubySDK::Operations::Producer]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Producer') } }
|
||||
|
||||
@@ -79,8 +89,8 @@ module PlexRubySDK
|
||||
field :year, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('year') } }
|
||||
|
||||
|
||||
sig { params(added_at: T.nilable(::Integer), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), content_rating: T.nilable(::String), country: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyCountry]), director: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyDirector]), duration: T.nilable(::Integer), genre: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyGenre]), guid: T.nilable(::String), guids: T.nilable(T::Array[::PlexRubySDK::Operations::Guids]), has_premium_primary_extra: T.nilable(::String), key: T.nilable(::String), library_section_id: T.nilable(::Integer), library_section_key: T.nilable(::String), library_section_title: T.nilable(::String), media: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyMedia]), originally_available_at: T.nilable(::Date), producer: T.nilable(T::Array[::PlexRubySDK::Operations::Producer]), rating: T.nilable(::Float), rating_image: T.nilable(::String), rating_key: T.nilable(::String), ratings: T.nilable(T::Array[::PlexRubySDK::Operations::Ratings]), role: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyRole]), 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), writer: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyWriter]), year: T.nilable(::Integer)).void }
|
||||
def initialize(added_at: nil, art: nil, audience_rating: nil, audience_rating_image: nil, content_rating: nil, country: nil, director: nil, duration: nil, genre: nil, guid: nil, guids: nil, has_premium_primary_extra: nil, key: nil, library_section_id: nil, library_section_key: nil, library_section_title: nil, media: nil, originally_available_at: nil, producer: nil, rating: nil, rating_image: nil, rating_key: nil, ratings: nil, role: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, writer: nil, year: nil)
|
||||
sig { params(added_at: T.nilable(::Integer), art: T.nilable(::String), audience_rating: T.nilable(::Float), audience_rating_image: T.nilable(::String), content_rating: T.nilable(::String), country: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyCountry]), director: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyDirector]), duration: T.nilable(::Integer), genre: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyGenre]), grandparent_title: T.nilable(::String), guid: T.nilable(::String), guids: T.nilable(T::Array[::PlexRubySDK::Operations::Guids]), has_premium_primary_extra: T.nilable(::String), index: T.nilable(::Integer), key: T.nilable(::String), library_section_id: T.nilable(::Integer), library_section_key: T.nilable(::String), library_section_title: T.nilable(::String), media: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyMedia]), originally_available_at: T.nilable(::Date), original_title: T.nilable(::String), parent_index: T.nilable(::Integer), parent_title: T.nilable(::String), producer: T.nilable(T::Array[::PlexRubySDK::Operations::Producer]), rating: T.nilable(::Float), rating_image: T.nilable(::String), rating_key: T.nilable(::String), ratings: T.nilable(T::Array[::PlexRubySDK::Operations::Ratings]), role: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyRole]), 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), writer: T.nilable(T::Array[::PlexRubySDK::Operations::GetMetaDataByRatingKeyWriter]), year: T.nilable(::Integer)).void }
|
||||
def initialize(added_at: nil, art: nil, audience_rating: nil, audience_rating_image: nil, content_rating: nil, country: nil, director: nil, duration: nil, genre: nil, grandparent_title: nil, guid: nil, guids: nil, has_premium_primary_extra: nil, index: nil, key: nil, library_section_id: nil, library_section_key: nil, library_section_title: nil, media: nil, originally_available_at: nil, original_title: nil, parent_index: nil, parent_title: nil, producer: nil, rating: nil, rating_image: nil, rating_key: nil, ratings: nil, role: nil, studio: nil, summary: nil, tagline: nil, thumb: nil, title: nil, type: nil, updated_at: nil, writer: nil, year: nil)
|
||||
@added_at = added_at
|
||||
@art = art
|
||||
@audience_rating = audience_rating
|
||||
@@ -90,15 +100,20 @@ module PlexRubySDK
|
||||
@director = director
|
||||
@duration = duration
|
||||
@genre = genre
|
||||
@grandparent_title = grandparent_title
|
||||
@guid = guid
|
||||
@guids = guids
|
||||
@has_premium_primary_extra = has_premium_primary_extra
|
||||
@index = index
|
||||
@key = key
|
||||
@library_section_id = library_section_id
|
||||
@library_section_key = library_section_key
|
||||
@library_section_title = library_section_title
|
||||
@media = media
|
||||
@originally_available_at = originally_available_at
|
||||
@original_title = original_title
|
||||
@parent_index = parent_index
|
||||
@parent_title = parent_title
|
||||
@producer = producer
|
||||
@rating = rating
|
||||
@rating_image = rating_image
|
||||
|
||||
@@ -133,12 +133,12 @@ module PlexRubySDK
|
||||
field :role, T.nilable(T::Array[::PlexRubySDK::Operations::Role]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Role') } }
|
||||
|
||||
field :season_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('seasonCount') } }
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
field :show_ordering, T.nilable(::PlexRubySDK::Operations::ShowOrdering), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('showOrdering'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::ShowOrdering, true) } }
|
||||
|
||||
|
||||
@@ -133,12 +133,12 @@ module PlexRubySDK
|
||||
field :role, T.nilable(T::Array[::PlexRubySDK::Operations::GetSearchAllLibrariesRole]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('Role') } }
|
||||
|
||||
field :season_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('seasonCount') } }
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
field :show_ordering, T.nilable(::PlexRubySDK::Operations::GetSearchAllLibrariesShowOrdering), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('showOrdering'), 'decoder': Utils.enum_from_string(::PlexRubySDK::Operations::GetSearchAllLibrariesShowOrdering, true) } }
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ module PlexRubySDK
|
||||
class GetSearchAllLibrariesRequest < ::PlexRubySDK::Utils::FieldAugmented
|
||||
extend T::Sig
|
||||
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# The search query term.
|
||||
field :query, ::String, { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } }
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# Whether to include collections in the search results.
|
||||
field :include_collections, T.nilable(::PlexRubySDK::Operations::QueryParamIncludeCollections), { 'query_param': { 'field_name': 'includeCollections', 'style': 'form', 'explode': true } }
|
||||
# Whether to include external media in the search results.
|
||||
@@ -26,10 +26,10 @@ module PlexRubySDK
|
||||
field :search_types, T.nilable(T::Array[::PlexRubySDK::Operations::SearchTypes]), { 'query_param': { 'field_name': 'searchTypes', 'style': 'form', 'explode': false } }
|
||||
|
||||
|
||||
sig { params(query: ::String, client_id: T.nilable(::String), include_collections: T.nilable(::PlexRubySDK::Operations::QueryParamIncludeCollections), include_external_media: T.nilable(::PlexRubySDK::Operations::QueryParamIncludeExternalMedia), limit: T.nilable(::Integer), search_types: T.nilable(T::Array[::PlexRubySDK::Operations::SearchTypes])).void }
|
||||
def initialize(query: nil, client_id: nil, include_collections: nil, include_external_media: nil, limit: nil, search_types: nil)
|
||||
@query = query
|
||||
sig { params(client_id: ::String, query: ::String, include_collections: T.nilable(::PlexRubySDK::Operations::QueryParamIncludeCollections), include_external_media: T.nilable(::PlexRubySDK::Operations::QueryParamIncludeExternalMedia), limit: T.nilable(::Integer), search_types: T.nilable(T::Array[::PlexRubySDK::Operations::SearchTypes])).void }
|
||||
def initialize(client_id: nil, query: nil, include_collections: nil, include_external_media: nil, limit: nil, search_types: nil)
|
||||
@client_id = client_id
|
||||
@query = query
|
||||
@include_collections = include_collections
|
||||
@include_external_media = include_external_media
|
||||
@limit = limit
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
module PlexRubySDK
|
||||
module Operations
|
||||
|
||||
# GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
class GetSearchAllLibrariesShowOrdering < T::Enum
|
||||
enums do
|
||||
NONE = new('None')
|
||||
TMDB_AIRING = new('tmdbAiring')
|
||||
AIRED = new('aired')
|
||||
DVD = new('dvd')
|
||||
ABSOLUTE = new('absolute')
|
||||
TVDB_AIRING = new('tvdbAiring')
|
||||
TVDB_DVD = new('tvdbDvd')
|
||||
TVDB_ABSOLUTE = new('tvdbAbsolute')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ module PlexRubySDK
|
||||
extend T::Sig
|
||||
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# Include Https entries in the results
|
||||
field :include_https, T.nilable(::PlexRubySDK::Operations::IncludeHttps), { 'query_param': { 'field_name': 'includeHttps', 'style': 'form', 'explode': true } }
|
||||
# Include IPv6 entries in the results
|
||||
@@ -26,7 +26,7 @@ module PlexRubySDK
|
||||
field :include_relay, T.nilable(::PlexRubySDK::Operations::IncludeRelay), { 'query_param': { 'field_name': 'includeRelay', 'style': 'form', 'explode': true } }
|
||||
|
||||
|
||||
sig { params(client_id: T.nilable(::String), include_https: T.nilable(::PlexRubySDK::Operations::IncludeHttps), include_i_pv6: T.nilable(::PlexRubySDK::Operations::IncludeIPv6), include_relay: T.nilable(::PlexRubySDK::Operations::IncludeRelay)).void }
|
||||
sig { params(client_id: ::String, include_https: T.nilable(::PlexRubySDK::Operations::IncludeHttps), include_i_pv6: T.nilable(::PlexRubySDK::Operations::IncludeIPv6), include_relay: T.nilable(::PlexRubySDK::Operations::IncludeRelay)).void }
|
||||
def initialize(client_id: nil, include_https: nil, include_i_pv6: nil, include_relay: nil)
|
||||
@client_id = client_id
|
||||
@include_https = include_https
|
||||
|
||||
@@ -15,7 +15,7 @@ module PlexRubySDK
|
||||
extend T::Sig
|
||||
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
|
||||
# The version of the client application.
|
||||
@@ -31,7 +31,7 @@ module PlexRubySDK
|
||||
field :strong, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'strong', 'style': 'form', 'explode': true } }
|
||||
|
||||
|
||||
sig { params(client_id: T.nilable(::String), client_name: T.nilable(::String), client_version: T.nilable(::String), device_nickname: T.nilable(::String), platform: T.nilable(::String), strong: T.nilable(T::Boolean)).void }
|
||||
sig { params(client_id: ::String, client_name: T.nilable(::String), client_version: T.nilable(::String), device_nickname: T.nilable(::String), platform: T.nilable(::String), strong: T.nilable(T::Boolean)).void }
|
||||
def initialize(client_id: nil, client_name: nil, client_version: nil, device_nickname: nil, platform: nil, strong: nil)
|
||||
@client_id = client_id
|
||||
@client_name = client_name
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,10 +14,10 @@ module PlexRubySDK
|
||||
class GetTokenByPinIdRequest < ::PlexRubySDK::Utils::FieldAugmented
|
||||
extend T::Sig
|
||||
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# The PinID to retrieve an access token for
|
||||
field :pin_id, ::Integer, { 'path_param': { 'field_name': 'pinID', 'style': 'simple', 'explode': false } }
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
|
||||
# The version of the client application.
|
||||
@@ -28,10 +28,10 @@ module PlexRubySDK
|
||||
field :platform, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Platform', 'style': 'simple', 'explode': false } }
|
||||
|
||||
|
||||
sig { params(pin_id: ::Integer, client_id: T.nilable(::String), client_name: T.nilable(::String), client_version: T.nilable(::String), device_nickname: T.nilable(::String), platform: T.nilable(::String)).void }
|
||||
def initialize(pin_id: nil, client_id: nil, client_name: nil, client_version: nil, device_nickname: nil, platform: nil)
|
||||
@pin_id = pin_id
|
||||
sig { params(client_id: ::String, pin_id: ::Integer, client_name: T.nilable(::String), client_version: T.nilable(::String), device_nickname: T.nilable(::String), platform: T.nilable(::String)).void }
|
||||
def initialize(client_id: nil, pin_id: nil, client_name: nil, client_version: nil, device_nickname: nil, platform: nil)
|
||||
@client_id = client_id
|
||||
@pin_id = pin_id
|
||||
@client_name = client_name
|
||||
@client_version = client_version
|
||||
@device_nickname = device_nickname
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ module PlexRubySDK
|
||||
extend T::Sig
|
||||
|
||||
# An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
field :client_id, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
field :client_id, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
|
||||
# The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
field :client_name, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Product', 'style': 'simple', 'explode': false } }
|
||||
# The version of the client application.
|
||||
@@ -28,7 +28,7 @@ module PlexRubySDK
|
||||
field :request_body, T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataRequestBody), { 'request': { 'media_type': 'application/x-www-form-urlencoded' } }
|
||||
|
||||
|
||||
sig { params(client_id: T.nilable(::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 }
|
||||
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 }
|
||||
def initialize(client_id: nil, client_name: nil, client_version: nil, device_nickname: nil, platform: nil, request_body: nil)
|
||||
@client_id = client_id
|
||||
@client_name = client_name
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
module PlexRubySDK
|
||||
module Operations
|
||||
|
||||
# ShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# aired = TheTVDB (Aired),
|
||||
# dvd = TheTVDB (DVD),
|
||||
# absolute = TheTVDB (Absolute)).
|
||||
# ShowOrdering - Setting that indicates the episode ordering for the show
|
||||
# None = Library default,
|
||||
# tmdbAiring = The Movie Database (Aired),
|
||||
# tvdbAiring = TheTVDB (Aired),
|
||||
# tvdbDvd = TheTVDB (DVD),
|
||||
# tvdbAbsolute = TheTVDB (Absolute)).
|
||||
#
|
||||
class ShowOrdering < T::Enum
|
||||
enums do
|
||||
NONE = new('None')
|
||||
TMDB_AIRING = new('tmdbAiring')
|
||||
AIRED = new('aired')
|
||||
DVD = new('dvd')
|
||||
ABSOLUTE = new('absolute')
|
||||
TVDB_AIRING = new('tvdbAiring')
|
||||
TVDB_DVD = new('tvdbDvd')
|
||||
TVDB_ABSOLUTE = new('tvdbAbsolute')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,6 +29,7 @@ module PlexRubySDK
|
||||
RESOLUTION = new('resolution')
|
||||
FIRST_CHARACTER = new('firstCharacter')
|
||||
FOLDER = new('folder')
|
||||
ALBUMS = new('albums')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,6 +21,8 @@ module PlexRubySDK
|
||||
SEASON = new(3)
|
||||
EPISODE = new(4)
|
||||
AUDIO = new(8)
|
||||
ALBUM = new(9)
|
||||
TRACK = new(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/playlists"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CreatePlaylistRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CreatePlaylistRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -65,6 +65,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -82,7 +83,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/playlists"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -113,6 +114,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -133,8 +135,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetPlaylistRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -166,6 +167,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -185,8 +187,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::DeletePlaylistRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -214,6 +215,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -235,11 +237,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::UpdatePlaylistRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlaylistRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UpdatePlaylistRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -266,6 +267,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -289,11 +291,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetPlaylistContentsRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}/items',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistContentsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPlaylistContentsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -324,6 +325,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -343,8 +345,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::ClearPlaylistContentsRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}/items',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -372,6 +373,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -394,11 +396,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::AddPlaylistContentsRequest,
|
||||
base_url,
|
||||
'/playlists/{playlistID}/items',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::AddPlaylistContentsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::AddPlaylistContentsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -429,6 +430,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -448,7 +450,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/playlists/upload"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UploadPlaylistRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::UploadPlaylistRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -475,6 +477,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,6 +88,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -130,6 +131,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -171,6 +173,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -212,27 +215,28 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
|
||||
sig { params(include_https: T.nilable(::PlexRubySDK::Operations::IncludeHttps), include_relay: T.nilable(::PlexRubySDK::Operations::IncludeRelay), include_i_pv6: T.nilable(::PlexRubySDK::Operations::IncludeIPv6), client_id: T.nilable(::String), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetServerResourcesResponse) }
|
||||
def get_server_resources(include_https = nil, include_relay = nil, include_i_pv6 = nil, client_id = nil, server_url = nil)
|
||||
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) }
|
||||
def get_server_resources(client_id, include_https = nil, include_relay = nil, include_i_pv6 = nil, server_url = nil)
|
||||
# get_server_resources - Get Server Resources
|
||||
# Get Plex server access tokens and server connections
|
||||
request = ::PlexRubySDK::Operations::GetServerResourcesRequest.new(
|
||||
|
||||
client_id: client_id,
|
||||
include_https: include_https,
|
||||
include_relay: include_relay,
|
||||
include_i_pv6: include_i_pv6,
|
||||
client_id: client_id
|
||||
include_i_pv6: include_i_pv6
|
||||
)
|
||||
base_url = Utils.template_url(GET_SERVER_RESOURCES_SERVERS[0], {
|
||||
})
|
||||
base_url = server_url if !server_url.nil?
|
||||
url = "#{base_url}/resources"
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetServerResourcesRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetServerResourcesRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -263,6 +267,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -275,8 +280,8 @@ module PlexRubySDK
|
||||
})
|
||||
base_url = server_url if !server_url.nil?
|
||||
url = "#{base_url}/pins"
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPinRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetPinRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -301,6 +306,7 @@ module PlexRubySDK
|
||||
res.bad_request = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -316,10 +322,9 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetTokenByPinIdRequest,
|
||||
base_url,
|
||||
'/pins/{pinID}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -348,6 +353,7 @@ module PlexRubySDK
|
||||
res.object = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,11 +18,6 @@ module PlexRubySDK
|
||||
sig do
|
||||
params(client: Faraday::Request,
|
||||
security: T.nilable(Shared::Security),
|
||||
client_id: ::String,
|
||||
client_name: ::String,
|
||||
client_version: ::String,
|
||||
platform: ::String,
|
||||
device_nickname: ::String,
|
||||
protocol: T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol),
|
||||
ip: T.nilable(::String),
|
||||
port: T.nilable(::String),
|
||||
@@ -32,11 +27,6 @@ module PlexRubySDK
|
||||
end
|
||||
def initialize(client: nil,
|
||||
security: nil,
|
||||
client_id: nil,
|
||||
client_name: nil,
|
||||
client_version: nil,
|
||||
platform: nil,
|
||||
device_nickname: nil,
|
||||
protocol: nil,
|
||||
ip: nil,
|
||||
port: nil,
|
||||
@@ -47,11 +37,6 @@ module PlexRubySDK
|
||||
## Instantiates the SDK configuring it with the provided parameters.
|
||||
# @param [Faraday::Request] client The faraday HTTP client to use for all operations
|
||||
# @param [Shared::Security] security The security details required for authentication
|
||||
# @param [::String] client_id: Configures the client_id parameter for all supported operations
|
||||
# @param [::String] client_name: Configures the client_name parameter for all supported operations
|
||||
# @param [::String] client_version: Configures the client_version parameter for all supported operations
|
||||
# @param [::String] platform: Configures the platform parameter for all supported operations
|
||||
# @param [::String] device_nickname: Configures the device_nickname parameter for all supported operations
|
||||
# @param [T.nilable(::PlexRubySDK::ServerVariables::ServerProtocol)] protocol: Allows setting the protocol variable for url substitution
|
||||
# @param [T.nilable(::String)] ip: Allows setting the ip variable for url substitution
|
||||
# @param [T.nilable(::String)] port: Allows setting the port variable for url substitution
|
||||
@@ -83,23 +68,7 @@ module PlexRubySDK
|
||||
},
|
||||
]
|
||||
|
||||
globals = {
|
||||
'parameters': {
|
||||
'queryParam': {
|
||||
},
|
||||
'pathParam': {
|
||||
},
|
||||
'header': {
|
||||
'client_id': client_id,
|
||||
'client_name': client_name,
|
||||
'client_version': client_version,
|
||||
'platform': platform,
|
||||
'device_nickname': device_nickname,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params, globals)
|
||||
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params)
|
||||
init_sdks
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ module PlexRubySDK
|
||||
field :server_url, T.nilable(String)
|
||||
field :server_idx, T.nilable(Integer)
|
||||
field :server_params, Array[Hash[Symbol, String]], { 'default_factory': Array}
|
||||
field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]]
|
||||
field :language, String
|
||||
field :openapi_doc_version, String
|
||||
field :sdk_version, String
|
||||
@@ -31,20 +30,19 @@ module PlexRubySDK
|
||||
field :user_agent, String
|
||||
|
||||
|
||||
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], globals: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).void }
|
||||
def initialize(client, security, server_url, server_idx, server_params, globals)
|
||||
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 }
|
||||
def initialize(client, security, server_url, server_idx, server_params)
|
||||
@client = client
|
||||
@server_url = server_url
|
||||
@server_idx = server_idx.nil? ? 0 : server_idx
|
||||
raise StandardError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
|
||||
@server_params = server_params
|
||||
@security = security
|
||||
@globals = globals.nil? ? {} : globals
|
||||
@language = 'ruby'
|
||||
@openapi_doc_version = '0.0.3'
|
||||
@sdk_version = '0.5.1'
|
||||
@gen_version = '2.457.9'
|
||||
@user_agent = 'speakeasy-sdk/ruby 0.5.1 2.457.9 0.0.3 plex_ruby_sdk'
|
||||
@sdk_version = '0.6.0'
|
||||
@gen_version = '2.483.1'
|
||||
@user_agent = 'speakeasy-sdk/ruby 0.6.0 2.483.1 0.0.3 plex_ruby_sdk'
|
||||
end
|
||||
|
||||
sig { returns([String, T::Hash[Symbol, String]]) }
|
||||
|
||||
@@ -46,7 +46,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/hubs/search"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformSearchRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformSearchRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -73,6 +73,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -95,7 +96,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/hubs/search/voice"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformVoiceSearchRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::PerformVoiceSearchRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -122,6 +123,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -138,7 +140,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/search"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchResultsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSearchResultsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -169,6 +171,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,6 +57,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -98,6 +99,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -139,6 +141,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -180,6 +183,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -215,6 +219,7 @@ module PlexRubySDK
|
||||
res.request_timeout = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -256,6 +261,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -269,7 +275,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/photo/:/transcode"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResizedPhotoRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResizedPhotoRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -296,6 +302,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -311,7 +318,7 @@ module PlexRubySDK
|
||||
url, params = @sdk_configuration.get_server_details
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/media/providers"
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -341,6 +348,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -382,6 +390,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,6 +57,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -76,7 +77,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/status/sessions/history/all"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSessionHistoryRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetSessionHistoryRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -107,6 +108,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -148,6 +150,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -166,8 +169,7 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::StopTranscodeSessionRequest,
|
||||
base_url,
|
||||
'/transcode/sessions/{sessionKey}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = {}
|
||||
headers['Accept'] = 'application/json'
|
||||
@@ -195,6 +197,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/statistics/media"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetStatisticsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetStatisticsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -63,6 +63,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -79,7 +80,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/statistics/resources"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResourcesStatisticsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetResourcesStatisticsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -110,6 +111,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -126,7 +128,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/statistics/bandwidth"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetBandwidthStatisticsRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetBandwidthStatisticsRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -157,6 +159,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,6 +58,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -74,7 +75,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/updater/check"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CheckForUpdatesRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::CheckForUpdatesRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -101,6 +102,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -119,7 +121,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/updater/apply"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::ApplyUpdatesRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::ApplyUpdatesRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -146,6 +148,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -358,7 +358,7 @@ module PlexRubySDK
|
||||
|
||||
sig { params(content_type: String, pattern: String).returns(T::Boolean) }
|
||||
def self.match_content_type(content_type, pattern)
|
||||
return true if content_type == pattern || pattern == '*' || pattern == '*/*'
|
||||
return true if content_type == pattern || ['*', '*/*'].include?(pattern)
|
||||
|
||||
pieces = content_type.split(';')
|
||||
pieces.each do |piece|
|
||||
@@ -593,7 +593,7 @@ module PlexRubySDK
|
||||
file_fields = val.fields
|
||||
|
||||
file_name = ''
|
||||
field_name = ''
|
||||
field_name = field_metadata[:field_name]
|
||||
content = nil
|
||||
|
||||
file_fields.each do |file_field|
|
||||
@@ -603,11 +603,10 @@ module PlexRubySDK
|
||||
if file_metadata[:content] == true
|
||||
content = val.send(file_field.name)
|
||||
else
|
||||
field_name = file_metadata.fetch(:field_name, file_field.name)
|
||||
file_name = val.send(file_field.name)
|
||||
end
|
||||
end
|
||||
raise StandardError, 'invalid multipart/form-data file' if field_name == '' || file_name == '' || content == nil?
|
||||
raise StandardError, 'invalid multipart/form-data file' if file_name == '' || content == nil?
|
||||
|
||||
form.append([field_name, [file_name, content]])
|
||||
elsif field_metadata[:json] == true
|
||||
|
||||
@@ -28,7 +28,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/:/timeline"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTimelineRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetTimelineRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -55,6 +55,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
|
||||
@@ -67,7 +68,7 @@ module PlexRubySDK
|
||||
base_url = Utils.template_url(url, params)
|
||||
url = "#{base_url}/video/:/transcode/universal/start.mpd"
|
||||
headers = {}
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::StartUniversalTranscodeRequest, request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::StartUniversalTranscodeRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -94,6 +95,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,11 +36,10 @@ module PlexRubySDK
|
||||
::PlexRubySDK::Operations::GetWatchListRequest,
|
||||
base_url,
|
||||
'/library/sections/watchlist/{filter}',
|
||||
request,
|
||||
@sdk_configuration.globals
|
||||
request
|
||||
)
|
||||
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetWatchListRequest, request, @sdk_configuration.globals)
|
||||
headers = Utils.get_headers(request)
|
||||
query_params = Utils.get_query_params(::PlexRubySDK::Operations::GetWatchListRequest, request)
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
@@ -71,6 +70,7 @@ module PlexRubySDK
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user