Sha256: e94cc404701cb6520666ffa07cbb1b7ba506357f2447b9319738874d9a45752c
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'faraday' require 'faraday/multipart' require 'sorbet-runtime' module OpenApiSDK extend T::Sig class Connections extend T::Sig sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @sdk_configuration = sdk_config end sig { returns(::OpenApiSDK::Operations::RetrieveConnectionsResponse) } def retrieve # retrieve - List Connections url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/connections" headers = {} headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent r = @sdk_configuration.client.get(url) do |req| req.headers = headers 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 = ::OpenApiSDK::Operations::RetrieveConnectionsResponse.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, T::Array[::OpenApiSDK::Shared::Connection]) res.connections = out end end res end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
panora-0.2.4 | lib/open_api_sdk/connections.rb |