Add separate timespan options for convenience

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-07-27 22:26:29 -04:00
parent c852306cb2
commit ff682a6e70
3 changed files with 31 additions and 38 deletions
+1
View File
@@ -128,6 +128,7 @@ func (s *SubredditService) Get(ctx context.Context, name string) (*Subreddit, *R
}
// GetPopular returns popular subreddits.
// todo: use search opts for this
func (s *SubredditService) GetPopular(ctx context.Context, opts *ListOptions) (*Subreddits, *Response, error) {
return s.getSubreddits(ctx, "subreddits/popular", opts)
}