Documentation ¶
Overview ¶
Package tamtam implements TamTam Bot API. Official documentation: https://dev.tamtam.chat/
Index ¶
- type Api
- type Keyboard
- type KeyboardRow
- func (k *KeyboardRow) AddCallback(text string, intent schemes.Intent, payload string) *KeyboardRow
- func (k *KeyboardRow) AddContact(text string) *KeyboardRow
- func (k *KeyboardRow) AddGeolocation(text string, quick bool) *KeyboardRow
- func (k *KeyboardRow) AddLink(text string, intent schemes.Intent, url string) *KeyboardRow
- func (k *KeyboardRow) Build() []schemes.ButtonInterface
- type Message
- func (m *Message) AddAudio(audio *schemes.UploadedInfo) *Message
- func (m *Message) AddContact(name string, contactID int64, vcfInfo string, vcfPhone string) *Message
- func (m *Message) AddFile(file *schemes.UploadedInfo) *Message
- func (m *Message) AddKeyboard(keyboard *Keyboard) *Message
- func (m *Message) AddLocation(lat float64, lon float64) *Message
- func (m *Message) AddPhoto(photo *schemes.PhotoTokens) *Message
- func (m *Message) AddSticker(code string) *Message
- func (m *Message) AddVideo(video *schemes.UploadedInfo) *Message
- func (m *Message) SetChat(chatID int64) *Message
- func (m *Message) SetNotify(notify bool) *Message
- func (m *Message) SetText(text string) *Message
- func (m *Message) SetUser(userID int64) *Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { Bots *bots Chats *chats Messages *messages Subscriptions *subscriptions Uploads *uploads // contains filtered or unexported fields }
Api implements main part of TamTam API
func (*Api) GetHandler ¶
func (a *Api) GetHandler(updates chan interface{}) http.HandlerFunc
GetHandler returns http handler for webhooks
func (*Api) GetUpdates ¶ added in v0.1.8
func (a *Api) GetUpdates(ctx context.Context) chan schemes.UpdateInterface
GetUpdates returns updates channel
type Keyboard ¶
type Keyboard struct {
// contains filtered or unexported fields
}
Keyboard implements builder for inline keyboard
func (*Keyboard) AddRow ¶ added in v0.3.0
func (k *Keyboard) AddRow() *KeyboardRow
AddRow adds row to inline keyboard
type KeyboardRow ¶
type KeyboardRow struct {
// contains filtered or unexported fields
}
KeyboardRow represents buttons row
func (*KeyboardRow) AddCallback ¶
func (k *KeyboardRow) AddCallback(text string, intent schemes.Intent, payload string) *KeyboardRow
AddCallback button
func (*KeyboardRow) AddContact ¶
func (k *KeyboardRow) AddContact(text string) *KeyboardRow
AddContact button
func (*KeyboardRow) AddGeolocation ¶
func (k *KeyboardRow) AddGeolocation(text string, quick bool) *KeyboardRow
AddGeolocation button
func (*KeyboardRow) AddLink ¶
func (k *KeyboardRow) AddLink(text string, intent schemes.Intent, url string) *KeyboardRow
AddLink button
func (*KeyboardRow) Build ¶
func (k *KeyboardRow) Build() []schemes.ButtonInterface
Build returns result keyboard row
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶ added in v0.3.0
func NewMessage() *Message
func (*Message) AddAudio ¶ added in v0.3.0
func (m *Message) AddAudio(audio *schemes.UploadedInfo) *Message
func (*Message) AddContact ¶ added in v0.3.0
func (*Message) AddFile ¶ added in v0.3.0
func (m *Message) AddFile(file *schemes.UploadedInfo) *Message
func (*Message) AddKeyboard ¶ added in v0.3.0
func (*Message) AddLocation ¶ added in v0.3.0
func (*Message) AddPhoto ¶ added in v0.3.0
func (m *Message) AddPhoto(photo *schemes.PhotoTokens) *Message
func (*Message) AddSticker ¶ added in v0.3.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.