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

Added restrict_sr flag to Subreddit.search() #6

Merged
merged 1 commit into from Dec 25, 2016

Conversation

SecareLupus
Copy link
Contributor

Subreddit.search() defaults to searching the entirety of reddit. By adding the restrict_sr flag, the search will be restricted to the relevant subreddit.

Subreddit.search() defaults to searching the entirety of reddit. By adding the restrict_sr flag, the search will be restricted to the relevant subreddit.
@SecareLupus
Copy link
Contributor Author

So, after looking around the various calls that are supported, I can't actually find another way to search all of reddit. I think given the way the api seems to be structured, the api needs to support searching all of reddit or just the sub it's called on, or there won't be a way to search all of reddit.

I still think that the default should be searching just the sub, but I'm pretty sure we need to either to make another function that doesn't set the sr_restrict flag or use the optional parameter solution.

@stevenroose stevenroose merged commit 66338f9 into stevenroose:master Dec 25, 2016
@stevenroose
Copy link
Owner

Good point, maybe we need a search method in the main class.

@stevenroose
Copy link
Owner

Thanks for the PR btw!

@SecareLupus
Copy link
Contributor Author

SecareLupus commented Dec 25, 2016 via email

@stevenroose
Copy link
Owner

stevenroose commented Dec 25, 2016 via email

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.

None yet

2 participants