Documentation
¶
Index ¶
- type App
- func (a *App) Close()
- func (a *App) DB() *store.DB
- func (a *App) DownloadMedia(ctx context.Context, chatArg string, msgID int, outputDir string) (string, error)
- func (a *App) ExportChat(ctx context.Context, chatArg string, w io.Writer, fromDB bool) error
- func (a *App) ListChats(ctx context.Context, chatType string, limit int) ([]store.Chat, error)
- func (a *App) ListMessages(ctx context.Context, chatArg string, limit int) ([]store.Message, error)
- func (a *App) Login(ctx context.Context, phone, code, password string) error
- func (a *App) Logout(ctx context.Context) error
- func (a *App) MessageContext(ctx context.Context, chatArg string, msgID, before, after int) ([]store.Message, error)
- func (a *App) RunTG(ctx context.Context, fn func(ctx context.Context) error) error
- func (a *App) SendFile(ctx context.Context, chatArg, filePath, caption string) error
- func (a *App) SendText(ctx context.Context, chatArg, message string) error
- func (a *App) StoreDir() string
- func (a *App) SyncAllChats(ctx context.Context, msgsPerChat int, ...) error
- func (a *App) SyncChat(ctx context.Context, chatArg string, onProgress func(fetched int)) error
- func (a *App) TG() *tgclient.Client
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) DownloadMedia ¶
func (a *App) DownloadMedia(ctx context.Context, chatArg string, msgID int, outputDir string) (string, error)
DownloadMedia downloads media from a specific message.
func (*App) ExportChat ¶
ExportChat exports messages from a chat to a writer as JSON.
func (*App) ListMessages ¶
ListMessages fetches message history from Telegram.
func (*App) MessageContext ¶
func (a *App) MessageContext(ctx context.Context, chatArg string, msgID, before, after int) ([]store.Message, error)
MessageContext returns messages around a specific message.
func (*App) SyncAllChats ¶
func (a *App) SyncAllChats(ctx context.Context, msgsPerChat int, onProgress func(chatName string, fetched int)) error
SyncAllChats syncs all dialogs and their recent messages.
Click to show internal directories.
Click to hide internal directories.