api

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: MIT 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 {
	// contains filtered or unexported fields
}

func New

func New(cfg config.ChannelTelegram) (*API, error)

func (*API) SendPhotoMessage

func (api *API) SendPhotoMessage(mes *PhotoMessage) error

func (*API) SendTextMessage

func (api *API) SendTextMessage(mes *TextMessage) error

type PhotoMessage

type PhotoMessage struct {
	ChatID  int64  `json:"chat_id"`
	Photo   string `json:"photo"`
	Caption string `json:"caption,omitempty"`
}

func NewPhotoMessage

func NewPhotoMessage(chatID int64, photo, text string) *PhotoMessage

type TextMessage

type TextMessage struct {
	ChatID int64  `json:"chat_id"`
	Text   string `json:"text"`
}

func NewTextMessage

func NewTextMessage(chatID int64, text string) *TextMessage

Jump to

Keyboard shortcuts

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