Class OutgoingStickerMessage
- java.lang.Object
-
- org.apache.camel.component.telegram.model.OutgoingMessage
-
- org.apache.camel.component.telegram.model.OutgoingStickerMessage
-
- All Implemented Interfaces:
Serializable
public final class OutgoingStickerMessage extends OutgoingMessage
An outgoing sticker message.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.camel.component.telegram.model.OutgoingMessage
chatId, disableNotification, replyToMessageId
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OutgoingStickerMessage
createWithFileId(String fileId, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a file_id to send a file that exists on the Telegram servers.static OutgoingStickerMessage
createWithImage(byte[] image, String filenameWithExtension, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a given webp image.static OutgoingStickerMessage
createWithUrl(String url, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a HTTP URL as a String for Telegram to get a .webp file from the Internet.String
getFilenameWithExtension()
String
getSticker()
byte[]
getStickerImage()
String
toString()
-
Methods inherited from class org.apache.camel.component.telegram.model.OutgoingMessage
getChatId, getDisableNotification, getReplyToMessageId, setChatId, setDisableNotification, setReplyToMessageId
-
-
-
-
Method Detail
-
createWithImage
public static OutgoingStickerMessage createWithImage(byte[] image, String filenameWithExtension, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a given webp image.- Parameters:
image
- the imagefilenameWithExtension
- the name of the file to send. Example: file.webpchatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- Sends the message silently. Users will receive a notification with no sound.replyToMessageId
- If the message is a reply, ID of the original message- Returns:
- Sticker message.
-
createWithUrl
public static OutgoingStickerMessage createWithUrl(String url, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a HTTP URL as a String for Telegram to get a .webp file from the Internet.- Parameters:
url
- image URLchatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- Sends the message silently. Users will receive a notification with no sound.replyToMessageId
- If the message is a reply, ID of the original message- Returns:
- Sticker message.
-
createWithFileId
public static OutgoingStickerMessage createWithFileId(String fileId, String chatId, Boolean disableNotification, Long replyToMessageId)
CreatesOutgoingStickerMessage
based on a file_id to send a file that exists on the Telegram servers.- Parameters:
fileId
- file_id asString
to send a file that exists on the Telegram serverschatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- Sends the message silently. Users will receive a notification with no sound.replyToMessageId
- If the message is a reply, ID of the original message- Returns:
- Sticker message.
-
getSticker
public String getSticker()
-
getStickerImage
public byte[] getStickerImage()
-
getFilenameWithExtension
public String getFilenameWithExtension()
-
toString
public String toString()
- Overrides:
toString
in classOutgoingMessage
-
-