class Hermes

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.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Bindings

call!(result)
call!(&block)
call!

Instance methods inherited from module Bindings

call!(result)
call!(&block)
call!

Constructor Detail

def self.new(**options) #

Create a new Hermes instance that connects to the underlying event bus.

hermes = Hermes.new broker_address: "localhost:1883"

[View source]

Class Method Detail

def self.enable_debug_log #

Enable printing extra debug logs.


[View source]
def self.with_hermes(**options, &block) #

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

[View source]

Instance Method Detail

def destroy #

Disposes the hermes object and its underlying resources.


[View source]
def dialog #

Return a Dialog facade instance used to interact with the dialog API.


[View source]
def feedback #

Return a Feedback facade instance used to interact with the feedback API.


[View source]
def finalize #

Disposes the hermes object and its underlying resources.


[View source]
def injection #

Return an Injection facade instance used to interact with the injection API.


[View source]
def tts #

Return a Tts facade instance used to interact with the tts API.


[View source]