1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-10-01 15:06:10 +00:00
tgbotapi/docs/dev.inmo.tgbotapi.utils/index.md
2021-03-17 15:18:37 +00:00

18 KiB

//docs/dev.inmo.tgbotapi.utils

Package dev.inmo.tgbotapi.utils

Types

Name Summary
BuiltinMimeTypes [common]
Content
object BuiltinMimeTypes


FileName [common]
Content
typealias FileName = String
More info


File name like hello.jpg




MatrixBuilder [common]
Content
class MatrixBuilder<T>


MimeType [common, js, jvm]
Content
[common, js]
class MimeType
[jvm]
class MimeType : MimeType


PreviewFeature [common]
Content
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.TYPEALIAS, AnnotationTarget.TYPE_PARAMETER])

annotation class PreviewFeature


RiskFeature [common]
Content
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.TYPEALIAS, AnnotationTarget.TYPE_PARAMETER])

annotation class RiskFeature(message: String)


RowBuilder [common]
Content
class RowBuilder<T>


StorageFile [common]
Content
data class StorageFile(storageFileInfo: StorageFileInfo, inputSource: () -> )
More info
Contains info about file, which potentially can be sent to telegram system.


StorageFileInfo [common]
Content
data class StorageFileInfo(contentType: String, fileName: String)
More info
Information about file for StorageFile


TelegramAPIUrlsKeeper [common]
Content
class TelegramAPIUrlsKeeper(token: String, hostUrl: String)


Functions

Name Summary
asMimeType [common]
Content
fun String.asMimeType(): MimeType


asStorageFile [common]
Content
inline fun ByteArray.asStorageFile(fileName: String, mimeType: MimeType): StorageFile


buildMimeType [common]
Content
fun buildMimeType(raw: String): MimeType


flatMatrix [common]
Content
fun <T> flatMatrix(vararg elements: T): Matrix<T>
fun <T> flatMatrix(block: RowBuilder<T>.() -> Unit): Matrix<T>


mapNotNullValues [common]
Content
fun <K, V> Map<K, V?>.mapNotNullValues(): Map<K, V>


mapOfNotNull [common]
Content
fun <K, V> mapOfNotNull(vararg pairs: Pair<K, V?>): Map<K, V>


mapWithCommonValues [common]
Content
fun .mapWithCommonValues(): Map<String, Any>


matrix [common]
Content
fun <T> matrix(block: MatrixBuilder<T>.() -> Unit): Matrix<T>


plus [common]
Content
operator fun <T> RowBuilder<T>.plus(t: T): Boolean


row [common]
Content
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)


[jvm, common]
Content
[jvm]
fun StorageFile(file: File): StorageFile
[common]
inline fun StorageFile(fileName: String, bytes: ByteArray, mimeType: MimeType): StorageFile


toJson [common]
Content
fun <T : Any> T.toJson(serializer: <T>):


toJsonWithoutNulls [common]
Content
fun <T : Any> T.toJsonWithoutNulls(serializer: <T>):


withoutNulls [common]
Content
fun .withoutNulls():


Properties

Name Summary
fileExtension [common] val String.fileExtension: String
filenameFromUrl [common] val String.filenameFromUrl: FileName
lowLevelRiskFeatureMessage [common] const val lowLevelRiskFeatureMessage: String
telegramBotAPIDefaultUrl [common] const val telegramBotAPIDefaultUrl: String