messages

package
v0.112.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 6 Imported by: 7

Documentation

Overview

Package messages contains message iteration helper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelsSearchPostsQueryBuilder added in v0.103.0

type ChannelsSearchPostsQueryBuilder struct {
	// contains filtered or unexported fields
}

ChannelsSearchPostsQueryBuilder is query builder of ChannelsSearchPosts.

func (*ChannelsSearchPostsQueryBuilder) BatchSize added in v0.103.0

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*ChannelsSearchPostsQueryBuilder) Collect added in v0.103.0

Collect creates iterator and collects all elements to slice.

func (*ChannelsSearchPostsQueryBuilder) Count added in v0.103.0

Count fetches remote state to get number of elements.

func (*ChannelsSearchPostsQueryBuilder) ForEach added in v0.103.0

ForEach calls given callback on each iterator element.

func (*ChannelsSearchPostsQueryBuilder) Hashtag added in v0.103.0

Hashtag sets Hashtag field of ChannelsSearchPosts query.

func (*ChannelsSearchPostsQueryBuilder) Iter added in v0.103.0

Iter returns iterator using built query.

func (*ChannelsSearchPostsQueryBuilder) OffsetID added in v0.103.0

OffsetID sets offsetID from which iterate start.

func (*ChannelsSearchPostsQueryBuilder) Query added in v0.103.0

Query implements Query interface.

type Elem

type Elem struct {
	Msg      tg.NotEmptyMessage
	Peer     tg.InputPeerClass
	Entities peer.Entities
}

Elem is a message iterator element.

func (Elem) Document added in v0.33.0

func (e Elem) Document() (*tg.Document, bool)

Document returns document object if message has a document attachment (video, voice, audio, basically every type except photo).

func (Elem) File added in v0.33.0

func (e Elem) File() (File, bool)

File returns file location if message has a file attachment.

func (Elem) Photo added in v0.33.0

func (e Elem) Photo() (*tg.Photo, bool)

Photo returns photo object if message has a photo attachment.

type File added in v0.33.0

type File struct {
	Name     string
	MIMEType string
	Location tg.InputFileLocationClass
}

File represents file attachment.

type GetHistoryQueryBuilder

type GetHistoryQueryBuilder struct {
	// contains filtered or unexported fields
}

GetHistoryQueryBuilder is query builder of MessagesGetHistory.

func (*GetHistoryQueryBuilder) BatchSize

func (b *GetHistoryQueryBuilder) BatchSize(batchSize int) *GetHistoryQueryBuilder

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetHistoryQueryBuilder) Collect

func (b *GetHistoryQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*GetHistoryQueryBuilder) Count

func (b *GetHistoryQueryBuilder) Count(ctx context.Context) (int, error)

Count fetches remote state to get number of elements.

func (*GetHistoryQueryBuilder) ForEach

func (b *GetHistoryQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error

ForEach calls given callback on each iterator element.

func (*GetHistoryQueryBuilder) Iter

func (b *GetHistoryQueryBuilder) Iter() *Iterator

Iter returns iterator using built query.

func (*GetHistoryQueryBuilder) OffsetDate

func (b *GetHistoryQueryBuilder) OffsetDate(offsetDate int) *GetHistoryQueryBuilder

OffsetDate sets offsetDate from which iterate start.

func (*GetHistoryQueryBuilder) OffsetID

func (b *GetHistoryQueryBuilder) OffsetID(offsetID int) *GetHistoryQueryBuilder

OffsetID sets offsetID from which iterate start.

func (*GetHistoryQueryBuilder) Peer

Peer sets Peer field of GetHistory query.

func (*GetHistoryQueryBuilder) Query

Query implements Query interface.

type GetRecentLocationsQueryBuilder

type GetRecentLocationsQueryBuilder struct {
	// contains filtered or unexported fields
}

GetRecentLocationsQueryBuilder is query builder of MessagesGetRecentLocations.

func (*GetRecentLocationsQueryBuilder) BatchSize

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetRecentLocationsQueryBuilder) Collect

Collect creates iterator and collects all elements to slice.

