Skip to content

Commit

Permalink
feat: add SubredditControls::getPremium()
Browse files Browse the repository at this point in the history
NOTE: I do not have premium, so I can't actually test this definitely
works. I am 99% sure it should, but if it doesn't please let me know!
  • Loading branch information
thislooksfun committed May 2, 2022
1 parent cc91c08 commit 5a1274b
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 @@ -519,6 +519,18 @@ export class SubredditControls extends BaseControls {
return this.getSubreddits("popular");
}

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

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

0 comments on commit 5a1274b

Please sign in to comment.