Class RedditPhotoMetadataSender
java.lang.Object
io.github.yvasyliev.forwarder.telegram.reddit.service.sender.metadata.RedditPhotoMetadataSender
- All Implemented Interfaces:
RedditMediaMetadataSender
Sends photo metadata from Reddit posts to Telegram.
-
Constructor Summary
ConstructorsConstructorDescriptionRedditPhotoMetadataSender(RedditSendPhotoDTOMapper sendPhotoDTOMapper, PostSender<CloseableSupplier<SendPhotoDTO>, org.telegram.telegrambots.meta.api.objects.message.Message> photoSender) -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(Link.Metadata metadata, boolean hasSpoiler) Sends the given Reddit media metadata.
-
Constructor Details
-
RedditPhotoMetadataSender
public RedditPhotoMetadataSender(RedditSendPhotoDTOMapper sendPhotoDTOMapper, PostSender<CloseableSupplier<SendPhotoDTO>, org.telegram.telegrambots.meta.api.objects.message.Message> photoSender)
-
-
Method Details
-
send
public void send(Link.Metadata metadata, boolean hasSpoiler) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException Description copied from interface:RedditMediaMetadataSenderSends the given Reddit media metadata.- Specified by:
sendin interfaceRedditMediaMetadataSender- Parameters:
metadata- the Reddit media metadata to sendhasSpoiler- indicates if the media has a spoiler- Throws:
IOException- if an I/O error occursorg.telegram.telegrambots.meta.exceptions.TelegramApiException- if a Telegram API error occurs
-