func (*GetRecentLocationsQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*GetRecentLocationsQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*GetRecentLocationsQueryBuilder) Iter

Iter returns iterator using built query.

func (*GetRecentLocationsQueryBuilder) Peer

Peer sets Peer field of GetRecentLocations query.

func (*GetRecentLocationsQueryBuilder) Query

Query implements Query interface.

type GetRepliesQueryBuilder

type GetRepliesQueryBuilder struct {
	// contains filtered or unexported fields
}

GetRepliesQueryBuilder is query builder of MessagesGetReplies.

func (*GetRepliesQueryBuilder) BatchSize

func (b *GetRepliesQueryBuilder) BatchSize(batchSize int) *GetRepliesQueryBuilder

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetRepliesQueryBuilder) Collect

func (b *GetRepliesQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*GetRepliesQueryBuilder) Count

func (b *GetRepliesQueryBuilder) Count(ctx context.Context) (int, error)

Count fetches remote state to get number of elements.

func (*GetRepliesQueryBuilder) ForEach

func (b *GetRepliesQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error

ForEach calls given callback on each iterator element.

func (*GetRepliesQueryBuilder) Iter

func (b *GetRepliesQueryBuilder) Iter() *Iterator

Iter returns iterator using built query.

func (*GetRepliesQueryBuilder) MsgID

func (b *GetRepliesQueryBuilder) MsgID(paramMsgID int) *GetRepliesQueryBuilder

MsgID sets MsgID field of GetReplies query.

func (*GetRepliesQueryBuilder) OffsetDate

func (b *GetRepliesQueryBuilder) OffsetDate(offsetDate int) *GetRepliesQueryBuilder

OffsetDate sets offsetDate from which iterate start.

func (*GetRepliesQueryBuilder) OffsetID

func (b *GetRepliesQueryBuilder) OffsetID(offsetID int) *GetRepliesQueryBuilder

OffsetID sets offsetID from which iterate start.

func (*GetRepliesQueryBuilder) Peer

Peer sets Peer field of GetReplies query.

func (*GetRepliesQueryBuilder) Query

Query implements Query interface.

type GetSavedHistoryQueryBuilder added in v0.93.0

type GetSavedHistoryQueryBuilder struct {
	// contains filtered or unexported fields
}

GetSavedHistoryQueryBuilder is query builder of MessagesGetSavedHistory.

func (*GetSavedHistoryQueryBuilder) BatchSize added in v0.93.0

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetSavedHistoryQueryBuilder) Collect added in v0.93.0

func (b *GetSavedHistoryQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*GetSavedHistoryQueryBuilder) Count added in v0.93.0

Count fetches remote state to get number of elements.

func (*GetSavedHistoryQueryBuilder) ForEach added in v0.93.0

ForEach calls given callback on each iterator element.

func (*GetSavedHistoryQueryBuilder) Iter added in v0.93.0

Iter returns iterator using built query.

func (*GetSavedHistoryQueryBuilder) OffsetDate added in v0.93.0

func (b *GetSavedHistoryQueryBuilder) OffsetDate(offsetDate int) *GetSavedHistoryQueryBuilder

OffsetDate sets offsetDate from which iterate start.

func (*GetSavedHistoryQueryBuilder) OffsetID added in v0.93.0

OffsetID sets offsetID from which iterate start.

func (*GetSavedHistoryQueryBuilder) Peer added in v0.93.0

Peer sets Peer field of GetSavedHistory query.

func (*GetSavedHistoryQueryBuilder) Query added in v0.93.0

Query implements Query interface.

type GetUnreadMentionsQueryBuilder

type GetUnreadMentionsQueryBuilder struct {
	// contains filtered or unexported fields
}

GetUnreadMentionsQueryBuilder is query builder of MessagesGetUnreadMentions.

func (*GetUnreadMentionsQueryBuilder) BatchSize

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetUnreadMentionsQueryBuilder) Collect

Collect creates iterator and collects all elements to slice.

func (*GetUnreadMentionsQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*GetUnreadMentionsQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*GetUnreadMentionsQueryBuilder) Iter

