Documentation
¶
Index ¶
- type Chat
- type Client
- func (c *Client) Download(ctx context.Context, fileID string, maxBytes int64) ([]byte, error)
- func (c *Client) GetFile(ctx context.Context, fileID string) (File, error)
- func (c *Client) GetUpdates(ctx context.Context, offset int64, timeoutSeconds int) ([]Update, error)
- func (c *Client) SendDocument(ctx context.Context, chatID int64, name string, data []byte) (Message, error)
- func (c *Client) SendMessage(ctx context.Context, chatID int64, text string) (Message, error)
- func (c *Client) SendPhoto(ctx context.Context, chatID int64, name string, data []byte) (Message, error)
- type Document
- type File
- type Message
- type PhotoSize
- type Update
- type User
- type Voice
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 talks only to Telegram's fixed Bot API host. Endpoints and credentials never appear in returned errors.
func (*Client) GetUpdates ¶
func (*Client) SendDocument ¶
func (*Client) SendMessage ¶
type Message ¶
type Message struct {
ID int64 `json:"message_id"`
Chat Chat `json:"chat"`
From *User `json:"from,omitempty"`
Text string `json:"text,omitempty"`
Caption string `json:"caption,omitempty"`
ReplyToMessage *Message `json:"reply_to_message,omitempty"`
Document *Document `json:"document,omitempty"`
Photo []PhotoSize `json:"photo,omitempty"`
Voice *Voice `json:"voice,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.