1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-26 11:38:09 +00:00
tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/DefaultRequestsExecutor.kt
2018-12-26 16:21:52 +08:00

16 lines
503 B
Kotlin

package com.github.insanusmokrassar.TelegramBotAPI.bot
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
import java.util.concurrent.Executors
abstract class BaseRequestsExecutor(
token: String,
hostUrl: String = "https://api.telegram.org"
) : RequestsExecutor {
protected val baseUrl: String = "$hostUrl/bot$token"
protected val scope: CoroutineScope = CoroutineScope(
Executors.newSingleThreadExecutor().asCoroutineDispatcher()
)
}