Documentation ¶
Index ¶
- Constants
- func NewFbmBot(mode strongo.Environment, ...) bots.BotSettings
- func NewFbmWebhookHandler(botsBy bots.SettingsProvider, translatorProvider bots.TranslatorProvider) bots.WebhookHandler
- func NewFbmWebhookInput(messaging fbmbotapi.Messaging) bots.WebhookInput
- type BotUser
- type Chat
- type Platform
- type WebhookChat
Constants ¶
View Source
const ( // ChatKind is kind name for FBM chat entity ChatKind = "Chat" // BotUserKind is kind name for FBM user entity BotUserKind = "FbmUser" )
View Source
const PlatformID = "fbm"
PlatformID is platform ID for FBM
Variables ¶
This section is empty.
Functions ¶
func NewFbmBot ¶
func NewFbmBot(mode strongo.Environment, profile, code, id, token, verifyToken, gaToken string, locale strongo.Locale) bots.BotSettings
NewFbmBot creates definition of a new FB Messenger bot
func NewFbmWebhookHandler ¶
func NewFbmWebhookHandler(botsBy bots.SettingsProvider, translatorProvider bots.TranslatorProvider) bots.WebhookHandler
NewFbmWebhookHandler returns handler that handles FBM messages
func NewFbmWebhookInput ¶
func NewFbmWebhookInput(messaging fbmbotapi.Messaging) bots.WebhookInput
NewFbmWebhookInput maps API struct to framework struct
Types ¶
type Chat ¶
type Chat struct { bots.BotChatEntity FbmUserID string //TODO: Is it Facebook User ID? LastSeq int }
Chat entity
func (*Chat) SetBotUserID ¶
func (chat *Chat) SetBotUserID(id interface{})
SetBotUserID sets bot user ID
type WebhookChat ¶
type WebhookChat struct {
ID string
}
WebhookChat provides information about current FBM chat
func NewFbmWebhookChat ¶
func NewFbmWebhookChat(id string) WebhookChat
NewFbmWebhookChat creates a new FBM chat instance
func (WebhookChat) GetID ¶
func (wh WebhookChat) GetID() string
GetID returns ID of current FBM chat
func (WebhookChat) GetType ¶
func (wh WebhookChat) GetType() string
GetType returns type of bot chat, always 'private' for FBM
func (WebhookChat) IsGroupChat ¶
func (wh WebhookChat) IsGroupChat() bool
IsGroupChat indicates if current chat is a group one. Always false for FBM
Click to show internal directories.
Click to hide internal directories.