tdapi

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Ok                  = Err("OK")
	EmptyToken          = Err("EMPTY_TOKEN")
	InvalidToken        = Err("INVALID_TOKEN")
	AccessDenied        = Err("ACCESS_DENIED")
	NotFound            = Err("NOT_FOUND")
	RateLimit           = Err("RATE_LIMIT")
	InternalServerError = Err("INTERNAL_SERVER_ERROR")
	InvalidMethod       = Err("INVALID_METHOD")
	InvalidData         = Err("INVALID_DATA")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Token string             `json:"token,omitempty"`
	Me    tdproto.UserWithMe `json:"me"`
}

type Err

type Err string

func (Err) Error

func (e Err) Error() string

func (Err) StatusCode

func (e Err) StatusCode() int

type Message added in v1.2.8

type Message struct {
	Mediatype  tdproto.Mediatype `json:"type"`
	Text       string            `json:"text"`
	MessageUid string            `json:"message_id,omitempty"`
	MessageUpdate
}

type MessageUpdate added in v1.2.8

type MessageUpdate struct {
	Important bool `json:"important,omitempty"`
	Nopreview bool `json:"nopreview,omitempty"`
}

type Resp

type Resp struct {
	DebugTime string            `json:"_time,omitempty"`
	Ok        bool              `json:"ok"`
	Result    interface{}       `json:"result,omitempty"`
	Error     Err               `json:"error,omitempty"`
	Details   map[string]string `json:"details,omitempty"`
}

type SmsCode

type SmsCode struct {
	Phone          string `json:"phone"`
	CodeValidUntil string `json:"code_valid_until"`
	NextCodeAt     string `json:"next_code_at"`
	CodeLength     int    `json:"code_length"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL