service

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveChat

func ArchiveChat(ctx context.Context, client *api.Client, chatID string, archived bool) error

func ClearReminder

func ClearReminder(ctx context.Context, client *api.Client, chatID string) error

func DeleteMessage

func DeleteMessage(ctx context.Context, client *api.Client, chatID, messageID string) error

func FetchAllChats

func FetchAllChats(ctx context.Context, client *api.Client, params url.Values, direction string, limit int) ([]api.Chat, error)

func Focus

func Focus(ctx context.Context, client *api.Client, body api.FocusRequest) error

func GetChat

func GetChat(ctx context.Context, client *api.Client, chatID string) (api.Chat, error)

func ListAccounts

func ListAccounts(ctx context.Context, client *api.Client) ([]api.Account, error)

func ListChats

func ListChats(ctx context.Context, client *api.Client, params url.Values) (api.ListChatsResponse, error)

func ListMessages

func ListMessages(ctx context.Context, client *api.Client, chatID string, params url.Values) (api.ListMessagesResponse, error)

func ListMessagesByCursor

func ListMessagesByCursor(ctx context.Context, client *api.Client, chatID, cursor, direction string) (api.ListMessagesResponse, error)

func MarkChatRead

func MarkChatRead(ctx context.Context, client *api.Client, chatID string) error

func NextChatCursor

func NextChatCursor(result api.ListChatsResponse, direction string) string

func ReactToMessage

func ReactToMessage(ctx context.Context, client *api.Client, chatID, messageID string, body api.ReactionRequest) error

func SearchChats

func SearchChats(ctx context.Context, client *api.Client, params url.Values) (api.ListChatsResponse, error)

func SearchMessages

func SearchMessages(ctx context.Context, client *api.Client, params url.Values) (api.SearchMessagesResponse, error)

func SendMessage

func SendMessage(ctx context.Context, client *api.Client, chatID string, body api.SendMessageRequest) (api.SendMessageResponse, error)

func SetReminder

func SetReminder(ctx context.Context, client *api.Client, chatID string, body api.ReminderRequest) error

func TryGetChat

func TryGetChat(ctx context.Context, client *api.Client, chatID string) (api.Chat, error)

TryGetChat fetches chat details, returning an empty chat if not found (404). Server errors (5xx) are propagated as errors. This is useful for optional context where chat info is non-critical but server issues should be reported.

func ValidateToken

func ValidateToken(ctx context.Context, baseURL, token string) error

ValidateToken checks that a token can authenticate against the API.

Types

This section is empty.

Jump to

Keyboard shortcuts

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