Skip to content

Commit

Permalink
feat: add SubredditControls::getPopular()
Browse files Browse the repository at this point in the history
  • Loading branch information
thislooksfun committed May 2, 2022
1 parent 49be5ca commit cc91c08
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/reddit/subreddit/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,18 @@ export class SubredditControls extends BaseControls {
return this.getSubreddits("new");
}

/**
* Get the most popular subreddits.
*
* @note Due to the way Reddit implements Listings, this will only contain the
* first 1000 subreddits.
*
* @returns A Listing of Subreddits.
*/
getPopular(): Listing<Subreddit> {
return this.getSubreddits("popular");
}

/** @internal */
protected getAboutListing(
subreddit: string,
Expand Down

0 comments on commit cc91c08

Please sign in to comment.