class Tourmaline::KemalAdapter(T)
- Tourmaline::KemalAdapter(T)
- Kemal::Handler
- Reference
- Object
Overview
Tourmaline adapter for Kemal.
This handler allows you to use Tourmaline as a part of your Kemal server rather than as a standalone server. This means that webhook requests can be sent to a specific path and handled accordingly.
Defined in:
tourmaline/extra/kemal.crConstructors
-
.new(bot : T, url : String, path = nil, certificate = nil, max_connections = nil)
Create a new instance of
TourmalineHandler
Instance Method Summary
- #bot : T
- #bot=(bot : T)
- #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
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 /webhook/{bot.name}
, but
it is recommended to use your bot's API key somewhere in the
path for security reasons.