ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.526.6

This commit is contained in:
speakeasybot
2025-03-31 17:53:03 +00:00
parent 2ed1ed9148
commit 0781d394a5
37 changed files with 5387 additions and 666 deletions

View File

@@ -5,7 +5,10 @@
require 'faraday'
require 'faraday/multipart'
require 'faraday/retry'
require 'sorbet-runtime'
require_relative 'sdk_hooks/hooks'
require_relative 'utils/retries'
module PlexRubySDK
extend T::Sig
@@ -24,8 +27,8 @@ module PlexRubySDK
end
sig { params(request: T.nilable(::PlexRubySDK::Operations::GetUsersRequest), server_url: T.nilable(String)).returns(::PlexRubySDK::Operations::GetUsersResponse) }
def get_users(request, server_url = nil)
sig { params(request: T.nilable(::PlexRubySDK::Operations::GetUsersRequest), server_url: T.nilable(String), timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetUsersResponse) }
def get_users(request, server_url = nil, timeout_ms = nil)
# get_users - Get list of all connected users
# Get list of all users that are friends and have library access with the provided Plex authentication token
base_url = Utils.template_url(GET_USERS_SERVERS[0], {
@@ -36,8 +39,57 @@ module PlexRubySDK
headers['Accept'] = 'application/json;q=1, application/xml;q=0'
headers['user-agent'] = @sdk_configuration.user_agent
r = @sdk_configuration.client.get(url) do |req|
req.headers = headers
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
timeout ||= @sdk_configuration.timeout
connection = @sdk_configuration.client
hook_ctx = SDKHooks::HookContext.new(
base_url: base_url,
oauth2_scopes: nil,
operation_id: 'get-users',
security_source: nil
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.get(url) do |req|
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
@sdk_configuration.hooks.before_request(
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
hook_ctx: hook_ctx
),
request: req
)
end
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
else
r = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
)
end
if r.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')