Contains all the handlers to communicate with different platforms
messenger--> Contains all the object and functions and adapter object to reply on Facebook Messengerslack--> Contains functions and adapter object to send reply on Slackweb--> Contains functions and adapter object to send reply in the ovh's managers
-
Add new webhook/route for specific platform in
routesand his handler incontrollers -
When you call
bot.ask()in the controller of your webhook this function return a generic structure that you must transform/adapt for your platform. -
You have to develop adapters for your platform (for example: messenger_adapters.js).
-
For at least, each generic type you have to create an adapter and use this one in your function
send(messageData)(example in messenger.js) that takes a generic structure and transform it via an adapter and send it to the platform API.
-
TextMessage--> simple message with text -
ButtonsMessage--> message with multiple buttons (1 - 3 buttons) -
ButtonsListMessage--> message with more buttons like a list and with sometimes the more button to display next items. (1 - 4 buttons)
-
URL--> button with a link to other pages on the browser for example (http://ovh.com) -
POSTBACK--> Button that launch an action on this API -
MORE--> Button to display more items in a list