Reddit.NET  1.5
Reddit.NET is a .NET Standard library that provides easy access to the Reddit API with virtually no boilerplate code required.
Reddit.Controllers.Subreddit Class Reference

Controller class for subreddits. More...

Inheritance diagram for Reddit.Controllers.Subreddit:
Reddit.Controllers.BaseController Reddit.Controllers.Internal.Validators

Public Member Functions

 Subreddit (Dispatch dispatch, Things.Subreddit subreddit)
 Create a new subreddit controller instance populated from API return data. More...
 
 Subreddit (Dispatch dispatch, Things.SubredditChild subredditChild)
 Create a new subreddit controller instance populated from API return data. More...
 
 Subreddit (Dispatch dispatch, Subreddit subreddit)
 Copy another subreddit controller instance onto this one. More...
 
 Subreddit (Dispatch dispatch, string name, string title="", string description="", string sidebar="", string submissionText=null, string lang="en", string subredditType="public", string submissionType="any", string submitLinkLabel=null, string submitTextLabel=null, bool wikiEnabled=false, bool over18=false, bool allowDiscovery=true, bool allowSpoilers=true, bool showMedia=true, bool showMediaPreview=true, bool allowImages=true, bool allowVideos=true, bool collapseDeletedComments=false, string suggestedCommentSort=null, int commentScoreHideMins=0, byte[] headerImage=null, byte[] iconImage=null, string primaryColor=null, string keyColor=null, string fullname=null)
 Create a new subreddit controller instance, populated manually. More...
 
 Subreddit (Dispatch dispatch)
 Create an empty subreddit controller instance. More...
 
LinkPost LinkPost (string title=null, string url=null, string author=null, string thumbnail=null, int? thumbnailHeight=null, int? thumbnailWidth=null, JObject preview=null, string id=null, string fullname=null, string permalink=null, DateTime created=default(DateTime), DateTime edited=default(DateTime), int score=0, int upVotes=0, int downVotes=0, bool removed=false, bool spam=false)
 Create a new LinkPost object attached to this subreddit. More...
 
LinkPost LinkPost (string fullname)
 Create a new LinkPost object with the specified fullname attached to this subreddit. More...
 
SelfPost SelfPost (string title=null, string selfText=null, string selfTextHtml=null, string author=null, string id=null, string fullname=null, string permalink=null, DateTime created=default(DateTime), DateTime edited=default(DateTime), int score=0, int upVotes=0, int downVotes=0, bool removed=false, bool spam=false)
 Create a new SelfPost object attached to this subreddit. More...
 
SelfPost SelfPost (string fullname)
 Create a new SelfPost object with the specified fullname attached to this subreddit. More...
 
Post Post ()
 Create a new generic Post object attached to this subreddit. More...
 
Post Post (string fullname)
 Create a new generic Post object with the specified fullname attached to this subreddit. More...
 
Subreddit About ()
 Return information about the current subreddit instance. More...
 
void AcceptModeratorInvite ()
 Accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. More...
 
async Task AcceptModeratorInviteAsync ()
 Asynchronously accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. More...
 
void LeaveModerator ()
 Abdicate moderator status in a subreddit. More...
 
async Task LeaveModeratorAsync ()
 Abdicate moderator status in a subreddit asynchronously. More...
 
void LeaveContributor ()
 Abdicate approved submitter status in a subreddit. More...
 
async Task LeaveContributorAsync ()
 Abdicate approved submitter status in a subreddit asynchronously. More...
 
List< ModeratorGetModerators (string after="", string before="", int limit=25, string user="", bool includeCategories=false, int count=0, string show="all", bool srDetail=false)
 Get the moderators of this subreddit. More...
 
List< ModeratorGetModerators (SubredditsAboutInput subredditsAboutInput)
 Get the moderators of this subreddit. More...
 
List< SubredditUserGetContributors (string after="", string before="", int limit=25, string user="", bool includeCategories=false, int count=0, string show="all", bool srDetail=false)
 Get the approved submitters of this subreddit. More...
 
List< SubredditUserGetContributors (SubredditsAboutInput subredditsAboutInput)
 Get the approved submitters of this subreddit. More...
 
List< SubredditUserGetMutedUsers (string after="", string before="", int limit=25, string user="", bool includeCategories=false, int count=0, string show="all", bool srDetail=false)
 Get the muted users of this subreddit. More...
 
List< SubredditUserGetMutedUsers (SubredditsAboutInput subredditsAboutInput)
 Get the muted users of this subreddit. More...
 
List< BannedUserGetBannedUsers (string after="", string before="", int limit=25, string user="", bool includeCategories=false, int count=0, string show="all", bool srDetail=false)
 Get a list of users who were banned from this subreddit. More...
 
List< BannedUserGetBannedUsers (SubredditsAboutInput subredditsAboutInput)
 Get a list of users who were banned from this subreddit. More...
 
Things.SubredditSubmitText GetSubmitText ()
 Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form. More...
 
void UpdateStylesheet (string reason, string stylesheetContents)
 Update a subreddit's stylesheet. More...
 
async Task UpdateStylesheetAsync (string reason, string stylesheetContents)
 Update a subreddit's stylesheet asynchronously. More...
 
void Subscribe (bool skipInitialDefaults=false)
 Subscribe to a subreddit. More...
 
async Task SubscribeAsync (bool skipInitialDefaults=false)
 Subscribe to a subreddit asynchronously. More...
 
void Unsubscribe ()
 Unsubscribe from a subreddit. More...
 
async Task UnsubscribeAsync ()
 Unsubscribe from a subreddit asynchronously. More...
 
void DeleteBanner ()
 Remove the subreddit's custom mobile banner. More...
 
async Task DeleteBannerAsync ()
 Remove the subreddit's custom mobile banner asynchronously. More...
 
void DeleteHeader ()
 Remove the subreddit's custom header image. The sitewide-default header image will be shown again after this call. More...
 
async Task DeleteHeaderAsync ()
 Remove the subreddit's custom header image asynchronously. More...
 
void DeleteIcon ()
 Remove the subreddit's custom mobile icon. More...
 
async Task DeleteIconAsync ()
 Remove the subreddit's custom mobile icon asynchronously. More...
 
void DeleteImg (string imgName)
 Remove an image from the subreddit's custom image set. The image will no longer count against the subreddit's image limit. However, the actual image data may still be accessible for an unspecified amount of time. If the image is currently referenced by the subreddit's stylesheet, that stylesheet will no longer validate and won't be editable until the image reference is removed. More...
 
async Task DeleteImgAsync (string imgName)
 Remove an image from the subreddit's custom image set asynchronously. The image will no longer count against the subreddit's image limit. However, the actual image data may still be accessible for an unspecified amount of time. If the image is currently referenced by the subreddit's stylesheet, that stylesheet will no longer validate and won't be editable until the image reference is removed. More...
 
Things.ImageUploadResult UploadImg (byte[] imgData, string imgName, string imgType="png")
 Add or replace a subreddit stylesheet image. More...
 
async Task< Things.ImageUploadResult > UploadImgAsync (byte[] imgData, string imgName, string imgType="png")
 Add or replace a subreddit stylesheet image asynchronously. More...
 
