class Tourmaline::KemalAdapter
- Tourmaline::KemalAdapter
- Kemal::Handler
- Reference
- Object
Defined in:
tourmaline/adapters/kemal.crConstructors
-
.new(bot : Tourmaline::Client, url : String, path = nil, certificate = nil, max_connections = nil)
Create a new instance of
TourmalineHandler
Instance Method Summary
- #bot : Tourmaline::Client
- #bot=(bot : Tourmaline::Client)
- #call(context)
- #check_config
- #path : String
- #path=(path : String)
- #set_webhook(certificate = nil, max_connections = nil)
- #unset_webhook
- #url : String
- #url=(url : String)
Constructor Detail
def self.new(bot : Tourmaline::Client, url : String, path = nil, certificate = nil, max_connections = nil)
#
Create a new instance of TourmalineHandler
Requires a #bot
instance, a #url
, and an optional #path
.
The #url
needs to be the publically accessable URL for the
Kemal server. The #path
defines where this will be served on your
kemal instance. By default this is at /tgbot/{bot_name}
, but
it is recommended to use your bot's API key somewhere in the
path for security reasons.