Class File
java.lang.Object
io.micronaut.chatbots.telegram.api.AbstractFile
io.micronaut.chatbots.telegram.api.File
This object represents a file ready to be downloaded. The file can be downloaded via the link
https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable LongvoidsetFilePath(@Nullable String filePath) voidsetFileSize(@Nullable Long fileSize) toString()Methods inherited from class io.micronaut.chatbots.telegram.api.AbstractFile
getFileId, getFileUniqueId, setFileId, setFileUniqueId
-
Constructor Details
-
File
public File()
-
-
Method Details
-
getFileSize
- Returns:
- File size, if known.
-
setFileSize
- Parameters:
fileSize- File size, if known.
-
getFilePath
- Returns:
- File path. Use
https://api.telegram.org/file/bot<token>/<file_path>to get the file.
-
setFilePath
- Parameters:
filePath- File path. Usehttps://api.telegram.org/file/bot<token>/<file_path>to get the file.
-
toString
-