java.lang.Object
io.micronaut.chatbots.telegram.api.AbstractFile
io.micronaut.chatbots.telegram.api.File

public class File extends AbstractFile
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 Details

    • File

      public File()
  • Method Details

    • getFileSize

      @Nullable public @Nullable Long getFileSize()
      Returns:
      File size, if known.
    • setFileSize

      public void setFileSize(@Nullable @Nullable Long fileSize)
      Parameters:
      fileSize - File size, if known.
    • getFilePath

      @Nullable public @Nullable String getFilePath()
      Returns:
      File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
    • setFilePath

      public void setFilePath(@Nullable @Nullable String filePath)
      Parameters:
      filePath - File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
    • toString

      public String toString()
      Overrides:
      toString in class Object