methods

package
Version: v0.0.0-...-dea42bd Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetMe

type GetMe struct {
}

GetMe - A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.

func (*GetMe) CallMethod

func (method *GetMe) CallMethod(botURL string) tgtype.TGType

CallMethod - executes method returns update Returns User

func (GetMe) GetName

func (method GetMe) GetName() string

GetName - returns the telegram calling name of the method

type GetUpdates

type GetUpdates struct {
	Offset         int64    `json:"offset,omitempty"`
	Limit          int64    `json:"limit,omitempty"`
	Timeout        int64    `json:"timeout,omitempty"`
	AllowedUpdates []string `json:"allowed_udpdates,omitempty"`
}

GetUpdates - Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.

func (*GetUpdates) CallMethod

func (method *GetUpdates) CallMethod(botURL string) tgtype.TGType

CallMethod - executes method returns update Returns Updates

func (GetUpdates) GetName

func (method GetUpdates) GetName() string

GetName - returns the telegram calling name of the method

type Method

type Method interface {
	GetName() string
	CallMethod(botURL string) tgtype.TGType
}

Method a telegram method

type MethodResponse

type MethodResponse struct {
	OK          bool            `json:"ok"`
	Result      json.RawMessage `json:"result,omitempty"`
	ErrorCode   int             `json:"error_code,omitempty"`
	Description string          `json:"descriptopm,omitempty"`
}

MethodResponse - struct returned by all the methods

type SendMessage

type SendMessage struct {
	ChatID                interface{} `json:"chat_id"`
	Text                  string      `json:"text"`
	ParseMode             string      `json:"parse_mode,omitempty"`
	DisableWebPagePreview bool        `json:"disable_web_page_preview,omitempty"`
	DisableNotification   bool        `json:"disable_notification,omitempty"`
	ReplyToMessageID      int64       `json:"reply_to_message_id,omitempty"`
}

SendMessage - A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.

func (*SendMessage) CallMethod

func (method *SendMessage) CallMethod(botURL string) tgtype.TGType

CallMethod - executes method returns update Returns Message

func (SendMessage) GetName

func (method SendMessage) GetName() string

GetName - returns the telegram calling name of the method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL