added nsfw results for search functions
This commit is contained in:
+2
-2
@@ -499,7 +499,7 @@ func (s *SubredditService) Unfavorite(ctx context.Context, subreddit string) (*R
|
||||
|
||||
// Search for subreddits.
|
||||
func (s *SubredditService) Search(ctx context.Context, query string, opts *ListSubredditOptions) ([]*Subreddit, *Response, error) {
|
||||
path := fmt.Sprintf("subreddits/search?q=%s", query)
|
||||
path := fmt.Sprintf("subreddits/search?q=%s&include_over_18=on", query)
|
||||
l, resp, err := s.client.getListing(ctx, path, opts)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
@@ -533,7 +533,7 @@ func (s *SubredditService) SearchPosts(ctx context.Context, query string, subred
|
||||
subreddit = "all"
|
||||
}
|
||||
|
||||
path := fmt.Sprintf("r/%s/search", subreddit)
|
||||
path := fmt.Sprintf("r/%s/search?include_over_18=on", subreddit)
|
||||
path, err := addOptions(path, opts)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user