File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public class Reddit
36
36
private const string PopularSubredditsUrl = "/subreddits/popular.json" ;
37
37
private const string GoldSubredditsUrl = "/subreddits/gold.json" ;
38
38
private const string DefaultSubredditsUrl = "/subreddits/default.json" ;
39
+ private const string SearchSubredditsUrl = "/subreddits/search.json?q={0}" ;
40
+
39
41
40
42
#endregion
41
43
@@ -439,6 +441,15 @@ public Listing<Subreddit> GetGoldSubreddits()
439
441
public Listing < Subreddit > GetDefaultSubreddits ( )
440
442
{
441
443
return new Listing < Subreddit > ( this , DefaultSubredditsUrl , WebAgent ) ;
444
+ }
445
+
446
+ /// <summary>
447
+ /// Returns the Listing of subreddits related to a query.
448
+ /// </summary>
449
+ /// <returns></returns>
450
+ public Listing < Subreddit > GetParamSubreddits ( string query )
451
+ {
452
+ return new Listing < Subreddit > ( this , string . Format ( SearchSubredditsUrl , query ) , WebAgent ) ;
442
453
}
443
454
444
455
#endregion SubredditSearching
You can’t perform that action at this time.
0 commit comments