How to use the apraw.models.helpers.generator.ListingGenerator function in aPRAW

To help you get started, we’ve selected a few aPRAW examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Dan6erbond / aPRAW / apraw / models / subreddit / subreddit.py View on Github external
for comment in submissions.new.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to the new submissions endpoint.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self._reddit, API_PATH["subreddit_new"].format(sub=self.display_name), subreddit=self,
                                *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / moderation.py View on Github external
for comment in subreddit.mod.modqueue.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to grab items in the modqueue.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self.subreddit._reddit,
                                API_PATH["subreddit_modqueue"].format(sub=self.subreddit.display_name),
                                subreddit=self.subreddit, *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / subreddit.py View on Github external
def top(self, *args, **kwargs):
        r"""
        Returns an instance of :class:`~apraw.models.ListingGenerator` mapped to the top submissions endpoint.

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to the top submissions endpoint.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self._reddit, API_PATH["subreddit_top"].format(sub=self.display_name), subreddit=self,
                                *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / user.py View on Github external
async def unread(self, *args, **kwargs) -> ListingGenerator:
        return ListingGenerator(self.reddit, API_PATH["message_unread"], *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / moderation.py View on Github external
for comment in subreddit.mod.log.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to grab mod actions in the subreddit log.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self.subreddit._reddit,
                                API_PATH["subreddit_log"].format(sub=self.subreddit.display_name),
                                subreddit=self.subreddit, *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / subreddit.py View on Github external
def hot(self, *args, **kwargs):
        r"""
        Returns an instance of :class:`~apraw.models.ListingGenerator` mapped to the hot submissions endpoint.

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to the hot submissions endpoint.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self._reddit, API_PATH["subreddit_hot"].format(sub=self.display_name), subreddit=self,
                                *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / wiki.py View on Github external
for comment in subreddit.wiki.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to recent wikipage revisions.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self.subreddit._reddit, API_PATH["wiki_revisions"].format(sub=self.subreddit), *args,
                                **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / moderation.py View on Github external
for comment in subreddit.mod.spam.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to grab items marked as spam.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self.subreddit._reddit,
                                API_PATH["subreddit_spam"].format(sub=self.subreddit.display_name),
                                subreddit=self.subreddit, *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / subreddit / subreddit.py View on Github external
def rising(self, *args, **kwargs):
        r"""
        Returns an instance of :class:`~apraw.models.ListingGenerator` mapped to the rising submissions endpoint.

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to the rising submissions endpoint.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self._reddit, API_PATH["subreddit_rising"].format(sub=self.display_name), *args,
                                **kwargs)
github Dan6erbond / aPRAW / apraw / models / reddit / redditor.py View on Github external
for comment in redditor.comments.stream():
                    print(comment)

        Parameters
        ----------
        kwargs: \*\*Dict
            :class:`~apraw.models.ListingGenerator` ``kwargs``.

        Returns
        -------
        generator: ListingGenerator
            A :class:`~apraw.models.ListingGenerator` mapped to fetch the Redditor's comments.
        """
        from ..helpers.generator import ListingGenerator
        return ListingGenerator(self.reddit, API_PATH["user_comments"].format(user=self), *args, **kwargs)