Interface EmbedThumbnail


  • public interface EmbedThumbnail
    This interface represents an embed thumbnail.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage> asBufferedImage​(DiscordApi api)
      Downloads the thumbnail as a BufferedImage.
      java.util.concurrent.CompletableFuture<byte[]> asByteArray​(DiscordApi api)
      Downloads the thumbnail as a byte array.
      java.io.InputStream asInputStream​(DiscordApi api)
      Downloads the thumbnail as an input stream.
      int getHeight()
      Gets the height of the thumbnail.
      java.net.URL getProxyUrl()
      Gets the proxy url of the thumbnail.
      java.net.URL getUrl()
      Gets the url of the thumbnail.
      int getWidth()
      Gets the width of the thumbnail.
    • Method Detail

      • getUrl

        java.net.URL getUrl()
        Gets the url of the thumbnail.
        Returns:
        The url of the thumbnail.
      • getProxyUrl

        java.net.URL getProxyUrl()
        Gets the proxy url of the thumbnail.
        Returns:
        The proxy url of the thumbnail.
      • getHeight

        int getHeight()
        Gets the height of the thumbnail.
        Returns:
        The height of the thumbnail.
      • getWidth

        int getWidth()
        Gets the width of the thumbnail.
        Returns:
        The width of the thumbnail.
      • asBufferedImage

        java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage> asBufferedImage​(DiscordApi api)
        Downloads the thumbnail as a BufferedImage.
        Parameters:
        api - The discord api instance used to download the thumbnail.
        Returns:
        The thumbnail as a BufferedImage.
      • asByteArray

        java.util.concurrent.CompletableFuture<byte[]> asByteArray​(DiscordApi api)
        Downloads the thumbnail as a byte array.
        Parameters:
        api - The discord api instance used to download the thumbnail.
        Returns:
        The thumbnail as a byte array.
      • asInputStream

        java.io.InputStream asInputStream​(DiscordApi api)
                                   throws java.io.IOException
        Downloads the thumbnail as an input stream.
        Parameters:
        api - The discord api instance used to download the thumbnail.
        Returns:
        The thumbnail as an input stream.
        Throws:
        java.io.IOException - If an IO error occurs.