Unmark Comments or Messages as read. :param items: A list containing instances of :class:`.Comment` and/or :class:`.Message` to be marked as unread relative to the authorized user's inbox. Requests are batched at 25 items (Reddit limit). For example
(self, items: list[models.Comment | models.Message])
| 129 | items = items[25:] |
| 130 | |
| 131 | def mark_unread(self, items: list[models.Comment | models.Message]) -> None: |
| 132 | """Unmark Comments or Messages as read. |
| 133 | |
| 134 | :param items: A list containing instances of :class:`.Comment` and/or |
| 135 | :class:`.Message` to be marked as unread relative to the authorized user's |
| 136 | inbox. |
| 137 | |
| 138 | Requests are batched at 25 items (Reddit limit). |
| 139 | |
| 140 | For example, to mark the first 10 items as unread try: |
| 141 | |
| 142 | .. code-block:: python |
| 143 | |
| 144 | to_unread = list(reddit.inbox.all(limit=10)) |
| 145 | reddit.inbox.mark_unread(to_unread) |
| 146 | |
| 147 | .. seealso:: |
| 148 | |
| 149 | - :meth:`.Comment.mark_unread` |
| 150 | - :meth:`.Message.mark_unread` |
| 151 | |
| 152 | """ |
| 153 | while items: |
| 154 | data = {"id": ",".join(x.fullname for x in items[:25])} |
| 155 | self._reddit.post(API_PATH["unread_message"], data=data) |
| 156 | items = items[25:] |
| 157 | |
| 158 | def mentions(self, **generator_kwargs: Any) -> Iterator[models.Comment]: |
| 159 | r"""Return a :class:`.ListingGenerator` for mentions. |