fbm

package
v0.0.0-...-89493d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 BotUser

type BotUser struct {
	bots.BotUserEntity
}

BotUser entity

type Chat

type Chat struct {
	bots.BotChatEntity
	FbmUserID string //TODO: Is it Facebook User ID?
	LastSeq   int
}

Chat entity

func NewFbmChat

func NewFbmChat() Chat

NewFbmChat create new FBM chat entity

func (*Chat) SetBotUserID

func (chat *Chat) SetBotUserID(id interface{})

SetBotUserID sets bot user ID

type Platform

type Platform struct {
}

Platform describes FBM platform

func (Platform) ID

func (p Platform) ID() string

ID returns ID of FBM platform

func (Platform) Version

func (p Platform) Version() string

Version returns version of the platform

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL