docs

# Companion

object Companion : KtorPipelineStepsHolder
Content copied to clipboard

## Functions

onAfterCallFactoryMakeCall
Link copied to clipboard
open suspend fun < T : Any > onAfterCallFactoryMakeCall ( result: T ?, request: Request < T >, potentialFactory: KtorCallFactory ): T ?
Content copied to clipboard

Will always be called after potentialFactory has tried to make request and got some result. If returns value - that value will be returned from dev.inmo.tgbotapi.bot.RequestsExecutor.execute instead

onBeforeCallFactoryMakeCall
Link copied to clipboard
open suspend fun onBeforeCallFactoryMakeCall (request: Request <*>, potentialFactory: KtorCallFactory )
Content copied to clipboard

Will always be called before potentialFactory will try to make request

onBeforeSearchCallFactory
Link copied to clipboard
open suspend fun onBeforeSearchCallFactory (request: Request <*>, callsFactories: List < KtorCallFactory >)
Content copied to clipboard

Will always be called before requests executor will check all callsFactories for an opportunity to make call of request

onRequestException
Link copied to clipboard
open suspend fun < T : Any > onRequestException (request: Request < T >, t: Throwable ): T ?
Content copied to clipboard

Will be called when any exception will happen due to the request handling. If returns value - that value will be returned from dev.inmo.tgbotapi.bot.RequestsExecutor.execute instead

onRequestResultAbsent
Link copied to clipboard
open suspend fun < T : Any > onRequestResultAbsent (request: Request < T >, callsFactories: List < KtorCallFactory >): T ?
Content copied to clipboard

Will be called when there is no KtorCallFactory from callsFactories which may handle request. If returns value - that value will be returned from dev.inmo.tgbotapi.bot.RequestsExecutor.execute instead

onRequestResultPresented
Link copied to clipboard
open suspend fun < T : Any > onRequestResultPresented ( result: T , request: Request < T >, resultCallFactory: KtorCallFactory , callsFactories: List < KtorCallFactory >): T ?
Content copied to clipboard

Will be called when resultCallFactory is the KtorCallFactory from callsFactories which has successfully handled request and returned result. If returns value - that value will be returned from dev.inmo.tgbotapi.bot.RequestsExecutor.execute instead

onRequestReturnResult
Link copied to clipboard
open suspend fun < T : Any > onRequestReturnResult ( result: Result < T >, request: Request < T >, callsFactories: List < KtorCallFactory >): T
Content copied to clipboard

This step will be called when the result has been retrieved (or exception has happened). If returns value - that value will be returned from dev.inmo.tgbotapi.bot.RequestsExecutor.execute instead