Things.ImageUploadResult UploadHeader (byte[] imgData, string imgType="png")
 Add or replace the subreddit logo image. More...
 
async Task< Things.ImageUploadResult > UploadHeaderAsync (byte[] imgData, string imgType="png")
 Add or replace the subreddit logo image asynchronously. More...
 
Things.ImageUploadResult UploadIcon (byte[] imgData, string imgType="png")
 Add or replace a subreddit mobile icon image. More...
 
async Task< Things.ImageUploadResult > UploadIconAsync (byte[] imgData, string imgType="png")
 Add or replace a subreddit mobile icon image asynchronously. More...
 
Things.ImageUploadResult UploadBanner (byte[] imgData, string imgType="png")
 Add or replace a subreddit mobile banner image. More...
 
async Task< Things.ImageUploadResult > UploadBannerAsync (byte[] imgData, string imgType="png")
 Add or replace a subreddit mobile banner image asynchronously. More...
 
Things.SubredditSettingsContainer GetSettings (bool created=false, string location="")
 Get the current settings of a subreddit. More...
 
Things.RulesContainer GetRules ()
 Get the rules for the current subreddit. More...
 
Things.Traffic GetTraffic ()
 Get the traffic for the current subreddit. More...
 
List< PostSearch (SearchGetSearchInput searchGetSearchInput)
 Search this subreddit for posts. To search across all subreddits, use RedditAPI.Search, instead. More...
 
List< PostSearch (string q, SearchGetSearchInput searchGetSearchInput=null)
 Search this subreddit for posts. To search across all subreddits, use RedditAPI.Search, instead. More...
 
List< PostSearch (string q="", bool restrictSr=true, string sort="new", string category="", bool includeFacets=false, string type=null, string t="all", string after=null, string before=null, bool includeCategories=false, int count=0, int limit=25, string show="all", bool srDetail=false)
 Search this subreddit for posts. More...
 
Dictionary< string, string > SavedMediaText (string url)
 Retrieve the advisory text about saving media for relevant media links. This endpoint returns a notice for display during the post submission process that is pertinent to media links. More...
 
Things.ModActionContainer GetLog (string type=null, int limit=25, string after="", string before="", string mod=null, string show="all", bool srDetail=false, int count=0)
 Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified. More...
 
Things.ModActionContainer GetLog (ModerationGetLogInput moderationGetLogInput)
 Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified. More...
 
string Stylesheet ()
 Redirect to the subreddit's stylesheet if one exists. More...
 
void ModeratorInvite (string username, string permissions, int? duration=null)
 Invite a user to become a moderator of this subreddit. More...
 
async Task ModeratorInviteAsync (string username, string permissions, int? duration=null)
 Asynchronously invite a user to become a moderator of this subreddit. More...
 
void ModeratorInvite (UsersFriendInput usersFriendInput)
 Invite a user to become a moderator of this subreddit. More...
 
async Task ModeratorInviteAsync (UsersFriendInput usersFriendInput)
 Asynchronously invite a user to become a moderator of this subreddit. More...
 
void SetUserPermissions (string username, string permissions, string type)
 Set permissions. More...
 
async Task SetUserPermissionsAsync (string username, string permissions, string type)
 Set permissions asynchronously. More...
 
void SetUserPermissions (UsersSetPermissionsInput usersSetPermissionsInput)
 Set permissions. More...
 
async Task SetUserPermissionsAsync (UsersSetPermissionsInput usersSetPermissionsInput)
 Set permissions asynchronously. More...
 
