Interface EmbedThumbnail
-
public interface EmbedThumbnailThis interface represents an embed thumbnail.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<BufferedImage>downloadAsBufferedImage(DiscordApi api)Downloads the thumbnail as aBufferedImage.CompletableFuture<byte[]>downloadAsByteArray(DiscordApi api)Downloads the thumbnail as a byte array.InputStreamdownloadAsInputStream(DiscordApi api)Downloads the thumbnail as an input stream.intgetHeight()Gets the height of the thumbnail.URLgetProxyUrl()Gets the proxy url of the thumbnail.URLgetUrl()Gets the url of the thumbnail.intgetWidth()Gets the width of the thumbnail.
-
-
-
Method Detail
-
getUrl
URL getUrl()
Gets the url of the thumbnail.- Returns:
- The url of the thumbnail.
-
getProxyUrl
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.
-
downloadAsBufferedImage
CompletableFuture<BufferedImage> downloadAsBufferedImage(DiscordApi api)
Downloads the thumbnail as aBufferedImage.- Parameters:
api- The discord api instance used to download the thumbnail.- Returns:
- The thumbnail as a
BufferedImage.
-
downloadAsByteArray
CompletableFuture<byte[]> downloadAsByteArray(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.
-
downloadAsInputStream
InputStream downloadAsInputStream(DiscordApi api) throws IOException
Downloads the thumbnail as an input stream.- Parameters:
api- The discord api instance used to download the thumbnail.- Returns:
- The thumbnail as a input stream.
- Throws:
IOException- If an IO error occurs.
-
-