Iter returns iterator using built query.

func (*GetUnreadMentionsQueryBuilder) OffsetID

OffsetID sets offsetID from which iterate start.

func (*GetUnreadMentionsQueryBuilder) Peer

Peer sets Peer field of GetUnreadMentions query.

func (*GetUnreadMentionsQueryBuilder) Query

Query implements Query interface.

func (*GetUnreadMentionsQueryBuilder) TopMsgID added in v0.71.0

TopMsgID sets TopMsgID field of GetUnreadMentions query.

type GetUnreadReactionsQueryBuilder added in v0.56.0

type GetUnreadReactionsQueryBuilder struct {
	// contains filtered or unexported fields
}

GetUnreadReactionsQueryBuilder is query builder of MessagesGetUnreadReactions.

func (*GetUnreadReactionsQueryBuilder) BatchSize added in v0.56.0

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*GetUnreadReactionsQueryBuilder) Collect added in v0.56.0

Collect creates iterator and collects all elements to slice.

func (*GetUnreadReactionsQueryBuilder) Count added in v0.56.0

Count fetches remote state to get number of elements.

func (*GetUnreadReactionsQueryBuilder) ForEach added in v0.56.0

ForEach calls given callback on each iterator element.

func (*GetUnreadReactionsQueryBuilder) Iter added in v0.56.0

Iter returns iterator using built query.

func (*GetUnreadReactionsQueryBuilder) OffsetID added in v0.56.0

OffsetID sets offsetID from which iterate start.

func (*GetUnreadReactionsQueryBuilder) Peer added in v0.56.0

Peer sets Peer field of GetUnreadReactions query.

func (*GetUnreadReactionsQueryBuilder) Query added in v0.56.0

Query implements Query interface.

func (*GetUnreadReactionsQueryBuilder) TopMsgID added in v0.71.0

TopMsgID sets TopMsgID field of GetUnreadReactions query.

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

Iterator is a message stream iterator.

func NewIterator

func NewIterator(query Query, limit int) *Iterator

NewIterator creates new iterator.

func (*Iterator) Err

func (m *Iterator) Err() error

Err returns the error, if any, that was encountered during iteration.

func (*Iterator) FetchTotal

func (m *Iterator) FetchTotal(ctx context.Context) (int, error)

FetchTotal fetches and returns count of elements.

func (*Iterator) Next

func (m *Iterator) Next(ctx context.Context) bool

Next prepares the next message for reading with the Value method. It returns true on success, or false if there is no next message or an error happened while preparing it. Err should be consulted to distinguish between the two cases.

func (*Iterator) OffsetDate

func (m *Iterator) OffsetDate(offsetDate int) *Iterator

OffsetDate sets OffsetDate request parameter.

func (*Iterator) OffsetID

func (m *Iterator) OffsetID(offsetID int) *Iterator

OffsetID sets OffsetID request parameter.

func (*Iterator) OffsetPeer

func (m *Iterator) OffsetPeer(offsetPeer tg.InputPeerClass) *Iterator

OffsetPeer sets OffsetPeer request parameter.

func (*Iterator) OffsetRate

func (m *Iterator) OffsetRate(offsetRate int) *Iterator

OffsetRate sets OffsetRate request parameter.

func (*Iterator) Total

func (m *Iterator) Total(ctx context.Context) (int, error)

Total returns last fetched count of elements. If count was not fetched before, it requests server using FetchTotal.

func (*Iterator) Value

func (m *Iterator) Value() Elem

Value returns current message.

type Query

type Query interface {
	Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
}

Query is an abstraction for messages request. NB: iterator mutates returned data (sorts, at least).

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

QueryBuilder is a helper to create message queries.

func NewQueryBuilder

func NewQueryBuilder(raw *tg.Client) *QueryBuilder

NewQueryBuilder creates new QueryBuilder.

func (*QueryBuilder) ChannelsSearchPosts added in v0.103.0

func (q *QueryBuilder) ChannelsSearchPosts() *ChannelsSearchPostsQueryBuilder