Subreddit Create (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit and return the created result. If a subreddit by that name already exists, an exception is thrown. More...
 
async Task< SubredditCreateAsync (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, an exception is thrown. More...
 
Subreddit Create (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit and return the created result. If a subreddit by that name already exists, an exception is thrown. More...
 
async Task< SubredditCreateAsync (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, an exception is thrown. More...
 
Subreddit CreateIfNotExists (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored. More...
 
async Task< SubredditCreateIfNotExistsAsync (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored. More...
 
Subreddit CreateIfNotExists (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored. More...
 
async Task< SubredditCreateIfNotExistsAsync (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored. More...
 
Subreddit CreateOrUpdate (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result. More...
 
async Task< SubredditCreateOrUpdateAsync (bool allowPostCrossposts=true, bool allowTop=true, bool excludeBannedModqueue=false, bool freeFormReports=true, string gRecaptchaResponse="", string linkType="any", string spamComments="low", string spamLinks="high", string spamSelfPosts="high", string themeSr="", bool themeSrUpdate=true, string wikiMode="disabled", int wikiEditAge=0, int wikiEditKarma=0)
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result. More...
 
Subreddit CreateOrUpdate (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result. More...
 
async Task< SubredditCreateOrUpdateAsync (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result. More...
 
Subreddit Update (bool manualUpdate=false, bool? allOriginalContent=null, bool? allowDiscovery=null, bool? allowImages=null, bool? allowPostCrossposts=null, bool? allowTop=null, bool? allowVideos=null, bool? collapseDeletedComments=null, string description=null, bool? excludeBannedModqueue=null, bool? freeFormReports=null, string gRecaptchaResponse=null, string headerTitle=null, bool? hideAds=null, string keyColor=null, string lang=null, string linkType=null, string name=null, bool? originalContentTagEnabled=null, bool? over18=null, string publicDescription=null, bool? showMedia=null, bool? showMediaPreview=null, string spamComments=null, string spamLinks=null, string spamSelfPosts=null, bool? spoilersEnabled=null, string sr=null, string submitLinkLabel=null, string submitText=null, string submitTextLabel=null, string suggestedCommentSort=null, string themeSr=null, bool? themeSrUpdate=null, string title=null, string type=null, string wikiMode=null, int? commentScoreHideMins=null, int? wikiEditAge=null, int? wikiEditKarma=null)
 Update an existing subreddit. More...
 
async Task< SubredditUpdateAsync (bool manualUpdate=false, bool? allOriginalContent=null, bool? allowDiscovery=null, bool? allowImages=null, bool? allowPostCrossposts=null, bool? allowTop=null, bool? allowVideos=null, bool? collapseDeletedComments=null, string description=null, bool? excludeBannedModqueue=null, bool? freeFormReports=null, string gRecaptchaResponse=null, string headerTitle=null, bool? hideAds=null, string keyColor=null, string lang=null, string linkType=null, string name=null, bool? originalContentTagEnabled=null, bool? over18=null, string publicDescription=null, bool? showMedia=null, bool? showMediaPreview=null, string spamComments=null, string spamLinks=null, string spamSelfPosts=null, bool? spoilersEnabled=null, string sr=null, string submitLinkLabel=null, string submitText=null, string submitTextLabel=null, string suggestedCommentSort=null, string themeSr=null, bool? themeSrUpdate=null, string title=null, string type=null, string wikiMode=null, int? commentScoreHideMins=null, int? wikiEditAge=null, int? wikiEditKarma=null)
 Update an existing subreddit asynchronously. More...
 
Subreddit Update (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Update an existing subreddit. More...
 
async Task< SubredditUpdateAsync (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse="", string headerTitle="")
 Update an existing subreddit asynchronously. More...
 
- Public Member Functions inherited from Reddit.Controllers.BaseController
 BaseController ()
 Create a new Controller instance. More...
 
- Public Member Functions inherited from Reddit.Controllers.Internal.Validators
Exception BuildException (Exception ex, List< List< string >> errors)
 
dynamic Validate (dynamic obj)
 
GenericContainer Validate (GenericContainer genericContainer)
 
Generic Validate (Generic generic)
 
DynamicShortListingContainer Validate (DynamicShortListingContainer dynamicShortListingContainer)
 
DynamicShortListingData Validate (DynamicShortListingData dynamicShortListingData)
 
ImageUploadResult Validate (ImageUploadResult imageUploadResult)
 
LiveUpdateEventContainer Validate (LiveUpdateEventContainer liveUpdateEventContainer)
 
LiveThreadCreateResultContainer Validate (LiveThreadCreateResultContainer liveThreadCreateResultContainer)
 
LiveUpdateContainer Validate (LiveUpdateContainer liveUpdateContainer, int? minChildren=null)
 
SubredditSettingsContainer Validate (SubredditSettingsContainer subredditSettingsContainer)
 
SubredditSettings Validate (SubredditSettings subredditSettings)
 
List< ActionResultValidate (List< ActionResult > actionResults)
 
ActionResult Validate (ActionResult actionResult)
 
FlairListResultContainer Validate (FlairListResultContainer flairListResultContainer)
 
Flair Validate (Flair flair)
 
FlairV2 Validate (FlairV2 flairV2)
 
ModActionContainer Validate (ModActionContainer modActionContainer)
 
ModActionData Validate (ModActionData modActionData)
 
WikiPageRevisionContainer Validate (WikiPageRevisionContainer wikiPageRevisionContainer)
 
WikiPageRevisionData Validate (WikiPageRevisionData wikiPageRevisionData)
 
WikiPageSettingsContainer Validate (WikiPageSettingsContainer wikiPageSettingsContainer)
 
WikiPageSettings Validate (WikiPageSettings wikiPageSettings)
 
List< UserPrefsContainerValidate (List< UserPrefsContainer > userPrefsContainers)
 
UserPrefsContainer Validate (UserPrefsContainer userPrefsContainer)
 
UserPrefsData Validate (UserPrefsData userPrefsData)
 
PostResultShortContainer Validate (PostResultShortContainer postResultShortContainer)
 
PostResultShort Validate (PostResultShort postResultShort)
 
PostResultContainer Validate (PostResultContainer postResultContainer)
 
PostResult Validate (PostResult postResult)
 
JQueryReturn Validate (JQueryReturn jQueryReturn)
 
List<(PostContainer, CommentContainer)> Validate (List<(PostContainer, CommentContainer)> ps)
 
CommentResultContainer Validate (CommentResultContainer commentResultContainer)
 
SubredditContainer Validate (SubredditContainer subredditContainer)
 

Properties

string? BannerImg [get, set]
 The banner image URL. More...
 
string? BannerBackgroundColor [get, set]
 The banner background color. More...
 
string? BannerBackgroundImage [get, set]
 The banner background image URL. More...
 
string? SubredditType [get, set]
 The subreddit type (public, restricted, or private) More...
 
string? CommunityIcon [get, set]
 The community icon URL. More...
 
string? HeaderTitle [get, set]
 The header title. More...
 
bool? WikiEnabled [get, set]
 Whether the wiki is enabled for this subreddit. More...
 
bool?? Over18 [get, set]
 Whether you have to be over 18 to view this subreddit. More...
 
string? Sidebar [get, set]
 The sidebar text. More...
 
string? Name [get, set]
 The subreddit name. More...
 
byte[]? HeaderImg [get, set]
 The header image. More...
 
string? Title [get, set]
 The subreddit title. More...
 
bool?? CollapseDeletedComments [get, set]
 Whether to collapse deleted comments. More...
 
string? Id [get, set]
 The ID36 of this subreddit. More...
 
bool? EmojisEnabled [get, set]
 Whether emojis are enabled. More...
 
bool?? ShowMedia [get, set]
 Whether to show media. More...
 
bool? AllowVideos [get, set]
 Whether to allow videos. More...
 
bool? CanAssignUserFlair [get, set]
 Whether user flair can be assigned. More...
 
bool?? SpoilersEnabled [get, set]
 Whether spoilers are enabled. More...
 
string? PrimaryColor [get, set]
 The primary color. More...
 
string? SuggestedCommentSort [get, set]
 The suggested comment sort for this subreddit. More...
 
int???? ActiveUserCount [get, set]
 The active user count. More...
 
byte[]? IconImg [get, set]
 The icon image. More...
 
bool? CanAssignLinkFlair [get, set]
 Whether link flair can be assigned. More...
 
bool? AllowVideoGifs [get, set]
 Whether to allow video GIFs. More...
 
int?? Subscribers [get, set]
 The number of subscribers. More...
 
string? SubmitTextLabel [get, set]
 The submit text label. More...
 
string? KeyColor [get, set]
 The key color. More...
 
string? Lang [get, set]
 The language. More...
 
string? Fullname [get, set]
 The subreddit fullname. More...
 
DateTime? Created [get, set]
 When the subreddit was created. More...
 
string? URL [get, set]
 The URL. More...
 
string? SubmitLinkLabel [get, set]
 The submit link label. More...
 
bool?? AllowDiscovery [get, set]
 Whether to allow discovery. More...
 
string? Description [get, set]
 The subreddit description. More...
 
bool?? LinkFlairEnabled [get, set]
 Whether link flair is enabled. More...
 
bool?? AllowImages [get, set]
 Whether to allow images. More...
 
int?? CommentScoreHideMins [get, set]
 How many minutes to hide comment scores. More...
 
bool?? ShowMediaPreview [get, set]
 Whether to show media previews. More...
 
string? SubmissionType [get, set]
 The submission type. More...
 
Things.Subreddit SubredditData [get]
 Full subreddit data retrieved from the API. More...
 
SubredditPosts Posts [get, set]
 Posts belonging to this subreddit. More...
 
Comments Comments [get, set]
 Comments belonging to this subreddit. More...
 
Flairs Flairs [get, set]
 Flairs belonging to this subreddit. More...
 
Wiki Wiki [get, set]
 The subreddit wiki controller. More...
 
Things.SubredditSubmitText? SubmitText [get, set]
 Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form. More...
 
List< Moderator >? Moderators [get, set]
 Get the moderators of this subreddit. More...
 
- Properties inherited from Reddit.Controllers.BaseController
Lists Lists [get, set]
 List-handling. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Reddit.Controllers.Internal.Validators
void CheckErrors (List< List< string >> errors)
 
void CheckErrors (List< string > errors)
 
void CheckNull (object res, string msg="Reddit API returned null response.")
 

Detailed Description

Controller class for subreddits.

Constructor & Destructor Documentation

◆ Subreddit() [1/5]

Reddit.Controllers.Subreddit.Subreddit ( Dispatch  dispatch,
Things.Subreddit  subreddit 
)

Create a new subreddit controller instance populated from API return data.

Parameters
dispatch
subreddit

◆ Subreddit() [2/5]

Reddit.Controllers.Subreddit.Subreddit ( Dispatch  dispatch,
Things.SubredditChild  subredditChild 
)

Create a new subreddit controller instance populated from API return data.

Parameters
dispatch
subredditChild

◆ Subreddit() [3/5]

Reddit.Controllers.Subreddit.Subreddit ( Dispatch  dispatch,
Subreddit  subreddit 
)

Copy another subreddit controller instance onto this one.

Parameters
dispatch
subredditA valid subreddit controller instance

◆ Subreddit() [4/5]

Reddit.Controllers.Subreddit.Subreddit ( Dispatch  dispatch,
string  name,
string  title = "",
string  description = "",
string  sidebar = "",
string  submissionText = null,
string  lang = "en",
string  subredditType = "public",
string  submissionType = "any",
string  submitLinkLabel = null,
string  submitTextLabel = null,
bool  wikiEnabled = false,
bool  over18 = false,
bool  allowDiscovery = true,
bool  allowSpoilers = true,
bool  showMedia = true,
bool  showMediaPreview = true,
bool  allowImages = true,
bool  allowVideos = true,
bool  collapseDeletedComments = false,
string  suggestedCommentSort = null,
int  commentScoreHideMins = 0,
byte[]  headerImage = null,
byte[]  iconImage = null,
string  primaryColor = null,
string  keyColor = null,
string  fullname = null 
)

Create a new subreddit controller instance, populated manually.

Parameters
dispatch
name
title
description
sidebar
submissionText
lang
subredditType
submissionType
submitLinkLabel
submitTextLabel
wikiEnabled
over18
allowDiscovery
allowSpoilers
showMedia
showMediaPreview
allowImages
allowVideos
collapseDeletedComments
suggestedCommentSort
commentScoreHideMins
headerImage
iconImage
primaryColor
keyColor
fullname

◆ Subreddit() [5/5]

Reddit.Controllers.Subreddit.Subreddit ( Dispatch  dispatch)

Create an empty subreddit controller instance.

Parameters
dispatch

Member Function Documentation

◆ About()

Subreddit Reddit.Controllers.Subreddit.About ( )

Return information about the current subreddit instance.

Returns
An instance of this class populated with the retrieved data.

◆ AcceptModeratorInvite()

void Reddit.Controllers.Subreddit.AcceptModeratorInvite ( )

Accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators.

◆ AcceptModeratorInviteAsync()

async Task Reddit.Controllers.Subreddit.AcceptModeratorInviteAsync ( )

Asynchronously accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators.

◆ Create() [1/2]

Subreddit Reddit.Controllers.Subreddit.Create ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, an exception is thrown.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created subreddit.

◆ Create() [2/2]

Subreddit Reddit.Controllers.Subreddit.Create ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, an exception is thrown.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created subreddit.

◆ CreateAsync() [1/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateAsync ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, an exception is thrown.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created subreddit.

◆ CreateAsync() [2/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateAsync ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, an exception is thrown.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created subreddit.

◆ CreateIfNotExists() [1/2]

Subreddit Reddit.Controllers.Subreddit.CreateIfNotExists ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created or existing subreddit.

◆ CreateIfNotExists() [2/2]

Subreddit Reddit.Controllers.Subreddit.CreateIfNotExists ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created or existing subreddit.

◆ CreateIfNotExistsAsync() [1/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateIfNotExistsAsync ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created or existing subreddit.

◆ CreateIfNotExistsAsync() [2/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateIfNotExistsAsync ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, retrieve that existing subreddit and return the result. If the subreddit already exists, the parameters passed to this method will be ignored.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created or existing subreddit.

◆ CreateOrUpdate() [1/2]

Subreddit Reddit.Controllers.Subreddit.CreateOrUpdate ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ CreateOrUpdate() [2/2]

Subreddit Reddit.Controllers.Subreddit.CreateOrUpdate ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ CreateOrUpdateAsync() [1/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateOrUpdateAsync ( bool  allowPostCrossposts = true,
bool  allowTop = true,
bool  excludeBannedModqueue = false,
bool  freeFormReports = true,
string  gRecaptchaResponse = "",
string  linkType = "any",
string  spamComments = "low",
string  spamLinks = "high",
string  spamSelfPosts = "high",
string  themeSr = "",
bool  themeSrUpdate = true,
string  wikiMode = "disabled",
int  wikiEditAge = 0,
int  wikiEditKarma = 0 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result.

Parameters
allowPostCrosspostsboolean value
allowTopboolean value
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
linkTypeone of (any, link, self)
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
themeSrsubreddit name
themeSrUpdateboolean value
wikiModeone of (disabled, modonly, anyone)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ CreateOrUpdateAsync() [2/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.CreateOrUpdateAsync ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Create a new subreddit asynchronously and return the created result. If a subreddit by that name already exists, update that existing subreddit and return the result.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ DeleteBanner()

void Reddit.Controllers.Subreddit.DeleteBanner ( )

Remove the subreddit's custom mobile banner.

◆ DeleteBannerAsync()

async Task Reddit.Controllers.Subreddit.DeleteBannerAsync ( )

Remove the subreddit's custom mobile banner asynchronously.

◆ DeleteHeader()

void Reddit.Controllers.Subreddit.DeleteHeader ( )

Remove the subreddit's custom header image. The sitewide-default header image will be shown again after this call.

◆ DeleteHeaderAsync()

async Task Reddit.Controllers.Subreddit.DeleteHeaderAsync ( )

Remove the subreddit's custom header image asynchronously.

◆ DeleteIcon()

void Reddit.Controllers.Subreddit.DeleteIcon ( )

Remove the subreddit's custom mobile icon.

◆ DeleteIconAsync()

async Task Reddit.Controllers.Subreddit.DeleteIconAsync ( )

Remove the subreddit's custom mobile icon asynchronously.

◆ DeleteImg()

void Reddit.Controllers.Subreddit.DeleteImg ( string  imgName)

Remove an image from the subreddit's custom image set. The image will no longer count against the subreddit's image limit. However, the actual image data may still be accessible for an unspecified amount of time. If the image is currently referenced by the subreddit's stylesheet, that stylesheet will no longer validate and won't be editable until the image reference is removed.

Parameters
imgNamea valid subreddit image name

◆ DeleteImgAsync()

async Task Reddit.Controllers.Subreddit.DeleteImgAsync ( string  imgName)

Remove an image from the subreddit's custom image set asynchronously. The image will no longer count against the subreddit's image limit. However, the actual image data may still be accessible for an unspecified amount of time. If the image is currently referenced by the subreddit's stylesheet, that stylesheet will no longer validate and won't be editable until the image reference is removed.

Parameters
imgNamea valid subreddit image name

◆ GetBannedUsers() [1/2]

List<BannedUser> Reddit.Controllers.Subreddit.GetBannedUsers ( string  after = "",
string  before = "",
int  limit = 25,
string  user = "",
bool  includeCategories = false,
int  count = 0,
string  show = "all",
bool  srDetail = false 
)

Get a list of users who were banned from this subreddit.

Parameters
afterfullname of a thing
beforefullname of a thing
limitthe maximum number of items desired (default: 25, maximum: 100)
userA valid, existing reddit username
includeCategoriesboolean value
counta positive integer (default: 0)
show(optional) the string all
srDetail(optional) expand subreddits
Returns
A list of banned users.

◆ GetBannedUsers() [2/2]

List<BannedUser> Reddit.Controllers.Subreddit.GetBannedUsers ( SubredditsAboutInput  subredditsAboutInput)

Get a list of users who were banned from this subreddit.

Parameters
subredditsAboutInputA valid SubredditsAboutInput instance
Returns
A list of banned users.

◆ GetContributors() [1/2]

List<SubredditUser> Reddit.Controllers.Subreddit.GetContributors ( string  after = "",
string  before = "",
int  limit = 25,
string  user = "",
bool  includeCategories = false,
int  count = 0,
string  show = "all",
bool  srDetail = false 
)

Get the approved submitters of this subreddit.

Parameters
afterfullname of a thing
beforefullname of a thing
limitthe maximum number of items desired (default: 25, maximum: 100)
userA valid, existing reddit username
includeCategoriesboolean value
counta positive integer (default: 0)
show(optional) the string all
srDetail(optional) expand subreddits
Returns
A list of subreddit contributors.

◆ GetContributors() [2/2]

List<SubredditUser> Reddit.Controllers.Subreddit.GetContributors ( SubredditsAboutInput  subredditsAboutInput)

Get the approved submitters of this subreddit.

Parameters
subredditsAboutInputA valid SubredditsAboutInput instance
Returns
A list of subreddit contributors.

◆ GetLog() [1/2]

Things.ModActionContainer Reddit.Controllers.Subreddit.GetLog ( ModerationGetLogInput  moderationGetLogInput)

Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified.

Parameters
moderationGetLogInputA valid ModerationGetLogInput instance
Returns
A listing of recent moderation actions.

◆ GetLog() [2/2]

Things.ModActionContainer Reddit.Controllers.Subreddit.GetLog ( string  type = null,
int  limit = 25,
string  after = "",
string  before = "",
string  mod = null,
string  show = "all",
bool  srDetail = false,
int  count = 0 
)

Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified.

Parameters
typeone of (banuser, unbanuser, spamlink, removelink, approvelink, spamcomment, removecomment, approvecomment, addmoderator, invitemoderator, uninvitemoderator, acceptmoderatorinvite, removemoderator, addcontributor, removecontributor, editsettings, editflair, distinguish, marknsfw, wikibanned, wikicontributor, wikiunbanned, wikipagelisted, removewikicontributor, wikirevise, wikipermlevel, ignorereports, unignorereports, setpermissions, setsuggestedsort, sticky, unsticky, setcontestmode, unsetcontestmode, lock, unlock, muteuser, unmuteuser, createrule, editrule, deleterule, spoiler, unspoiler, modmail_enrollment, community_styling, community_widgets, markoriginalcontent)
limitthe maximum number of items desired (default: 25, maximum: 500)
afterfullname of a thing
beforefullname of a thing
mod(optional) a moderator filter
show(optional) the string all
srDetail(optional) expand subreddits
counta positive integer (default: 0)
Returns
A listing of recent moderation actions.

◆ GetModerators() [1/2]

List<Moderator> Reddit.Controllers.Subreddit.GetModerators ( string  after = "",
string  before = "",
int  limit = 25,
string  user = "",
bool  includeCategories = false,
int  count = 0,
string  show = "all",
bool  srDetail = false 
)

Get the moderators of this subreddit.

Parameters
afterfullname of a thing
beforefullname of a thing
limitthe maximum number of items desired (default: 25, maximum: 100)
userA valid, existing reddit username
includeCategoriesboolean value
counta positive integer (default: 0)
show(optional) the string all
srDetail(optional) expand subreddits
Returns
A list of subreddit moderators.

◆ GetModerators() [2/2]

List<Moderator> Reddit.Controllers.Subreddit.GetModerators ( SubredditsAboutInput  subredditsAboutInput)

Get the moderators of this subreddit.

Parameters
subredditsAboutInputA valid SubredditsAboutInput instance
Returns
A list of subreddit moderators.

◆ GetMutedUsers() [1/2]

List<SubredditUser> Reddit.Controllers.Subreddit.GetMutedUsers ( string  after = "",
string  before = "",
int  limit = 25,
string  user = "",
bool  includeCategories = false,
int  count = 0,
string  show = "all",
bool  srDetail = false 
)

Get the muted users of this subreddit.

Parameters
afterfullname of a thing
beforefullname of a thing
limitthe maximum number of items desired (default: 25, maximum: 100)
userA valid, existing reddit username
includeCategoriesboolean value
counta positive integer (default: 0)
show(optional) the string all
srDetail(optional) expand subreddits
Returns
A list of muted users.

◆ GetMutedUsers() [2/2]

List<SubredditUser> Reddit.Controllers.Subreddit.GetMutedUsers ( SubredditsAboutInput  subredditsAboutInput)

Get the muted users of this subreddit.

Parameters
subredditsAboutInputA valid SubredditsAboutInput instance
Returns
A list of muted users.

◆ GetRules()

Things.RulesContainer Reddit.Controllers.Subreddit.GetRules ( )

Get the rules for the current subreddit.

Returns
Subreddit rules.

◆ GetSettings()

Things.SubredditSettingsContainer Reddit.Controllers.Subreddit.GetSettings ( bool  created = false,
string  location = "" 
)

Get the current settings of a subreddit.

Parameters
createdone of (true, false)
location
Returns
Settings for the requested subreddit.

◆ GetSubmitText()

Things.SubredditSubmitText Reddit.Controllers.Subreddit.GetSubmitText ( )

Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form.

Returns
An object containing submission text.

◆ GetTraffic()

Things.Traffic Reddit.Controllers.Subreddit.GetTraffic ( )

Get the traffic for the current subreddit.

Returns
Subreddit traffic.

◆ LeaveContributor()

void Reddit.Controllers.Subreddit.LeaveContributor ( )

Abdicate approved submitter status in a subreddit.

◆ LeaveContributorAsync()

async Task Reddit.Controllers.Subreddit.LeaveContributorAsync ( )

Abdicate approved submitter status in a subreddit asynchronously.

◆ LeaveModerator()

void Reddit.Controllers.Subreddit.LeaveModerator ( )

Abdicate moderator status in a subreddit.

◆ LeaveModeratorAsync()

async Task Reddit.Controllers.Subreddit.LeaveModeratorAsync ( )

Abdicate moderator status in a subreddit asynchronously.

◆ LinkPost() [1/2]

LinkPost Reddit.Controllers.Subreddit.LinkPost ( string  fullname)

Create a new LinkPost object with the specified fullname attached to this subreddit.

Parameters
fullnameThe fullname of an existing LinkPost.
Returns
A new LinkPost object attached to this subreddit.

◆ LinkPost() [2/2]

LinkPost Reddit.Controllers.Subreddit.LinkPost ( string  title = null,
string  url = null,
string  author = null,
string  thumbnail = null,
int?  thumbnailHeight = null,
int?  thumbnailWidth = null,
JObject  preview = null,
string  id = null,
string  fullname = null,
string  permalink = null,
DateTime  created = default(DateTime),
DateTime  edited = default(DateTime),
int  score = 0,
int  upVotes = 0,
int  downVotes = 0,
bool  removed = false,
bool  spam = false 
)

Create a new LinkPost object attached to this subreddit.

Returns
A new LinkPost object attached to this subreddit.

◆ ModeratorInvite() [1/2]

void Reddit.Controllers.Subreddit.ModeratorInvite ( string  username,
string  permissions,
int?  duration = null 
)

Invite a user to become a moderator of this subreddit.

Parameters
usernamethe name of an existing user
permissionsA string representing the permissions being set (e.g. "+wiki")
durationan integer between 1 and 999, or null to specify permanent duration

◆ ModeratorInvite() [2/2]

void Reddit.Controllers.Subreddit.ModeratorInvite ( UsersFriendInput  usersFriendInput)

Invite a user to become a moderator of this subreddit.

Parameters
usersFriendInputA valid UsersFriendInput instance

◆ ModeratorInviteAsync() [1/2]

async Task Reddit.Controllers.Subreddit.ModeratorInviteAsync ( string  username,
string  permissions,
int?  duration = null 
)

Asynchronously invite a user to become a moderator of this subreddit.

Parameters
usernamethe name of an existing user
permissionsA string representing the permissions being set (e.g. "+wiki")
durationan integer between 1 and 999, or null to specify permanent duration

◆ ModeratorInviteAsync() [2/2]

async Task Reddit.Controllers.Subreddit.ModeratorInviteAsync ( UsersFriendInput  usersFriendInput)

Asynchronously invite a user to become a moderator of this subreddit.

Parameters
usersFriendInputA valid UsersFriendInput instance

◆ Post() [1/2]

Post Reddit.Controllers.Subreddit.Post ( )

Create a new generic Post object attached to this subreddit.

Returns
A new generic Post object attached to this subreddit.

◆ Post() [2/2]

Post Reddit.Controllers.Subreddit.Post ( string  fullname)

Create a new generic Post object with the specified fullname attached to this subreddit.

Parameters
fullnameThe fullname of an existing Post.
Returns
A new generic Post object attached to this subreddit.

◆ SavedMediaText()

Dictionary<string, string> Reddit.Controllers.Subreddit.SavedMediaText ( string  url)

Retrieve the advisory text about saving media for relevant media links. This endpoint returns a notice for display during the post submission process that is pertinent to media links.

Parameters
urla valid URL
Returns
A Reddit notice message.

◆ Search() [1/3]

List<Post> Reddit.Controllers.Subreddit.Search ( SearchGetSearchInput  searchGetSearchInput)

Search this subreddit for posts. To search across all subreddits, use RedditAPI.Search, instead.

Parameters
searchGetSearchInputA valid SearchGetSearchInput instance
Returns
A list of posts that match the search criteria.

◆ Search() [2/3]

List<Post> Reddit.Controllers.Subreddit.Search ( string  q,
SearchGetSearchInput  searchGetSearchInput = null 
)

Search this subreddit for posts. To search across all subreddits, use RedditAPI.Search, instead.

Parameters
qA valid search query
searchGetSearchInputA valid SearchGetSearchInput instance (optional)
Returns
A list of posts that match the search criteria.

◆ Search() [3/3]

List<Post> Reddit.Controllers.Subreddit.Search ( string  q = "",
bool  restrictSr = true,
string  sort = "new",
string  category = "",
bool  includeFacets = false,
string  type = null,
string  t = "all",
string  after = null,
string  before = null,
bool  includeCategories = false,
int  count = 0,
int  limit = 25,
string  show = "all",
bool  srDetail = false 
)

Search this subreddit for posts.

Parameters
qa string no longer than 512 characters
restrictSrboolean value
sortone of (relevance, hot, top, new, comments)
categorya string no longer than 5 characters
includeFacetsboolean value
type(optional) comma-delimited list of result types (sr, link, user)
tone of (hour, day, week, month, year, all)
afterfullname of a thing
beforefullname of a thing
includeCategoriesboolean value
counta positive integer (default: 0)
limitthe maximum number of items desired (default: 25, maximum: 100)
show(optional) the string all
srDetailboolean value
Returns
A list of posts that match the search criteria.

◆ SelfPost() [1/2]

SelfPost Reddit.Controllers.Subreddit.SelfPost ( string  fullname)

Create a new SelfPost object with the specified fullname attached to this subreddit.

Parameters
fullnameThe fullname of an existing SelfPost.
Returns
A new SelfPost object attached to this subreddit.

◆ SelfPost() [2/2]

SelfPost Reddit.Controllers.Subreddit.SelfPost ( string  title = null,
string  selfText = null,
string  selfTextHtml = null,
string  author = null,
string  id = null,
string  fullname = null,
string  permalink = null,
DateTime  created = default(DateTime),
DateTime  edited = default(DateTime),
int  score = 0,
int  upVotes = 0,
int  downVotes = 0,
bool  removed = false,
bool  spam = false 
)

Create a new SelfPost object attached to this subreddit.

Returns
A new SelfPost object attached to this subreddit.

◆ SetUserPermissions() [1/2]

void Reddit.Controllers.Subreddit.SetUserPermissions ( string  username,
string  permissions,
string  type 
)

Set permissions.

Parameters
usernamethe name of an existing user
permissionsA string representing the permissions being set (e.g. "+wiki")
typeA string representing the type (e.g. "moderator_invite")

◆ SetUserPermissions() [2/2]

void Reddit.Controllers.Subreddit.SetUserPermissions ( UsersSetPermissionsInput  usersSetPermissionsInput)

Set permissions.

Parameters
usersSetPermissionsInputA valid UsersSetPermissionsInput instance

◆ SetUserPermissionsAsync() [1/2]

async Task Reddit.Controllers.Subreddit.SetUserPermissionsAsync ( string  username,
string  permissions,
string  type 
)

Set permissions asynchronously.

Parameters
usernamethe name of an existing user
permissionsA string representing the permissions being set (e.g. "+wiki")
typeA string representing the type (e.g. "moderator_invite")

◆ SetUserPermissionsAsync() [2/2]

async Task Reddit.Controllers.Subreddit.SetUserPermissionsAsync ( UsersSetPermissionsInput  usersSetPermissionsInput)

Set permissions asynchronously.

Parameters
usersSetPermissionsInputA valid UsersSetPermissionsInput instance

◆ Stylesheet()

string Reddit.Controllers.Subreddit.Stylesheet ( )

Redirect to the subreddit's stylesheet if one exists.

Returns
The subreddit's CSS.

◆ Subscribe()

void Reddit.Controllers.Subreddit.Subscribe ( bool  skipInitialDefaults = false)

Subscribe to a subreddit.

Parameters
skipInitialDefaultsboolean value

◆ SubscribeAsync()

async Task Reddit.Controllers.Subreddit.SubscribeAsync ( bool  skipInitialDefaults = false)

Subscribe to a subreddit asynchronously.

Parameters
skipInitialDefaultsboolean value

◆ Unsubscribe()

void Reddit.Controllers.Subreddit.Unsubscribe ( )

Unsubscribe from a subreddit.

◆ UnsubscribeAsync()

async Task Reddit.Controllers.Subreddit.UnsubscribeAsync ( )

Unsubscribe from a subreddit asynchronously.

◆ Update() [1/2]

Subreddit Reddit.Controllers.Subreddit.Update ( bool  manualUpdate = false,
bool?  allOriginalContent = null,
bool?  allowDiscovery = null,
bool?  allowImages = null,
bool?  allowPostCrossposts = null,
bool?  allowTop = null,
bool?  allowVideos = null,
bool?  collapseDeletedComments = null,
string  description = null,
bool?  excludeBannedModqueue = null,
bool?  freeFormReports = null,
string  gRecaptchaResponse = null,
string  headerTitle = null,
bool?  hideAds = null,
string  keyColor = null,
string  lang = null,
string  linkType = null,
string  name = null,
bool?  originalContentTagEnabled = null,
bool?  over18 = null,
string  publicDescription = null,
bool?  showMedia = null,
bool?  showMediaPreview = null,
string  spamComments = null,
string  spamLinks = null,
string  spamSelfPosts = null,
bool?  spoilersEnabled = null,
string  sr = null,
string  submitLinkLabel = null,
string  submitText = null,
string  submitTextLabel = null,
string  suggestedCommentSort = null,
string  themeSr = null,
bool?  themeSrUpdate = null,
string  title = null,
string  type = null,
string  wikiMode = null,
int?  commentScoreHideMins = null,
int?  wikiEditAge = null,
int?  wikiEditKarma = null 
)

Update an existing subreddit.

Parameters
manualUpdateif true, only the values explicitly passed to this method will be updated (default: false)
allOriginalContentboolean value
allowDiscoveryboolean value
allowImagesboolean value
allowPostCrosspostsboolean value
allowTopboolean value
allowVideosboolean value
collapseDeletedCommentsboolean value
descriptionraw markdown text
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
headerTitlea string no longer than 500 characters
hideAdsboolean value
keyColora 6-digit rgb hex color, e.g. #AABBCC
langa valid IETF language tag (underscore separated)
linkTypeone of (any, link, self)
namesubreddit name
originalContentTagEnabledboolean value
over18boolean value
publicDescriptionraw markdown text
showMediaboolean value
showMediaPreviewboolean value
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
spoilersEnabledboolean value
srfullname of a thing
submitLinkLabela string no longer than 60 characters
submitTextraw markdown text
submitTextLabela string no longer than 60 characters
suggestedCommentSortone of (confidence, top, new, controversial, old, random, qa, live)
themeSrsubreddit name
themeSrUpdateboolean value
titlea string no longer than 100 characters
typeone of (gold_restricted, archived, restricted, employees_only, gold_only, private, user, public)
wikiModeone of (disabled, modonly, anyone)
commentScoreHideMinsan integer between 0 and 1440 (default: 0)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ Update() [2/2]

Subreddit Reddit.Controllers.Subreddit.Update ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Update an existing subreddit.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle
Returns
An instance of this class populated with the newly created or updated subreddit.

◆ UpdateAsync() [1/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.UpdateAsync ( bool  manualUpdate = false,
bool?  allOriginalContent = null,
bool?  allowDiscovery = null,
bool?  allowImages = null,
bool?  allowPostCrossposts = null,
bool?  allowTop = null,
bool?  allowVideos = null,
bool?  collapseDeletedComments = null,
string  description = null,
bool?  excludeBannedModqueue = null,
bool?  freeFormReports = null,
string  gRecaptchaResponse = null,
string  headerTitle = null,
bool?  hideAds = null,
string  keyColor = null,
string  lang = null,
string  linkType = null,
string  name = null,
bool?  originalContentTagEnabled = null,
bool?  over18 = null,
string  publicDescription = null,
bool?  showMedia = null,
bool?  showMediaPreview = null,
string  spamComments = null,
string  spamLinks = null,
string  spamSelfPosts = null,
bool?  spoilersEnabled = null,
string  sr = null,
string  submitLinkLabel = null,
string  submitText = null,
string  submitTextLabel = null,
string  suggestedCommentSort = null,
string  themeSr = null,
bool?  themeSrUpdate = null,
string  title = null,
string  type = null,
string  wikiMode = null,
int?  commentScoreHideMins = null,
int?  wikiEditAge = null,
int?  wikiEditKarma = null 
)

Update an existing subreddit asynchronously.

Parameters
manualUpdateif true, only the values explicitly passed to this method will be updated (default: false)
allOriginalContentboolean value
allowDiscoveryboolean value
allowImagesboolean value
allowPostCrosspostsboolean value
allowTopboolean value
allowVideosboolean value
collapseDeletedCommentsboolean value
descriptionraw markdown text
excludeBannedModqueueboolean value
freeFormReportsboolean value
gRecaptchaResponse
headerTitlea string no longer than 500 characters
hideAdsboolean value
keyColora 6-digit rgb hex color, e.g. #AABBCC
langa valid IETF language tag (underscore separated)
linkTypeone of (any, link, self)
namesubreddit name
originalContentTagEnabledboolean value
over18boolean value
publicDescriptionraw markdown text
showMediaboolean value
showMediaPreviewboolean value
spamCommentsone of (low, high, all)
spamLinksone of (low, high, all)
spamSelfPostsone of (low, high, all)
spoilersEnabledboolean value
srfullname of a thing
submitLinkLabela string no longer than 60 characters
submitTextraw markdown text
submitTextLabela string no longer than 60 characters
suggestedCommentSortone of (confidence, top, new, controversial, old, random, qa, live)
themeSrsubreddit name
themeSrUpdateboolean value
titlea string no longer than 100 characters
typeone of (gold_restricted, archived, restricted, employees_only, gold_only, private, user, public)
wikiModeone of (disabled, modonly, anyone)
commentScoreHideMinsan integer between 0 and 1440 (default: 0)
wikiEditAgean integer between 0 and 36600 (default: 0)
wikiEditKarmaan integer between 0 and 1000000000 (default: 0)

◆ UpdateAsync() [2/2]

async Task<Subreddit> Reddit.Controllers.Subreddit.UpdateAsync ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = "",
string  headerTitle = "" 
)

Update an existing subreddit asynchronously.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitle

◆ UpdateStylesheet()

void Reddit.Controllers.Subreddit.UpdateStylesheet ( string  reason,
string  stylesheetContents 
)

Update a subreddit's stylesheet.

Parameters
reasona string up to 256 characters long, consisting of printable characters
stylesheetContentsthe new stylesheet content

◆ UpdateStylesheetAsync()

async Task Reddit.Controllers.Subreddit.UpdateStylesheetAsync ( string  reason,
string  stylesheetContents 
)

Update a subreddit's stylesheet asynchronously.

Parameters
reasona string up to 256 characters long, consisting of printable characters
stylesheetContentsthe new stylesheet content

◆ UploadBanner()

Things.ImageUploadResult Reddit.Controllers.Subreddit.UploadBanner ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace a subreddit mobile banner image.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)
Returns
An object containing the resulting image URL and any errors.

◆ UploadBannerAsync()

async Task<Things.ImageUploadResult> Reddit.Controllers.Subreddit.UploadBannerAsync ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace a subreddit mobile banner image asynchronously.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)

◆ UploadHeader()

Things.ImageUploadResult Reddit.Controllers.Subreddit.UploadHeader ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace the subreddit logo image.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)
Returns
An object containing the resulting image URL and any errors.

◆ UploadHeaderAsync()

async Task<Things.ImageUploadResult> Reddit.Controllers.Subreddit.UploadHeaderAsync ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace the subreddit logo image asynchronously.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)

◆ UploadIcon()

Things.ImageUploadResult Reddit.Controllers.Subreddit.UploadIcon ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace a subreddit mobile icon image.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)
Returns
An object containing the resulting image URL and any errors.

◆ UploadIconAsync()

async Task<Things.ImageUploadResult> Reddit.Controllers.Subreddit.UploadIconAsync ( byte[]  imgData,
string  imgType = "png" 
)

Add or replace a subreddit mobile icon image asynchronously.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgTypeone of png or jpg (default: png)

◆ UploadImg()

Things.ImageUploadResult Reddit.Controllers.Subreddit.UploadImg ( byte[]  imgData,
string  imgName,
string  imgType = "png" 
)

Add or replace a subreddit stylesheet image.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgNamea valid subreddit image name
imgTypeone of png or jpg (default: png)
Returns
An object containing the resulting image URL and any errors.

◆ UploadImgAsync()

async Task<Things.ImageUploadResult> Reddit.Controllers.Subreddit.UploadImgAsync ( byte[]  imgData,
string  imgName,
string  imgType = "png" 
)

Add or replace a subreddit stylesheet image asynchronously.

Parameters
imgDatafile upload with maximum size of 500 KiB
imgNamea valid subreddit image name
imgTypeone of png or jpg (default: png)

Property Documentation

◆ ActiveUserCount

int???? Reddit.Controllers.Subreddit.ActiveUserCount
getset

The active user count.

◆ AllowDiscovery

bool?? Reddit.Controllers.Subreddit.AllowDiscovery
getset

Whether to allow discovery.

◆ AllowImages

bool?? Reddit.Controllers.Subreddit.AllowImages
getset

Whether to allow images.

◆ AllowVideoGifs

bool? Reddit.Controllers.Subreddit.AllowVideoGifs
getset

Whether to allow video GIFs.

◆ AllowVideos

bool? Reddit.Controllers.Subreddit.AllowVideos
getset

Whether to allow videos.

◆ BannerBackgroundColor

string? Reddit.Controllers.Subreddit.BannerBackgroundColor
getset

The banner background color.

◆ BannerBackgroundImage

string? Reddit.Controllers.Subreddit.BannerBackgroundImage
getset

The banner background image URL.

◆ BannerImg

string? Reddit.Controllers.Subreddit.BannerImg
getset

The banner image URL.

◆ CanAssignLinkFlair

bool? Reddit.Controllers.Subreddit.CanAssignLinkFlair
getset

Whether link flair can be assigned.

◆ CanAssignUserFlair

bool? Reddit.Controllers.Subreddit.CanAssignUserFlair
getset

Whether user flair can be assigned.

◆ CollapseDeletedComments

bool?? Reddit.Controllers.Subreddit.CollapseDeletedComments
getset

Whether to collapse deleted comments.

◆ Comments

Comments Reddit.Controllers.Subreddit.Comments
getset

Comments belonging to this subreddit.

◆ CommentScoreHideMins

int?? Reddit.Controllers.Subreddit.CommentScoreHideMins
getset

How many minutes to hide comment scores.

◆ CommunityIcon

string? Reddit.Controllers.Subreddit.CommunityIcon
getset

The community icon URL.

◆ Created

DateTime? Reddit.Controllers.Subreddit.Created
getset

When the subreddit was created.

◆ Description

string? Reddit.Controllers.Subreddit.Description
getset

The subreddit description.

◆ EmojisEnabled

bool? Reddit.Controllers.Subreddit.EmojisEnabled
getset

Whether emojis are enabled.

◆ Flairs

Flairs Reddit.Controllers.Subreddit.Flairs
getset

Flairs belonging to this subreddit.

◆ Fullname

string? Reddit.Controllers.Subreddit.Fullname
getset

The subreddit fullname.

◆ HeaderImg

byte []? Reddit.Controllers.Subreddit.HeaderImg
getset

The header image.

◆ HeaderTitle

string? Reddit.Controllers.Subreddit.HeaderTitle
getset

The header title.

◆ IconImg

byte []? Reddit.Controllers.Subreddit.IconImg
getset

The icon image.

◆ Id

string? Reddit.Controllers.Subreddit.Id
getset

The ID36 of this subreddit.

◆ KeyColor

string? Reddit.Controllers.Subreddit.KeyColor
getset

The key color.

◆ Lang

string? Reddit.Controllers.Subreddit.Lang
getset

The language.

◆ LinkFlairEnabled

bool?? Reddit.Controllers.Subreddit.LinkFlairEnabled
getset

Whether link flair is enabled.

◆ Moderators

List<Moderator>? Reddit.Controllers.Subreddit.Moderators
getset

Get the moderators of this subreddit.

◆ Name

string? Reddit.Controllers.Subreddit.Name
getset

The subreddit name.

◆ Over18

bool?? Reddit.Controllers.Subreddit.Over18
getset

Whether you have to be over 18 to view this subreddit.

◆ Posts

SubredditPosts Reddit.Controllers.Subreddit.Posts
getset

Posts belonging to this subreddit.

◆ PrimaryColor

string? Reddit.Controllers.Subreddit.PrimaryColor
getset

The primary color.

◆ ShowMedia

bool?? Reddit.Controllers.Subreddit.ShowMedia
getset

Whether to show media.

◆ ShowMediaPreview

bool?? Reddit.Controllers.Subreddit.ShowMediaPreview
getset

Whether to show media previews.

◆ Sidebar

string? Reddit.Controllers.Subreddit.Sidebar
getset

The sidebar text.

◆ SpoilersEnabled

bool?? Reddit.Controllers.Subreddit.SpoilersEnabled
getset

Whether spoilers are enabled.

◆ SubmissionType

string? Reddit.Controllers.Subreddit.SubmissionType
getset

The submission type.

◆ SubmitLinkLabel

string? Reddit.Controllers.Subreddit.SubmitLinkLabel
getset

The submit link label.

◆ SubmitText

Things.SubredditSubmitText? Reddit.Controllers.Subreddit.SubmitText
getset

Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form.

◆ SubmitTextLabel

string? Reddit.Controllers.Subreddit.SubmitTextLabel
getset

The submit text label.

◆ SubredditData

Things.Subreddit Reddit.Controllers.Subreddit.SubredditData
get

Full subreddit data retrieved from the API.

◆ SubredditType

string? Reddit.Controllers.Subreddit.SubredditType
getset

The subreddit type (public, restricted, or private)

◆ Subscribers

int?? Reddit.Controllers.Subreddit.Subscribers
getset

The number of subscribers.

◆ SuggestedCommentSort

string? Reddit.Controllers.Subreddit.SuggestedCommentSort
getset

The suggested comment sort for this subreddit.

◆ Title

string? Reddit.Controllers.Subreddit.Title
getset

The subreddit title.

◆ URL

string? Reddit.Controllers.Subreddit.URL
getset

The URL.

◆ Wiki

Wiki Reddit.Controllers.Subreddit.Wiki
getset

The subreddit wiki controller.

◆ WikiEnabled

bool? Reddit.Controllers.Subreddit.WikiEnabled
getset

Whether the wiki is enabled for this subreddit.


The documentation for this class was generated from the following file: