added nsfw flag to search functions

This commit is contained in:
2026-05-26 01:50:49 -05:00
parent 68b11ef35c
commit c959c91d0d
3 changed files with 10 additions and 17 deletions
+4
View File
@@ -558,6 +558,8 @@ type ListSubredditOptions struct {
ListOptions
// One of: relevance, activity.
Sort string `url:"sort,omitempty"`
IncludeNsfw bool `url:"include_over_18,omitempty"`
}
// ListPostOptions defines possible options used when getting posts from a subreddit.
@@ -572,6 +574,8 @@ type ListPostSearchOptions struct {
ListPostOptions
// One of: relevance, hot, top, new, comments.
Sort string `url:"sort,omitempty"`
IncludeNsfw bool `url:"include_over_18,omitempty"`
}
// ListUserOverviewOptions defines possible options used when getting a user's post and/or comments.