ChannelsSearchPosts creates query builder of ChannelsSearchPosts.

func (*QueryBuilder) GetHistory

func (q *QueryBuilder) GetHistory(paramPeer tg.InputPeerClass) *GetHistoryQueryBuilder

GetHistory creates query builder of MessagesGetHistory.

func (*QueryBuilder) GetRecentLocations

func (q *QueryBuilder) GetRecentLocations(paramPeer tg.InputPeerClass) *GetRecentLocationsQueryBuilder

GetRecentLocations creates query builder of MessagesGetRecentLocations.

func (*QueryBuilder) GetReplies

func (q *QueryBuilder) GetReplies(paramPeer tg.InputPeerClass) *GetRepliesQueryBuilder

GetReplies creates query builder of MessagesGetReplies.

func (*QueryBuilder) GetSavedHistory added in v0.93.0

func (q *QueryBuilder) GetSavedHistory(paramPeer tg.InputPeerClass) *GetSavedHistoryQueryBuilder

GetSavedHistory creates query builder of MessagesGetSavedHistory.

func (*QueryBuilder) GetUnreadMentions

func (q *QueryBuilder) GetUnreadMentions(paramPeer tg.InputPeerClass) *GetUnreadMentionsQueryBuilder

GetUnreadMentions creates query builder of MessagesGetUnreadMentions.

func (*QueryBuilder) GetUnreadReactions added in v0.56.0

func (q *QueryBuilder) GetUnreadReactions(paramPeer tg.InputPeerClass) *GetUnreadReactionsQueryBuilder

GetUnreadReactions creates query builder of MessagesGetUnreadReactions.

func (*QueryBuilder) Search

func (q *QueryBuilder) Search(paramPeer tg.InputPeerClass) *SearchQueryBuilder

Search creates query builder of MessagesSearch.

func (*QueryBuilder) SearchGlobal

func (q *QueryBuilder) SearchGlobal() *SearchGlobalQueryBuilder

SearchGlobal creates query builder of MessagesSearchGlobal.

func (*QueryBuilder) SearchSentMedia added in v0.56.0

func (q *QueryBuilder) SearchSentMedia() *SearchSentMediaQueryBuilder

SearchSentMedia creates query builder of MessagesSearchSentMedia.

type QueryFunc

type QueryFunc func(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)

QueryFunc is a function adapter for Query.

func (QueryFunc) Query

Query implements Query interface.

type Request

type Request struct {
	AddOffset  int
	OffsetDate int
	OffsetID   int
	OffsetPeer tg.InputPeerClass
	OffsetRate int
	Limit      int
}

Request is a parameter for Query.

type SearchGlobalQueryBuilder

type SearchGlobalQueryBuilder struct {
	// contains filtered or unexported fields
}

SearchGlobalQueryBuilder is query builder of MessagesSearchGlobal.

func (*SearchGlobalQueryBuilder) BatchSize

func (b *SearchGlobalQueryBuilder) BatchSize(batchSize int) *SearchGlobalQueryBuilder

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*SearchGlobalQueryBuilder) BroadcastsOnly added in v0.100.0

func (b *SearchGlobalQueryBuilder) BroadcastsOnly(paramBroadcastsOnly bool) *SearchGlobalQueryBuilder

BroadcastsOnly sets BroadcastsOnly field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) ChatPhotos

ChatPhotos sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Collect

func (b *SearchGlobalQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*SearchGlobalQueryBuilder) Contacts

Contacts sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*SearchGlobalQueryBuilder) Document

Document sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Filter

Filter sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) FolderID

func (b *SearchGlobalQueryBuilder) FolderID(paramFolderID int) *SearchGlobalQueryBuilder

FolderID sets FolderID field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*SearchGlobalQueryBuilder) Geo

Geo sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Gif

Gif sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Iter

Iter returns iterator using built query.

func (*SearchGlobalQueryBuilder) MaxDate

func (b *SearchGlobalQueryBuilder) MaxDate(paramMaxDate int) *SearchGlobalQueryBuilder

MaxDate sets MaxDate field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) MinDate

