class

Build::ApiClient

Inherits Reference < Object

Constructors

new(config : ::Build::Configuration = Configuration.default)

Initializes the ApiClient @option config [Configuration] Configuration for initializing the object, default to Configuration.default

Source

Class methods

default
Source

Instance methods

build_collection_param(param, collection_format)

Build parameter value according to the given collection format. @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi

Source
build_request_url(path : String, operation : Symbol)
Source
call_api(http_method : Symbol, path : String, operation : Symbol, return_type : String | Nil, post_body : String | Nil, auth_names = [] of String, header_params = {} of String => String, query_params = {} of String => String, cookie_params = {} of String => String, form_params = {} of Symbol => (String | ::File))

Call an API with given options.

@return [Array<(Object, Integer, Hash)>] an array of 3 elements: the data deserialized from response body (could be nil), response status code and response headers.

Source
config

The Configuration object holding settings to be used in the API client.

Source
config=(config : Configuration)

The Configuration object holding settings to be used in the API client.

Source
default_headers

Defines the headers to be used in HTTP requests of all API calls by default.

@return [Hash]

Source
default_headers=(default_headers : Hash(String, String))

Defines the headers to be used in HTTP requests of all API calls by default.

@return [Hash]

Source
json_mime?(mime)

Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON / @param [String] mime MIME @return [Boolean] True if the MIME is application/json

Source
select_header_accept(accepts) : String

Return Accept header based on an array of accepts provided. @param [Array] accepts array for Accept @return [String] the Accept header (e.g. application/json)

Source
select_header_content_type(content_types)

Return Content-Type header based on an array of content types provided. @param [Array] content_types array for Content-Type @return [String] the Content-Type header (e.g. application/json)

Source
user_agent=(user_agent : String)

Sets user agent in HTTP header

@param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)

Source