mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
add docs for InputFile
This commit is contained in:
parent
807952201b
commit
ee81f49a75
@ -10,6 +10,17 @@ import kotlinx.serialization.descriptors.*
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
/**
|
||||
* Common type for all files in Telegram Bot API which can be sent via requests like [dev.inmo.tgbotapi.requests.send.media.SendDocument].
|
||||
* You may use methods like [MPPFile.asMultipartFile] when you want to send files from your file system, but you should
|
||||
* remember about [restrictions][https://core.telegram.org/bots/api#sending-files] in Telegram for bots. In case you
|
||||
* wish to send file by its url, use [FileId] and pass your url as [FileId.fileId]
|
||||
*
|
||||
* @see MPPFile.asMultipartFile
|
||||
* @see ByteArray.asMultipartFile
|
||||
* @see ByteReadChannel.asMultipartFile
|
||||
* @see ByteReadChannelAllocator.asMultipartFile
|
||||
*/
|
||||
@Serializable(InputFileSerializer::class)
|
||||
sealed class InputFile {
|
||||
abstract val fileId: String
|
||||
|
Loading…
Reference in New Issue
Block a user