Package dev.inmo.tgbotapi.utils

Types

BuiltinMimeTypes
Link copied to clipboard
common
object BuiltinMimeTypes
ExceptionHandler
Link copied to clipboard
common
typealias ExceptionHandler<T> = dev.inmo.micro_utils.coroutines.ExceptionHandler<T>
FileName
Link copied to clipboard

File name like hello.jpg

common
typealias FileName = String
MatrixBuilder
Link copied to clipboard
common
class MatrixBuilder<T>
MimeType
Link copied to clipboard
class MimeType
class MimeType(raw: String)
class MimeType(raw: String) : MimeType
RowBuilder
Link copied to clipboard
common
class RowBuilder<T>
StorageFile
Link copied to clipboard
common
data class StorageFile(storageFileInfo: StorageFileInfo, inputSource: () -> Input)
StorageFileInfo
Link copied to clipboard
common
data class StorageFileInfo(contentType: String, fileName: String)
TelegramAPIUrlsKeeper
Link copied to clipboard
common
class TelegramAPIUrlsKeeper(token: String, hostUrl: String)

Functions

asMimeType
Link copied to clipboard
common
fun String.asMimeType(): MimeType
asStorageFile
Link copied to clipboard
common
inline fun ByteArray.asStorageFile(fileName: String, mimeType: MimeType): StorageFile
buildMimeType
Link copied to clipboard
common
fun buildMimeType(raw: String): MimeType
createMimeType
Link copied to clipboard
fun createMimeType(raw: String): MimeType
fun createMimeType(raw: String): MimeType
flatMatrix
Link copied to clipboard
common
fun <T> flatMatrix(vararg elements: Array<Out T>): List<List<T>>
fun <T> flatMatrix(block: RowBuilder<T>.() -> Unit): List<List<T>>
mapNotNullValues
Link copied to clipboard
common
fun <K, V> Map<K, V?>.mapNotNullValues(): Map<K, V>
mapOfNotNull
Link copied to clipboard
common
fun <K, V> mapOfNotNull(vararg pairs: Array<Out Pair<K, V?>>): Map<K, V>
mapWithCommonValues
Link copied to clipboard
common
fun JsonObject.mapWithCommonValues(): Map<String, Any>
matrix
Link copied to clipboard
common
fun <T> matrix(block: MatrixBuilder<T>.() -> Unit): List<List<T>>
plus
Link copied to clipboard
common
operator fun <T> RowBuilder<T>.plus(t: T): Boolean
row
Link copied to clipboard
common
fun <T> row(block: RowBuilder<T>.() -> Unit): List<T>
fun <T> MatrixBuilder<T>.row(vararg elements: Array<Out T>)
fun <T> MatrixBuilder<T>.row(block: RowBuilder<T>.() -> Unit)
StorageFile
Link copied to clipboard
fun StorageFile(file: File): StorageFile
inline fun StorageFile(fileName: String, bytes: ByteArray, mimeType: MimeType): StorageFile
inline fun StorageFile(fileName: String, bytes: ByteArray, mimeType: MimeType): StorageFile
toJson
Link copied to clipboard
common
fun <T : Any> T.toJson(serializer: SerializationStrategy<T>): JsonObject
toJsonWithoutNulls
Link copied to clipboard
common
fun <T : Any> T.toJsonWithoutNulls(serializer: SerializationStrategy<T>): JsonObject
withoutNulls
Link copied to clipboard
common
fun JsonArray.withoutNulls(): JsonArray
fun JsonObject.withoutNulls(): JsonObject

Properties

fileExtension
Link copied to clipboard
val String.fileExtension: String
filenameFromUrl
Link copied to clipboard
val String.filenameFromUrl: String
telegramBotAPIDefaultUrl
Link copied to clipboard
const val telegramBotAPIDefaultUrl: String