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.406.0
This commit is contained in:
@@ -487,6 +487,50 @@ module PlexRubySDK
|
||||
end
|
||||
|
||||
|
||||
sig { params(request: T.nilable(::PlexRubySDK::Operations::GetSearchAllLibrariesRequest)).returns(::PlexRubySDK::Operations::GetSearchAllLibrariesResponse) }
|
||||
def get_search_all_libraries(request)
|
||||
# get_search_all_libraries - Search All Libraries
|
||||
# Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
|
||||
#
|
||||
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['Accept'] = 'application/json'
|
||||
headers['user-agent'] = @sdk_configuration.user_agent
|
||||
|
||||
r = @sdk_configuration.client.get(url) do |req|
|
||||
req.headers = headers
|
||||
req.params = query_params
|
||||
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
||||
end
|
||||
|
||||
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
||||
|
||||
res = ::PlexRubySDK::Operations::GetSearchAllLibrariesResponse.new(
|
||||
status_code: r.status, content_type: content_type, raw_response: r
|
||||
)
|
||||
if r.status == 200
|
||||
if Utils.match_content_type(content_type, 'application/json')
|
||||
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetSearchAllLibrariesResponseBody)
|
||||
res.object = out
|
||||
end
|
||||
elsif r.status == 400
|
||||
if Utils.match_content_type(content_type, 'application/json')
|
||||
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetSearchAllLibrariesBadRequest)
|
||||
res.bad_request = out
|
||||
end
|
||||
elsif r.status == 401
|
||||
if Utils.match_content_type(content_type, 'application/json')
|
||||
out = Utils.unmarshal_complex(r.env.response_body, ::PlexRubySDK::Operations::GetSearchAllLibrariesUnauthorized)
|
||||
res.unauthorized = out
|
||||
end
|
||||
end
|
||||
res
|
||||
end
|
||||
|
||||
|
||||
sig { params(rating_key: ::Integer).returns(::PlexRubySDK::Operations::GetMetaDataByRatingKeyResponse) }
|
||||
def get_meta_data_by_rating_key(rating_key)
|
||||
# get_meta_data_by_rating_key - Get Metadata by RatingKey
|
||||
|
||||
Reference in New Issue
Block a user