social

package
v0.0.0-...-5f3b81a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	// from is who this message is from
	From *account.User

	// ChatID is the underlying provider's chatId
	ChatID string

	// Username is the username of the user we got this from
	Username string

	// UserID is the underlying provider's userId
	UserID string

	// PlatformName is the social media platform this came from
	PlatformName account.PlatformName

	Replyer func(chatId, message string) error

	// Error is included if an error occurred while processing this message
	Error error

	// Text is the message text
	Text string
}

Message is a message published be a social media provider

func (*Message) Reply

func (m *Message) Reply(text string) error

Reply is an easier to use interface for the built-in message replyer

type Provider

type Provider interface {
	// CreateStream returns a message stream from a provider
	CreateStream() (<-chan *Message, error)
}

Provider is a Social Media provider that integrates with an account

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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