api

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Config   *config.Protocol
	Remote   chan config.Message
	Account  string
	Messages ring.Ring
	sync.RWMutex
}

func New

func New(cfg config.Protocol, account string, c chan config.Message) *Api

func (*Api) Connect

func (b *Api) Connect() error

func (*Api) Disconnect

func (b *Api) Disconnect() error

func (*Api) JoinChannel

func (b *Api) JoinChannel(channel config.ChannelInfo) error

func (*Api) Send

func (b *Api) Send(msg config.Message) (string, error)

type ApiMessage

type ApiMessage struct {
	Text     string `json:"text"`
	Username string `json:"username"`
	UserID   string `json:"userid"`
	Avatar   string `json:"avatar"`
	Gateway  string `json:"gateway"`
}

Jump to

Keyboard shortcuts

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