commonMain.com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetFile.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TelegramBotAPI-jvm Show documentation
Show all versions of TelegramBotAPI-jvm Show documentation
Library for Object-Oriented and type-safe work with Telegram Bot API
package com.github.insanusmokrassar.TelegramBotAPI.requests.get
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFile
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.fileIdField
import kotlinx.serialization.*
@Serializable
data class GetFile(
@SerialName(fileIdField)
val fileId: FileId
): SimpleRequest {
override fun method(): String = "getFile"
override val resultDeserializer: DeserializationStrategy
get() = PathedFile.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}