Class AnimationSender
java.lang.Object
io.github.yvasyliev.forwarder.telegram.bot.service.sender.AnimationSender
- All Implemented Interfaces:
PostSender<CloseableSupplier<SendAnimationDTO>, org.telegram.telegrambots.meta.api.objects.message.Message>
@Service
public class AnimationSender
extends Object
implements PostSender<CloseableSupplier<SendAnimationDTO>, org.telegram.telegrambots.meta.api.objects.message.Message>
Sends animations to Telegram.
-
Constructor Summary
ConstructorsConstructorDescriptionAnimationSender(TelegramAdminProperties adminProperties, SendAnimationMapper sendAnimationMapper, org.telegram.telegrambots.meta.generics.TelegramClient telegramClient) -
Method Summary
Modifier and TypeMethodDescriptionorg.telegram.telegrambots.meta.api.objects.message.Messagesend(CloseableSupplier<SendAnimationDTO> sendAnimationDTOSupplier) Sends the given method to Telegram.
-
Constructor Details
-
AnimationSender
public AnimationSender(TelegramAdminProperties adminProperties, SendAnimationMapper sendAnimationMapper, org.telegram.telegrambots.meta.generics.TelegramClient telegramClient)
-
-
Method Details
-
send
public org.telegram.telegrambots.meta.api.objects.message.Message send(CloseableSupplier<SendAnimationDTO> sendAnimationDTOSupplier) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException Description copied from interface:PostSenderSends the given method to Telegram.- Specified by:
sendin interfacePostSender<CloseableSupplier<SendAnimationDTO>, org.telegram.telegrambots.meta.api.objects.message.Message>- Parameters:
sendAnimationDTOSupplier- the method to be sent- Returns:
- the response received after sending
- Throws:
IOException- if an I/O error occursorg.telegram.telegrambots.meta.exceptions.TelegramApiException- if a Telegram API error occurs
-