invoke

@JvmName(name = "createByUrlsKeepers")
inline operator fun invoke(    keepers: Iterable<TelegramAPIUrlsKeeper>,     crossinline builder: KtorRequestsExecutorBuilder.(TelegramAPIUrlsKeeper) -> Unit = {},     noinline botSelector: suspend List<TelegramBot>.(currentBotIndex: Int, t: Throwable?) -> TelegramBot = { i, _ -> getOrElse(i + 1) { first() } },     noinline onClose: (List<TelegramBot>) -> Unit? = null): SimpleMultiServerRequestsExecutor

Parameters

keepers

Will be used to create result bots

builder

Will be called with each item from keepers in process of bots creation

botSelector

It is strategy by which the bot is selected for the execution. This lambda will receive -1 when request execution just started and this call is first in context of one execute. By default, will select next TelegramBot when called (or first when current index is last or -1)

onClose

This method will be called inside of close method. By default, will close all bots


@JvmName(name = "createByTokens")
inline operator fun invoke(    tokens: Iterable<String>,     crossinline builder: KtorRequestsExecutorBuilder.(String) -> Unit = {},     noinline botSelector: suspend List<TelegramBot>.(currentBotIndex: Int, t: Throwable?) -> TelegramBot = { i, _ -> getOrElse(i + 1) { first() } },     noinline onClose: (List<TelegramBot>) -> Unit? = null): SimpleMultiServerRequestsExecutor

Parameters

tokens

Will be used to create result bots

builder

Will be called with each item from tokens in process of bots creation

botSelector

It is strategy by which the bot is selected for the execution. This lambda will receive -1 when request execution just started and this call is first in context of one execute. By default, will select next TelegramBot when called (or first when current index is last or -1)

onClose

This method will be called inside of close method. By default, will close all bots


@JvmName(name = "createByTokensAndApiUrls")
inline operator fun invoke(    tokens: Iterable<Pair<String, String>>,     crossinline builder: KtorRequestsExecutorBuilder.(Pair<String, String>) -> Unit = {},     noinline botSelector: suspend List<TelegramBot>.(currentBotIndex: Int, t: Throwable?) -> TelegramBot = { i, _ -> getOrElse(i + 1) { first() } },     noinline onClose: (List<TelegramBot>) -> Unit? = null): SimpleMultiServerRequestsExecutor

Parameters

tokens

Pairs with first parameter as a token and second parameter api url. Will be used to create result bots

builder

Will be called with each item from tokens in process of bots creation

botSelector

It is strategy by which the bot is selected for the execution. This lambda will receive -1 when request execution just started and this call is first in context of one execute. By default, will select next TelegramBot when called (or first when current index is last or -1)

onClose

This method will be called inside of close method. By default, will close all bots