tdapi

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Ok                  = Err("OK")
	EmptyToken          = Err("EMPTY_TOKEN")
	EmptySession        = Err("EMPTY_SESSION")
	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 ClientCallLeave added in v1.4.0

type ClientCallLeave struct {
	Jid                 tdproto.JID `json:"jid"`
	Reason              string      `json:"reason"`
	LeaveWithoutClosing bool        `json:"test_not_in_room,omitempty"`
}

type ClientCallMuteAll added in v1.4.0

type ClientCallMuteAll struct {
	Jid tdproto.JID `json:"jid"`
}

type ClientCallRecord added in v1.4.0

type ClientCallRecord struct {
	Jid         tdproto.JID `json:"jid"`
	Uid         string      `json:"uid"`
	Audiorecord bool        `json:"audiorecord,omitempty"`
}

type ClientCallReject added in v1.4.0

type ClientCallReject struct {
	Jid    tdproto.JID `json:"jid"`
	Reason string      `json:"reason"`
}

type ClientCallSound added in v1.4.0

type ClientCallSound struct {
	Jid   tdproto.JID `json:"jid"`
	Muted bool        `json:"muted"`
}

type ClientCallTrickle added in v1.4.0

type ClientCallTrickle struct {
	Jid           tdproto.JID `json:"jid"`
	Candidate     string      `json:"candidate"`
	SdpMid        string      `json:"sdp_mid"`
	SdpMlineIndex int         `json:"sdp_mline_index"`
}

type Err

type Err string

func (Err) Error

func (e Err) Error() string

func (Err) StatusCode

func (e Err) StatusCode() int

type Group added in v1.11.1

type Group struct {
	// Group title
	DisplayName string `json:"display_name"`

	// Group description, optiopnal
	Description string `json:"description"`

	// Readonly for non-admins group chat (Like Channels in Telegram bug switchable)
	ReadonlyForMembers bool `json:"readonly_for_members"`

	// Can other team member see this group
	Public bool `json:"public"`

	// Any new team member will be added to this group chat
	DefaultForAll bool `json:"default_for_all"`

	// Delete messages in this chat in seconds. Experemental function
	AutocleanupAge *int `json:"autocleanup_age"`

	// Pinned message for this group
	PinnedMessage string `json:"pinned_message"`

	// Group members list
	Members []GroupMember `json:"members"`

	// Deprecated
	Section string `json:"section"`
}

type GroupMember added in v1.11.1

type GroupMember struct {
	// Member jid
	Jid tdproto.JID `json:"jid"`

	// Status: member or admin
	Status tdproto.GroupStatus `json:"status,omitempty"`
}

type Message added in v1.2.8

type Message struct {
	// Message type
	Type tdproto.Mediatype `json:"type"`

	// Message text
	Text string `json:"text"`

	// Message id
	MessageUid string `json:"message_id,omitempty"`

	// Message attachments
	Uploads []string `json:"uploads,omitempty"`

	// Backward compatibility mode
	OldStyleAttachment bool `json:"old_style_attachment,omitempty"`

	MessageUpdate
}

type MessageUpdate added in v1.2.8

type MessageUpdate struct {
	// Important flag. Not required. Default: false
	Important bool `json:"important,omitempty"`

	// Disable links preview generation. Not required. Default: false
	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"`
}

type Task added in v1.3.1

type Task struct {
	CustomColorIndex *uint16          `json:"custom_color_index,omitempty"`
	Description      string           `json:"description,omitempty"`
	Tags             []string         `json:"tags,omitempty"`
	SectionUid       string           `json:"section,omitempty"`
	Observers        []tdproto.JID    `json:"observers,omitempty"`
	Items            []string         `json:"items,omitempty"`
	Assignee         tdproto.JID      `json:"assignee,omitempty"`
	Deadline         string           `json:"deadline,omitempty"`
	Public           bool             `json:"public,omitempty"`
	RemindAt         string           `json:"remind_at,omitempty"`
	TaskStatus       string           `json:"task_status,omitempty"`
	Importance       *int             `json:"importance,omitempty"`
	Urgency          *int             `json:"urgency,omitempty"`
	Complexity       *int             `json:"complexity,omitempty"`
	SpentTime        *int             `json:"spent_time,omitempty"`
	LinkedMessages   []string         `json:"linked_messages,omitempty"` // TODO: Message object
	Uploads          []tdproto.Upload `json:"uploads,omitempty"`
}

Jump to

Keyboard shortcuts

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