Class InputMedia<T>

    • Constructor Detail

      • InputMedia

        public InputMedia()
      • InputMedia

        public InputMedia​(String media,
                          String caption)
    • Method Detail

      • getMedia

        public String getMedia()
      • getMediaFile

        public File getMediaFile()
      • getNewMediaStream

        public InputStream getNewMediaStream()
      • getMediaName

        public String getMediaName()
      • isNewMedia

        public boolean isNewMedia()
      • setMedia

        public T setMedia​(String media)
        Use this setter to send an existing file (using file_id) or an url.
        Parameters:
        media - File_id or URL of the file to send
        Returns:
        This object
      • setMedia

        public T setMedia​(File mediaFile,
                          String fileName)
        Use this setter to send new file.
        Parameters:
        mediaFile - File to send
        Returns:
        This object
      • setMedia

        public T setMedia​(InputStream mediaStream,
                          String fileName)
        Use this setter to send new file as stream.
        Parameters:
        mediaStream - File to send
        Returns:
        This object
      • getCaption

        public String getCaption()
      • getParseMode

        public String getParseMode()
      • getType

        public abstract String getType()