Discover Packages
github.com/jroimartin/tgbot-ng
tg
package
Version:
v0.0.0-...-ee03bf6
Opens a new window with list of versions in this module.
Published: Jul 14, 2015
License: BSD-3-Clause
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Chat
type Client
func (c *Client) GetUpdates() (UpdateResponse, error)
func (c *Client) SendDocument(chatID int, doc File) (Response, error)
func (c *Client) SendKbd(chatID, replyID int, text string, kbd ReplyKeyboardMarkup) (Response, error)
func (c *Client) SendMessage(params SendMessageParams) (Response, error)
func (c *Client) SendPhoto(chatID int, photo File) (Response, error)
func (c *Client) SendText(chatID int, text string) (Response, error)
func (c *Client) SendTextReply(chatID, replyID int, text string) (Response, error)
type Document
type File
type ForceReply
type Message
type PhotoSize
type ReplyKeyboardHide
type ReplyKeyboardMarkup
type Response
type SendMessageParams
type Update
type UpdateResponse
type User
type Chat struct {
ID int
}
type Document struct {
FileID string `json:"file_id"`
Thumb PhotoSize `json:"thumb"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
FileSize int `json:"file_size"`
}
type ForceReply struct {
ForceReply bool `json:"force_reply"`
Selective bool `json:"selective"`
}
type Message struct {
ID int `json:"message_id"`
From User `json:"from"`
Date int `json:"date"`
Chat Chat `json:"chat"`
Text string `json:"text"`
Photo []PhotoSize `json:"photo"`
Document Document `json:"document"`
}
type PhotoSize struct {
FileID string `json:"file_id"`
Width int `json:"width"`
Height int `json:"height"`
FileSize int `json:"file_size"`
}
type ReplyKeyboardHide struct {
HideKeyboard bool `json:"hide_keyboard"`
Selective bool `json:"selective"`
}
type ReplyKeyboardMarkup struct {
Keyboard [][]string `json:"keyboard"`
Resize bool `json:"resize_keyboard"`
OneTime bool `json:"one_time_keyboard"`
Selective bool `json:"selective"`
}
type Response struct {
Ok bool `json:"ok"`
Message Message `json:"result"`
}
type SendMessageParams struct {
ChatID int `json:"chat_id"`
Text string `json:"text"`
Preview bool `json:"disable_web_page_preview"`
ReplyID int `json:"reply_to_message_id"`
ReplyMarkup interface{} `json:"reply_markup"`
}
type Update struct {
UpdateID int `json:"update_id"`
Message Message `json:"message"`
}
type UpdateResponse struct {
Ok bool `json:"ok"`
Updates []Update `json:"result"`
}
type User struct {
ID int `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.