Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot interface {
GetMe() (*GetMeResponse, error)
RawGetRequest(request string) ([]byte, error)
RawPostRequest(request string, body []byte) ([]byte, error)
SendMessage(request *SendMessage) ([]byte, error)
SendPoll(request *SendPoll) ([]byte, error)
GetUpdates(request *GetUpdates) (*GetUpdatesResponse, error)
}
type GetMeResponse ¶
type GetMeResponse struct {
OK bool `json:"ok"`
Result GetMeResult `json:"result"`
}
type GetMeResult ¶
type GetMeResult struct {
ID interface{} `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name"`
Username string `json:"username"`
CanJoinGroups bool `json:"can_join_groups"`
CanReadAllGroupMessages bool `json:"can_read_all_group_messages"`
SupportInlineQueries bool `json:"support_inline_queries"`
}
type GetUpdates ¶ added in v0.1.2
type GetUpdatesResponse ¶ added in v0.2.0
type SendMessage ¶
type SendMessage struct {
ChatID interface{} `json:"chat_id"`
Text string `json:"text"`
}
type SendMessageResponse ¶
type SendMessageResponse struct {
OK bool `json:"ok"`
}
type SendPoll ¶
type SendPoll struct {
ChatID interface{} `json:"chat_id"`
Question string `json:"question"` // Poll question, 1-300 characters
Options []string `json:"options"` // list of answer options, 2-10 strings 1-100 characters each
Type string `json:"type"` // “quiz” or “regular”
CorrectOptionID int `json:"correct_option_id"`
}
type SendPollResponse ¶
type Updates ¶ added in v0.2.1
type Updates interface {
Get() <-chan Update
Close()
}
func NewUpdates ¶ added in v0.2.1
func NewUpdates(params UpdatesParams) Updates
type UpdatesParams ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.