2018-12-26 08:07:24 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.requests.get
|
|
|
|
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
2019-01-17 02:43:51 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFile
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.fileIdField
|
2018-12-26 08:07:24 +00:00
|
|
|
import kotlinx.serialization.*
|
|
|
|
|
|
|
|
@Serializable
|
|
|
|
data class GetFile(
|
|
|
|
@SerialName(fileIdField)
|
|
|
|
val fileId: FileId
|
|
|
|
): SimpleRequest<PathedFile> {
|
|
|
|
override fun method(): String = "getFile"
|
|
|
|
override fun resultSerializer(): KSerializer<PathedFile> = PathedFile.serializer()
|
|
|
|
}
|