func (b *SearchGlobalQueryBuilder) MinDate(paramMinDate int) *SearchGlobalQueryBuilder

MinDate sets MinDate field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Music

Music sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) MyMentions

MyMentions sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) OffsetID

func (b *SearchGlobalQueryBuilder) OffsetID(offsetID int) *SearchGlobalQueryBuilder

OffsetID sets offsetID from which iterate start.

func (*SearchGlobalQueryBuilder) PhoneCalls

func (b *SearchGlobalQueryBuilder) PhoneCalls(paramMissed bool) *SearchGlobalQueryBuilder

PhoneCalls sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) PhotoVideo

PhotoVideo sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Photos

Photos sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Pinned

Pinned sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Q

Q sets Q field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Query

Query implements Query interface.

func (*SearchGlobalQueryBuilder) RoundVideo

RoundVideo sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) RoundVoice

RoundVoice sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) URL

URL sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Video

Video sets Filter field of SearchGlobal query.

func (*SearchGlobalQueryBuilder) Voice

Voice sets Filter field of SearchGlobal query.

type SearchQueryBuilder

type SearchQueryBuilder struct {
	// contains filtered or unexported fields
}

SearchQueryBuilder is query builder of MessagesSearch.

func (*SearchQueryBuilder) BatchSize

func (b *SearchQueryBuilder) BatchSize(batchSize int) *SearchQueryBuilder

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*SearchQueryBuilder) ChatPhotos

func (b *SearchQueryBuilder) ChatPhotos() *SearchQueryBuilder

ChatPhotos sets Filter field of Search query.

func (*SearchQueryBuilder) Collect

func (b *SearchQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*SearchQueryBuilder) Contacts

func (b *SearchQueryBuilder) Contacts() *SearchQueryBuilder

Contacts sets Filter field of Search query.

func (*SearchQueryBuilder) Count

func (b *SearchQueryBuilder) Count(ctx context.Context) (int, error)

Count fetches remote state to get number of elements.

func (*SearchQueryBuilder) Document

func (b *SearchQueryBuilder) Document() *SearchQueryBuilder

Document sets Filter field of Search query.

func (*SearchQueryBuilder) Filter

Filter sets Filter field of Search query.

func (*SearchQueryBuilder) ForEach

