Open thdxr opened 9 years ago
module Conversation
Jarvis.registerRegexModel("conversation.hello", "^hello$")
Jarvis.registerRegexModel("conversation.status", "^how are you$")
Jarvis.registerStringable('conversation.response", "$message")
async for model, context = Jarvis.subscribeModel("conversation.hello")
Jarvis.emitModel("conversation.response", { message : "hello"}, context)
next, context = Jarvis.waitFor("conversation.status", context)
Jarvis.emitModel("conversation.response", { message : "I'm great"}, context)
endmodule
Example in pseudocode
API
Hangout Microservice
Weather Microservice