api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents API client.

func New

func New(botToken, userToken string) *Client

New returns prepared API client.

func (*Client) FetchChannels

func (a *Client) FetchChannels(ctx context.Context, tx boil.ContextTransactor) error

fetchChannels fetches and saves information about channels.

func (*Client) FetchMessages

func (a *Client) FetchMessages(ctx context.Context, tx boil.ContextTransactor, channelID string, fs ...FetchMessagesConditionFunc) error

FetchMessages fetches and saves information about messages.

func (*Client) FetchUsers

func (a *Client) FetchUsers(ctx context.Context, tx boil.ContextTransactor) error

FetchUsers fetches and saves information about users.

func (*Client) SetLogger

func (c *Client) SetLogger(w io.Writer)

SetLogger sets logger for debugging.

func (*Client) Whoami

func (a *Client) Whoami() (botName, botID, userName, userID string, err error)

Whoami returns login user identities.

type FetchMessagesConditionFunc

type FetchMessagesConditionFunc func(count int, m slack.Message) bool

FetchMessagesConditionFunc is a function which indicates continuation. Fetching is performed while this function returns true.

Jump to

Keyboard shortcuts

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