class GoogleDrive::Configuration

Defined in:

google_drive/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 = Petstore::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(String, 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(String, 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(String, 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(String, 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 auth_settings #

Returns Auth Settings hash for api client.


[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(operation : String | Nil = nil) #

Returns base URL for specified operation based on server settings


[View source]
def basic_auth_token #

Gets Basic Auth token string


[View source]
def cert_file : String | Nil #

TLS/SSL setting

Client certificate file (for client certificate)


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

TLS/SSL setting

Client certificate file (for client certificate)


[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 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 connect_timeout : Int32 #

The time limit for connection in seconds. Default to 60.


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

The time limit for connection in seconds. Default to 60.


[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 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 host : String #

Defines url host


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

Defines url host


[View source]
def host=(host) #

[View source]
def key_file : String | Nil #

TLS/SSL setting

Client private key file (for client certificate)


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

TLS/SSL setting

Client private key file (for client certificate)


[View source]
def operation_server_settings #

[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 proxy_url : String | Nil #

Defines the proxy url.

@return [String]


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

Defines the proxy url.

@return [String]


[View source]
def read_timeout : Int32 #

The time limit for reading in seconds. Default to 60.


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

The time limit for reading in seconds. Default to 60.


[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 server_index : Int32 #

Define server configuration index


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

Define server configuration index


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

Define server operation configuration index


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

Define server operation configuration index


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

Default server operation variables


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

Default server operation variables


[View source]
def server_settings #

Returns an array of Server setting


[View source]
def server_url(index_string, variables = {} of String => String, servers = nil) #

Returns URL based on server settings

@param index array index of the server settings @param variables hash of variable and the corresponding value


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

Default server variables


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

Default server variables


[View source]
def ssl_ca_cert : String | Nil #

TLS/SSL setting

Set this to customize the certificate file to verify the peer.

@return [String] the path to the certificate file

@see The cainfo option of Typhoeus, --cert option of libcurl. Related source code: https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145


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

TLS/SSL setting

Set this to customize the certificate file to verify the peer.

@return [String] the path to the certificate file

@see The cainfo option of Typhoeus, --cert option of libcurl. Related source code: https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145


[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 60.


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

The time limit for HTTP request in seconds. Default to 60.


[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]
def verify_ssl=(verify_ssl : Bool) #

TLS/SSL setting

Set this to false to skip verifying SSL certificate when calling API from https server. Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]


[View source]
def verify_ssl? : Bool #

TLS/SSL setting

Set this to false to skip verifying SSL certificate when calling API from https server. Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]


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

TLS/SSL setting

Set this to false to skip verifying SSL host name Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]


[View source]
def verify_ssl_host? : Bool #

TLS/SSL setting

Set this to false to skip verifying SSL host name Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]


[View source]