Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.82 KB

Integration.md

File metadata and controls

48 lines (37 loc) · 1.82 KB

Integration

An integration is Concierges way of interacting with different chat platforms. For example, amoungst others, there are Facebook, Skype and Test integrations.

Functions

These functions must be defined on the exports object within your integration.

start(callback)

Starts the integration.

stop()

Stops the integration.

getApi() ⇒ IntegrationApi

Gets the API provided by this integration.

Properties

All properties avalible to a module are also set on a service. See Modules. Additionally, if not set, within the config property a commandPrefix string will be set by default.


start(callback)

Starts the integration. Until this is called, the integration should assume properties such as config do not exist.

Required Kind: API method

Param Type Description
callback function() The callback that should be executed when a message is received. It takes two parameters, api and event. See IntegrationCreation.md#HandlingMessages for detail.

stop()

Stops the integration. This method is treated as if it is synchronous, by the time it finishes executing the integration should be stopped.

Required Kind: API method

getApi() ⇒ IntegrationApi

Gets the API provided by this integration. This method will only ever be called when the integration is running. See IntegrationCreation.md#HandlingMessages for how to create an API object.

Required Kind: API method See: Concierge API.