Toshi::Api::ClassMethods
Instance methods
_create_client
Source_create_pool
Source_request(path : String, method = "GET", params = nil, headers = nil, body : String | JSON::Serializable | NamedTuple | Nil = nil)
Generic method for making a request with params and headers
Generic method for making a request with a URI and headers
configure(_options : Options | Nil = nil, &)
Configure the API client
MyApi.configure do |opts|
opts.host = "localhost"
opts.port = 5000
opts.prefix = "api/v0"
opts.default_headers = {"User-Agent" => "Toshi-Ruby-Client"}
opts.sleep_time = 0.1
end
configure(_options : Options | Nil = nil)
Sourcedefault_options
Sourcelogger
Sourceoptions
Sourcepool
Source