class Build::ApiClient
- Build::ApiClient
- Reference
- Object
Defined in:
build-client/api_client.crConstructors
-
.new(config : Build::Configuration = Configuration.default)
Initializes the ApiClient @option config [Configuration] Configuration for initializing the object, default to Configuration.default
Class Method Summary
Instance Method Summary
-
#build_collection_param(param, collection_format)
Build parameter value according to the given collection format.
- #build_request_url(path : String, operation : Symbol)
-
#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, form_params = {} of Symbol => String | ::File)
Call an API with given options.
-
#config : Configuration
The Configuration object holding settings to be used in the API client.
-
#config=(config : Configuration)
The Configuration object holding settings to be used in the API client.
-
#default_headers : Hash(String, String)
Defines the headers to be used in HTTP requests of all API calls by default.
-
#default_headers=(default_headers : Hash(String, String))
Defines the headers to be used in HTTP requests of all API calls by default.
-
#json_mime?(mime)
Check if the given MIME is a JSON MIME.
-
#select_header_accept(accepts) : String
Return Accept header based on an array of accepts provided.
-
#select_header_content_type(content_types)
Return Content-Type header based on an array of content types provided.
-
#update_params_for_auth!(header_params, query_params, auth_names)
Update header and query params based on authentication settings.
-
#user_agent=(user_agent : String)
Sets user agent in HTTP header
Constructor Detail
Initializes the ApiClient @option config [Configuration] Configuration for initializing the object, default to Configuration.default
Class Method Detail
Instance Method Detail
Build parameter value according to the given collection format. @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
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.
The Configuration object holding settings to be used in the API client.
The Configuration object holding settings to be used in the API client.
Defines the headers to be used in HTTP requests of all API calls by default.
@return [Hash]
Defines the headers to be used in HTTP requests of all API calls by default.
@return [Hash]
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
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)
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)
Update header and query params based on authentication settings.
@param [Hash] header_params Header parameters @param [Hash] query_params Query parameters @param [String] auth_names Authentication scheme name
Sets user agent in HTTP header
@param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)