Class RedditMediaGroupMetadataSender
java.lang.Object
io.github.yvasyliev.forwarder.telegram.reddit.service.sender.metadata.partition.RedditMediaGroupMetadataSender
- All Implemented Interfaces:
RedditMetadataPartitionSender
Sender for Reddit metadata partitions that should be sent as media groups.
-
Constructor Summary
ConstructorsConstructorDescriptionRedditMediaGroupMetadataSender(RedditSendMediaGroupDTOMapper sendMediaGroupDTOMapper, PostSender<CloseableSupplier<SendMediaGroupDTO>, List<org.telegram.telegrambots.meta.api.objects.message.Message>> mediaGroupSender) -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(List<Link.Metadata> metadataPartition, boolean hasSpoiler, String caption) Sends a partition of Reddit metadata.
-
Constructor Details
-
RedditMediaGroupMetadataSender
public RedditMediaGroupMetadataSender(RedditSendMediaGroupDTOMapper sendMediaGroupDTOMapper, PostSender<CloseableSupplier<SendMediaGroupDTO>, List<org.telegram.telegrambots.meta.api.objects.message.Message>> mediaGroupSender)
-
-
Method Details
-
send
public void send(List<Link.Metadata> metadataPartition, boolean hasSpoiler, String caption) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException Description copied from interface:RedditMetadataPartitionSenderSends a partition of Reddit metadata.- Specified by:
sendin interfaceRedditMetadataPartitionSender- Parameters:
metadataPartition- the list of Reddit metadata to sendhasSpoiler- indicates if the content has a spoilercaption- the caption to accompany the sent content- Throws:
IOException- if an I/O error occursorg.telegram.telegrambots.meta.exceptions.TelegramApiException- if a Telegram API error occurs
-