Package dev.inmo.tgbotapi.utils

Types

BuiltinMimeTypes
Link copied to clipboard
common
object BuiltinMimeTypes
FileName
Link copied to clipboard
common
typealias FileName = String

File name like hello.jpg

MatrixBuilder
Link copied to clipboard
common
class MatrixBuilder<T>
MimeType
Link copied to clipboard
class MimeType
class MimeType : MimeType
RowBuilder
Link copied to clipboard
common
class RowBuilder<T>
StorageFile
Link copied to clipboard
common
data class StorageFile(storageFileInfo: StorageFileInfo, inputSource: () -> Input)
Contains info about file, which potentially can be sent to telegram system.
StorageFileInfo
Link copied to clipboard
common
data class StorageFileInfo(contentType: String, fileName: String)
Information about file for StorageFile
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
flatMatrix
Link copied to clipboard
common
fun <T> flatMatrix(vararg elements: T): Matrix<T>
fun <T> flatMatrix(block: RowBuilder<T>.() -> Unit): Matrix<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: 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): Matrix<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: 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
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
common
val String.fileExtension: String
filenameFromUrl
Link copied to clipboard
common
val String.filenameFromUrl: FileName
lowLevelRiskFeatureMessage
Link copied to clipboard
common
const val lowLevelRiskFeatureMessage: String
telegramBotAPIDefaultUrl
Link copied to clipboard
common
const val telegramBotAPIDefaultUrl: String