messages

package
v0.0.0-...-5942ca8 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 6 Imported by: 0

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

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

ChannelsSearchPostsQueryBuilder is query builder of ChannelsSearchPosts.

func (*ChannelsSearchPostsQueryBuilder) 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 (*ChannelsSearchPostsQueryBuilder) Collect

Collect creates iterator and collects all elements to slice.

func (*ChannelsSearchPostsQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*ChannelsSearchPostsQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*ChannelsSearchPostsQueryBuilder) Hashtag

Hashtag sets Hashtag field of ChannelsSearchPosts query.

func (*ChannelsSearchPostsQueryBuilder) Iter

Iter returns iterator using built query.

func (*ChannelsSearchPostsQueryBuilder) OffsetID

OffsetID sets offsetID from which iterate start.

func (*ChannelsSearchPostsQueryBuilder) Query

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

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

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

File returns file location if message has a file attachment.

func (Elem) Photo

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

Photo returns photo object if message has a photo attachment.

type File

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

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

GetSavedHistoryQueryBuilder is query builder of MessagesGetSavedHistory.

func (*GetSavedHistoryQueryBuilder) 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 (*GetSavedHistoryQueryBuilder) Collect

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

Collect creates iterator and collects all elements to slice.

func (*GetSavedHistoryQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*GetSavedHistoryQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*GetSavedHistoryQueryBuilder) Iter

Iter returns iterator using built query.

func (*GetSavedHistoryQueryBuilder) OffsetDate

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

OffsetDate sets offsetDate from which iterate start.

func (*GetSavedHistoryQueryBuilder) OffsetID

OffsetID sets offsetID from which iterate start.

func (*GetSavedHistoryQueryBuilder) Peer

Peer sets Peer field of GetSavedHistory query.

func (*GetSavedHistoryQueryBuilder) Query

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

TopMsgID sets TopMsgID field of GetUnreadMentions query.

type GetUnreadReactionsQueryBuilder

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

GetUnreadReactionsQueryBuilder is query builder of MessagesGetUnreadReactions.

func (*GetUnreadReactionsQueryBuilder) 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 (*GetUnreadReactionsQueryBuilder) Collect

Collect creates iterator and collects all elements to slice.

func (*GetUnreadReactionsQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*GetUnreadReactionsQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*GetUnreadReactionsQueryBuilder) Iter

Iter returns iterator using built query.

func (*GetUnreadReactionsQueryBuilder) OffsetID

OffsetID sets offsetID from which iterate start.

func (*GetUnreadReactionsQueryBuilder) Peer

Peer sets Peer field of GetUnreadReactions query.

func (*GetUnreadReactionsQueryBuilder) Query

Query implements Query interface.

func (*GetUnreadReactionsQueryBuilder) TopMsgID

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

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

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

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

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

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

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

SavedPeerID sets SavedPeerID field of Search query.

func (*SearchQueryBuilder) SavedReaction

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

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

SearchSentMediaQueryBuilder is query builder of MessagesSearchSentMedia.

func (*SearchSentMediaQueryBuilder) 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 (*SearchSentMediaQueryBuilder) ChatPhotos

ChatPhotos sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Collect

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

Collect creates iterator and collects all elements to slice.

func (*SearchSentMediaQueryBuilder) Contacts

Contacts sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Count

Count fetches remote state to get number of elements.

func (*SearchSentMediaQueryBuilder) Document

Document sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Filter

Filter sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) ForEach

ForEach calls given callback on each iterator element.

func (*SearchSentMediaQueryBuilder) Geo

Geo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Gif

Gif sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Iter

Iter returns iterator using built query.

func (*SearchSentMediaQueryBuilder) Music

Music sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) MyMentions

MyMentions sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) PhoneCalls

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

PhoneCalls sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) PhotoVideo

PhotoVideo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Photos

Photos sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Pinned

Pinned sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Q

Q sets Q field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Query

Query implements Query interface.

func (*SearchSentMediaQueryBuilder) RoundVideo

RoundVideo sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) RoundVoice

RoundVoice sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) URL

URL sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Video

Video sets Filter field of SearchSentMedia query.

func (*SearchSentMediaQueryBuilder) Voice

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