class Qdrant::Api::Configuration

Defined in:

qdrant-api/configuration.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

Create a new Configuration.


[View source]
def self.new(&) #

Create a new Configuration with block.

config = Qdrant::Api::Configuration.new do |config|
  config.username = "xxx"
  config.password = "xxx"
end

[View source]

Class Method Detail

def self.default #

The default Configuration object.


[View source]

Instance Method Detail

def access_token : String | Nil #

Defines the access token (Bearer) used with OAuth2.


[View source]
def access_token=(access_token : String | Nil) #

Defines the access token (Bearer) used with OAuth2.


[View source]
def api_key : Hash(Symbol, String) #

Defines API keys used with API Key authentications.

@return [Hash] key: parameter name, value: parameter value (API key)

@example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string) config.api_key[:api_key] = "xxx"


[View source]
def api_key=(api_key : Hash(Symbol, String)) #

Defines API keys used with API Key authentications.

@return [Hash] key: parameter name, value: parameter value (API key)

@example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string) config.api_key[:api_key] = "xxx"


[View source]
def api_key_prefix : Hash(Symbol, String) #

Defines API key prefixes used with API Key authentications.

@return [Hash] key: parameter name, value: API key prefix

@example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers) config.api_key_prefix[:api_key] = "Token"


[View source]
def api_key_prefix=(api_key_prefix : Hash(Symbol, String)) #

Defines API key prefixes used with API Key authentications.

@return [Hash] key: parameter name, value: API key prefix

@example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers) config.api_key_prefix[:api_key] = "Token"


[View source]
def api_key_with_prefix(param_name) #

Gets API key (with prefix if set). @param [String] param_name the parameter name of API key auth


[View source]
def apply_auth!(headers : HTTP::Headers, params : Hash(String, String | Array(String)), auth_names : Array(String)) : Nil #

Applies authentication credentials to request headers and query params. Called by Connection#request for every outgoing request.


[View source]
def base_path : String #

Defines url base path


[View source]
def base_path=(base_path : String) #

Defines url base path


[View source]
def base_path=(base_path) #

[View source]
def base_url #

Returns the base URL for requests.


[View source]
def basic_auth_token #

Gets Basic Auth token string


[View source]
def client_side_validation : Bool #

Set this to false to skip client side validation in the operation. Default to true. @return [true, false]


[View source]
def client_side_validation=(client_side_validation : Bool) #

Set this to false to skip client side validation in the operation. Default to true. @return [true, false]


[View source]
def configure(&) #

Configure object with block.


[View source]
def debugging : Bool #

Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with logger.debug (see the #logger attribute). Default to false.

@return [true, false]


[View source]
def debugging=(debugging : Bool) #

Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with logger.debug (see the #logger attribute). Default to false.

@return [true, false]


[View source]
def default_headers : HTTP::Headers #

Default headers sent with every request.


[View source]
def default_headers=(default_headers : HTTP::Headers) #

Default headers sent with every request.


[View source]
def host : String #

Defines url host


[View source]
def host=(host : String) #

Defines url host


[View source]
def host=(host) #

[View source]
def logger : Crest::Logger #

Logger used by crest when #logging is enabled. Defaults to Crest::CommonLogger; assign a custom Crest::Logger to control formatting/output.


[View source]
def logger=(logger : Crest::Logger) #

Logger used by crest when #logging is enabled. Defaults to Crest::CommonLogger; assign a custom Crest::Logger to control formatting/output.


[View source]
def logging : Bool #

Enable the underlying HTTP client's (crest) request/response logging. Off by default, so the shard produces no log output unless a consumer opts in (e.g. a higher-level client wrapper can expose config.logging = true). Independent of #debugging.


[View source]
def logging=(logging : Bool) #

Enable the underlying HTTP client's (crest) request/response logging. Off by default, so the shard produces no log output unless a consumer opts in (e.g. a higher-level client wrapper can expose config.logging = true). Independent of #debugging.


[View source]
def params_encoder : Crest::ParamsEncoder.class #

Params encoder used to encode array query parameters. Default: Crest::NestedParamsEncoder (encodes arrays as key=a&key=b).


[View source]
def params_encoder=(params_encoder : Crest::ParamsEncoder.class) #

Params encoder used to encode array query parameters. Default: Crest::NestedParamsEncoder (encodes arrays as key=a&key=b).


[View source]
def password : String | Nil #

Defines the password used with HTTP basic authentication.

@return [String]


[View source]
def password=(password : String | Nil) #

Defines the password used with HTTP basic authentication.

@return [String]


[View source]
def scheme : String #

Defines url scheme


[View source]
def scheme=(scheme : String) #

Defines url scheme


[View source]
def scheme=(scheme) #

[View source]
def temp_folder_path : String | Nil #

Defines the temporary folder to store downloaded files (for API endpoints that have file response). Default to use Tempfile.

@return [String]


[View source]
def temp_folder_path=(temp_folder_path : String | Nil) #

Defines the temporary folder to store downloaded files (for API endpoints that have file response). Default to use Tempfile.

@return [String]


[View source]
def timeout : Int32 #

The time limit for HTTP request in seconds. Default to 0 (never times out).


[View source]
def timeout=(timeout : Int32) #

The time limit for HTTP request in seconds. Default to 0 (never times out).


[View source]
def username : String | Nil #

Defines the username used with HTTP basic authentication.

@return [String]


[View source]
def username=(username : String | Nil) #

Defines the username used with HTTP basic authentication.

@return [String]


[View source]