func (b *SearchQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error

ForEach calls given callback on each iterator element.

func (*SearchQueryBuilder) FromID

func (b *SearchQueryBuilder) FromID(paramFromID tg.InputPeerClass) *SearchQueryBuilder

FromID sets FromID field of Search query.

func (*SearchQueryBuilder) Geo

Geo sets Filter field of Search query.

func (*SearchQueryBuilder) Gif

Gif sets Filter field of Search query.

func (*SearchQueryBuilder) Iter

func (b *SearchQueryBuilder) Iter() *Iterator

Iter returns iterator using built query.

func (*SearchQueryBuilder) MaxDate

func (b *SearchQueryBuilder) MaxDate(paramMaxDate int) *SearchQueryBuilder

MaxDate sets MaxDate field of Search query.

func (*SearchQueryBuilder) MinDate

func (b *SearchQueryBuilder) MinDate(paramMinDate int) *SearchQueryBuilder

MinDate sets MinDate field of Search query.

func (*SearchQueryBuilder) Music

Music sets Filter field of Search query.

func (*SearchQueryBuilder) MyMentions

func (b *SearchQueryBuilder) MyMentions() *SearchQueryBuilder

MyMentions sets Filter field of Search query.

func (*SearchQueryBuilder) OffsetID

func (b *SearchQueryBuilder) OffsetID(offsetID int) *SearchQueryBuilder

OffsetID sets offsetID from which iterate start.

func (*SearchQueryBuilder) Peer

Peer sets Peer field of Search query.

func (*SearchQueryBuilder) PhoneCalls

func (b *SearchQueryBuilder) PhoneCalls(paramMissed bool) *SearchQueryBuilder

PhoneCalls sets Filter field of Search query.

func (*SearchQueryBuilder) PhotoVideo

func (b *SearchQueryBuilder) PhotoVideo() *SearchQueryBuilder

PhotoVideo sets Filter field of Search query.

func (*SearchQueryBuilder) Photos

Photos sets Filter field of Search query.

func (*SearchQueryBuilder) Pinned

Pinned sets Filter field of Search query.

func (*SearchQueryBuilder) Q

Q sets Q field of Search query.

func (*SearchQueryBuilder) Query

Query implements Query interface.

func (*SearchQueryBuilder) RoundVideo

func (b *SearchQueryBuilder) RoundVideo() *SearchQueryBuilder

RoundVideo sets Filter field of Search query.

func (*SearchQueryBuilder) RoundVoice

func (b *SearchQueryBuilder) RoundVoice() *SearchQueryBuilder

RoundVoice sets Filter field of Search query.

func (*SearchQueryBuilder) SavedPeerID added in v0.93.0

func (b *SearchQueryBuilder) SavedPeerID(paramSavedPeerID tg.InputPeerClass) *SearchQueryBuilder

SavedPeerID sets SavedPeerID field of Search query.

func (*SearchQueryBuilder) SavedReaction added in v0.94.0

func (b *SearchQueryBuilder) SavedReaction(paramSavedReaction []tg.ReactionClass) *SearchQueryBuilder

SavedReaction sets SavedReaction field of Search query.

func (*SearchQueryBuilder) TopMsgID

func (b *SearchQueryBuilder) TopMsgID(paramTopMsgID int) *SearchQueryBuilder

TopMsgID sets TopMsgID field of Search query.

func (*SearchQueryBuilder) URL

URL sets Filter field of Search query.

func (*SearchQueryBuilder) Video

Video sets Filter field of Search query.

func (*SearchQueryBuilder) Voice

Voice sets Filter field of Search query.

type SearchSentMediaQueryBuilder added in v0.56.0

type SearchSentMediaQueryBuilder struct {
	// contains filtered or unexported fields
}

SearchSentMediaQueryBuilder is query builder of MessagesSearchSentMedia.

func (*SearchSentMediaQueryBuilder) BatchSize added in v0.56.0

BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.

func (*SearchSentMediaQueryBuilder) ChatPhotos added in v0.56.0

ChatPhotos sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Collect added in v0.56.0

func (b *SearchSentMediaQueryBuilder) Collect(ctx context.Context) ([]Elem, error)

Collect creates iterator and collects all elements to slice.

func (*SearchSentMediaQueryBuilder) Contacts added in v0.56.0

Contacts sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Count added in v0.56.0

Count fetches remote state to get number of elements.

func (*SearchSentMediaQueryBuilder) Document added in v0.56.0

Document sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Filter added in v0.56.0

Filter sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) ForEach added in v0.56.0

ForEach calls given callback on each iterator element.

func (*SearchSentMediaQueryBuilder) Geo added in v0.56.0

Geo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Gif added in v0.56.0

Gif sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Iter added in v0.56.0

Iter returns iterator using built query.

func (*SearchSentMediaQueryBuilder) Music added in v0.56.0

Music sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) MyMentions added in v0.56.0

MyMentions sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) PhoneCalls added in v0.56.0

func (b *SearchSentMediaQueryBuilder) PhoneCalls(paramMissed bool) *SearchSentMediaQueryBuilder

PhoneCalls sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) PhotoVideo added in v0.56.0

PhotoVideo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Photos added in v0.56.0

Photos sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Pinned added in v0.56.0

Pinned sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Q added in v0.56.0

Q sets Q field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Query added in v0.56.0

Query implements Query interface.

func (*SearchSentMediaQueryBuilder) RoundVideo added in v0.56.0

RoundVideo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) RoundVoice added in v0.56.0

RoundVoice sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) URL added in v0.56.0

URL sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Video added in v0.56.0

Video sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Voice added in v0.56.0

Voice sets Filter field of SearchSentMedia query.

Directories

Path Synopsis
stickers
featured
Package featured contains featured stickers iteration helper.
Package featured contains featured stickers iteration helper.

Jump to

Keyboard shortcuts

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