Yield new updates to the live thread as they become available. :param skip_existing: Set to ``True`` to only fetch items created after the stream (default: ``False``). As with :meth:`.LiveThread.updates()`, updates are yielded as :class:`.LiveUpdate`. U
(self, **stream_options: Any)
| 604 | self.live_thread = live_thread |
| 605 | |
| 606 | def updates(self, **stream_options: Any) -> Iterator[models.LiveUpdate]: |
| 607 | """Yield new updates to the live thread as they become available. |
| 608 | |
| 609 | :param skip_existing: Set to ``True`` to only fetch items created after the |
| 610 | stream (default: ``False``). |
| 611 | |
| 612 | As with :meth:`.LiveThread.updates()`, updates are yielded as |
| 613 | :class:`.LiveUpdate`. |
| 614 | |
| 615 | Updates are yielded oldest first. Up to 100 historical updates will initially be |
| 616 | returned. |
| 617 | |
| 618 | Keyword arguments are passed to :func:`.stream_generator`. |
| 619 | |
| 620 | For example, to retrieve all new updates made to the ``"ta535s1hq2je"`` live |
| 621 | thread, try: |
| 622 | |
| 623 | .. code-block:: python |
| 624 | |
| 625 | for live_update in reddit.live("ta535s1hq2je").stream.updates(): |
| 626 | print(live_update.body) |
| 627 | |
| 628 | To only retrieve new updates starting from when the stream is created, pass |
| 629 | ``skip_existing=True``: |
| 630 | |
| 631 | .. code-block:: python |
| 632 | |
| 633 | live_thread = reddit.live("ta535s1hq2je") |
| 634 | for live_update in live_thread.stream.updates(skip_existing=True): |
| 635 | print(live_update.author) |
| 636 | |
| 637 | """ |
| 638 | return stream_generator(self.live_thread.updates, **stream_options) |
| 639 | |
| 640 | |
| 641 | class LiveUpdate(FullnameMixin, CreatedMixin, RedditBase): |
nothing calls this directly
no test coverage detected