class Hermes
- Hermes
- Reference
- Object
Overview
Hermes-crystal is an high level API that allows you to subscribe and send Snips messages using the Hermes protocol.
Included Modules
Defined in:
api/hermes.crConstructors
-
.new(**options)
Create a new Hermes instance that connects to the underlying event bus.
Class Method Summary
-
.enable_debug_log
Enable printing extra debug logs.
-
.with_hermes(**options, &block)
Creates a new hermes instance and yields it to the block.
Instance Method Summary
-
#destroy
Disposes the hermes object and its underlying resources.
-
#dialog
Return a Dialog facade instance used to interact with the dialog API.
-
#feedback
Return a Feedback facade instance used to interact with the feedback API.
-
#finalize
Disposes the hermes object and its underlying resources.
-
#injection
Return an Injection facade instance used to interact with the injection API.
-
#tts
Return a Tts facade instance used to interact with the tts API.
Instance methods inherited from module Bindings
call!(result)call!(&block) call!
Instance methods inherited from module Bindings
call!(result)call!(&block) call!
Constructor Detail
Create a new Hermes instance that connects to the underlying event bus.
hermes = Hermes.new broker_address: "localhost:1883"
Class Method Detail
Creates a new hermes instance and yields it to the block. When the proc returns, gracefully destroy the underlying resources.
Hermes.with_hermes broker_address: "localhost:1883" do |hermes|
# do stuff…
sleep # or wait for something to finish
end