mattbdean / JRAW

The Java Reddit API Wrapper
https://mattbdean.gitbooks.io/jraw
MIT License
356 stars 125 forks source link

Sorting posts by new? #288

Open tmello01 opened 5 years ago

tmello01 commented 5 years ago

I'm trying to make a bot for a particular subreddit, and for this purpose I need to be able to grab new posts. As it stands, it seems like client.subreddit().posts().build() only grabs the posts currently on that front-page. Is there a way to grab all new posts to the subreddit, and maybe fire an event when a new post is made?

amrro commented 5 years ago
        accountHelper.reddit
            .subreddit("pics")
            .posts()
            .sorting(SubredditSort.NEW)
            .limit(20)
            .build()
tmello01 commented 5 years ago

Is there any way to fire events for something like this? Or add a listener that responds to new posts?