Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Subreddit Comment Support #11

Closed
wants to merge 1 commit into from

Conversation

RGood
Copy link

@RGood RGood commented Mar 7, 2021

Changelog:

  • Added functions to subreddit.go to support fetching comments via Listing
  • Fetched some test-data from /r/golang/comments.json for basic unit test
    • Initially 100 comments, but reduced to 5
  • Added consumer method to stream.go to produce a stream of comments from a subreddit using this method
  • Copied post stream unit test logic to comment stream


// certain comment streams are inconsistent about the completeness of returned comments
// it's not enough to check if we've seen older comments, but we must check for every comment individually
if !ids.Exists(id) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ids set should probably get cleaned up at some point for continuously-running streams, or else it could cause memory problems in long-running apps

@RGood
Copy link
Author

RGood commented May 23, 2021

Closed, as the changes are rolled up into #12

May as well just merge them together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant