Hacker News new | ask | show | jobs
by crindy 3970 days ago
This is absolutely amazing. I'll definitely be using it extensively.

I'm also incredibly curious about how it's implemented though. As far as I know, reddit doesn't have an API point for all new comments, do they?

1 comments

Thanks! Let me know if you have any problems or questions. Re: the implementation, take a look at the task that fetches new comments: http://git.io/vOGT3.

reddit's primary 'new comments' endpoint let's you fetch at most the 100 newest comments. But you have to account for times when the previously 'newest' model is more than 100 comments in the past, ie. you have a gap because there were too many comments or another request took longer than expected.

The endpoints themselves are simple, but the task to make sure you don't miss any or fall behind is tricky.