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.Models.Subreddits Class Reference
Inheritance diagram for Reddit.Models.Subreddits:
Reddit.Models.BaseModel Reddit.Models.Internal.Request

Public Member Functions

 Subreddits (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
DynamicShortListingContainer About (string where, SubredditsAboutInput subredditsAboutInput, string subreddit=null)
 This endpoint is a listing. More...
 
SubredditChild About (string subreddit)
 Return information about the subreddit. Data includes the subscriber count, description, and header image. More...
 
GenericContainer DeleteSrBanner (string subreddit=null)
 Remove the subreddit's custom mobile banner. See also: /api/upload_sr_img. More...
 
async Task< GenericContainerDeleteSrBannerAsync (string subreddit=null)
 Remove the subreddit's custom mobile banner asynchronously. See also: /api/upload_sr_img. More...
 
GenericContainer DeleteSrHeader (string subreddit=null)
 Remove the subreddit's custom header image. The sitewide-default header image will be shown again after this call. See also: /api/upload_sr_img. More...
 
async Task< GenericContainerDeleteSrHeaderAsync (string subreddit=null)
 Remove the subreddit's custom header image asynchronously. The sitewide-default header image will be shown again after this call. See also: /api/upload_sr_img. More...
 
GenericContainer DeleteSrIcon (string subreddit=null)
 Remove the subreddit's custom mobile icon. See also: /api/upload_sr_img. More...
 
async Task< GenericContainerDeleteSrIconAsync (string subreddit=null)
 Remove the subreddit's custom mobile icon asynchronously. See also: /api/upload_sr_img. More...
 
GenericContainer DeleteSrImg (SubredditsDeleteSrImgInput subredditsDeleteSrImgInput, string subreddit=null)
 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. See also: /api/upload_sr_img. More...
 
async Task< GenericContainerDeleteSrImgAsync (SubredditsDeleteSrImgInput subredditsDeleteSrImgInput, string subreddit=null)
 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. See also: /api/upload_sr_img. More...
 
IEnumerable< SubredditRecommendationsRecommended (string srNames, SubredditsRecommendInput subredditsRecommendInput)
 Return subreddits recommended for the given subreddit(s). Gets a list of subreddits recommended for srnames, filtering out any that appear in the optional omit param. More...
 
SubredditNames SearchRedditNames (SubredditsSearchNamesInput subredditsSearchInput)
 List subreddit names that begin with a query string. More...
 
SubSearch SearchSubreddits (SubredditsSearchNamesInput subredditsSearchInput)
 List subreddits that begin with a query string. More...
 
GenericContainer SiteAdmin (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse=null, string headerTitle=null)
 Create or configure a subreddit. Null values are ignored. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json. More...
 
async Task< GenericContainerSiteAdminAsync (SubredditsSiteAdminInput subredditsSiteAdminInput, string gRecaptchaResponse=null, string headerTitle=null)
 Create or configure a subreddit asynchronously. Null values are ignored. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json. More...
 
GenericContainer SiteAdmin (Subreddit subreddit, bool? allowPostCrossposts=null, bool? allowTop=null, bool? excludeBannedModqueue=null, bool? freeFormReports=null, string gRecaptchaResponse=null, string linkType=null, string spamComments=null, string spamLinks=null, string spamSelfPosts=null, string sr=null, string themeSr=null, bool? themeSrUpdate=null, string wikiMode=null, int? wikiEditAge=null, int? wikiEditKarma=null)
 Create or configure a subreddit. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json. More...
 
async Task< GenericContainerSiteAdminAsync (Subreddit subreddit, bool? allowPostCrossposts=null, bool? allowTop=null, bool? excludeBannedModqueue=null, bool? freeFormReports=null, string gRecaptchaResponse=null, string linkType=null, string spamComments=null, string spamLinks=null, string spamSelfPosts=null, string sr=null, string themeSr=null, bool? themeSrUpdate=null, string wikiMode=null, int? wikiEditAge=null, int? wikiEditKarma=null)
 Create or configure a subreddit asynchronously. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json. More...
 
SubredditSubmitText SubmitText (string subreddit=null)
 Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form. See also: /api/site_admin. More...
 
SubredditAutocompleteResultContainer SubredditAutocomplete (SubredditsAutocompleteInput subredditsAutocompleteInput)
 Return a list of subreddits and data for subreddits whose names start with 'query'. Uses typeahead endpoint to recieve the list of subreddits names. Typeahead provides exact matches, typo correction, fuzzy matching and boosts subreddits to the top that the user is subscribed to. More...
 
SubredditContainer SubredditAutocompleteV2 (SubredditsAutocompleteV2Input subredditsAutocompleteV2Input)
 Version 2 of SubredditAutocomplete. More...
 
GenericContainer SubredditStylesheet (SubredditsSubredditStylesheetInput subredditsSubredditStylesheetInput, string subreddit=null)
 Update a subreddit's stylesheet. op should be save to update the contents of the stylesheet. More...
 
async Task< GenericContainerSubredditStylesheetAsync (SubredditsSubredditStylesheetInput subredditsSubredditStylesheetInput, string subreddit=null)
 Update a subreddit's stylesheet asynchronously. op should be save to update the contents of the stylesheet. More...
 
void SubscribeByFullname (SubredditsSubByFullnameInput subredditsSubByFullnameInput)
 Subscribe to or unsubscribe from a subreddit. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/. More...
 
async Task SubscribeByFullnameAsync (SubredditsSubByFullnameInput subredditsSubByFullnameInput)
 Subscribe to or unsubscribe from a subreddit asynchronously. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/. More...
 
void Subscribe (SubredditsSubByNameInput subredditsSubByNameInput)
 Subscribe to or unsubscribe from a subreddit. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/. More...
 
async Task SubscribeAsync (SubredditsSubByNameInput subredditsSubByNameInput)
 Subscribe to or unsubscribe from a subreddit asynchronously. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/. More...
 
ImageUploadResult UploadSrImg (SubredditsUploadSrImgInput subredditsUploadSrImgInput, string subreddit=null)
 Add or replace a subreddit image, custom header logo, custom mobile icon, or custom mobile banner. If the upload_type value is img, an image for use in the subreddit stylesheet is uploaded with the name specified in name. If the upload_type value is header then the image uploaded will be the subreddit's new logo and name will be ignored. If the upload_type value is icon then the image uploaded will be the subreddit's new mobile icon and name will be ignored. If the upload_type value is banner then the image uploaded will be the subreddit's new mobile banner and name will be ignored. For backwards compatibility, if upload_type is not specified, the header field will be used instead: If the header field has value 0, then upload_type is img. If the header field has value 1, then upload_type is header. The img_type field specifies whether to store the uploaded image as a PNG or JPEG. Subreddits have a limited number of images that can be in use at any given time. If no image with the specified name already exists, one of the slots will be consumed If an image with the specified name already exists, it will be replaced. This does not affect the stylesheet immediately, but will take effect the next time the stylesheet is saved. See also: /api/delete_sr_img, /api/delete_sr_header, /api/delete_sr_icon, and /api/delete_sr_banner. More...
 
async Task< ImageUploadResultUploadSrImgAsync (SubredditsUploadSrImgInput subredditsUploadSrImgInput, string subreddit=null)
 Add or replace a subreddit image, custom header logo, custom mobile icon, or custom mobile banner asynchronously. If the upload_type value is img, an image for use in the subreddit stylesheet is uploaded with the name specified in name. If the upload_type value is header then the image uploaded will be the subreddit's new logo and name will be ignored. If the upload_type value is icon then the image uploaded will be the subreddit's new mobile icon and name will be ignored. If the upload_type value is banner then the image uploaded will be the subreddit's new mobile banner and name will be ignored. For backwards compatibility, if upload_type is not specified, the header field will be used instead: If the header field has value 0, then upload_type is img. If the header field has value 1, then upload_type is header. The img_type field specifies whether to store the uploaded image as a PNG or JPEG. Subreddits have a limited number of images that can be in use at any given time. If no image with the specified name already exists, one of the slots will be consumed If an image with the specified name already exists, it will be replaced. This does not affect the stylesheet immediately, but will take effect the next time the stylesheet is saved. See also: /api/delete_sr_img, /api/delete_sr_header, /api/delete_sr_icon, and /api/delete_sr_banner. More...
 
object SearchProfiles (SubredditsSearchProfilesInput subredditsSearchProfilesInput)
 Search user profiles by title and description. This endpoint is a listing. More...
 
SubredditSettingsContainer Edit (string subreddit, SubredditsEditInput subredditsEditInput)
 Get the current settings of a subreddit. This returns the current settings of the subreddit as used by /api/site_admin. More...
 
RulesContainer Rules (string subreddit)
 Get the rules for the current subreddit. More...
 
Traffic Traffic (string subreddit)
 Get subreddit traffic. More...
 
object Sidebar (string subreddit=null)
 
object Sticky (string subreddit=null, int num=1)
 
SubredditContainer Mine (string where, CategorizedSrListingInput categorizedSrListingInput)
 Get subreddits the user has a relationship with. The where parameter chooses which subreddits are returned as follows: subscriber - subreddits the user is subscribed to contributor - subreddits the user is an approved submitter in moderator - subreddits the user is a moderator of streams - subscribed to subreddits that contain hosted video links See also: /api/subscribe, /api/friend, and /api/accept_moderator_invite. This endpoint is a listing. More...
 
SubredditContainer Search (SubredditsSearchInput subredditsSearchInput)
 Search subreddits by title and description. This endpoint is a listing. More...
 
Search< T > (SubredditsSearchInput subredditsSearchInput)
 Search subreddits by title and description. This endpoint is a listing. More...
 
SubredditContainer Get (string where, CategorizedSrListingInput categorizedSrListingInput)
 Get all subreddits. The where parameter chooses the order in which the subreddits are displayed. popular sorts on the activity of the subreddit and the position of the subreddits can shift around. new sorts the subreddits based on their creation date, newest first. This endpoint is a listing. More...
 
SubredditContainer GetUserSubreddits (string where, CategorizedSrListingInput categorizedSrListingInput)
 Get all user subreddits. The where parameter chooses the order in which the subreddits are displayed. popular sorts on the activity of the subreddit and the position of the subreddits can shift around. new sorts the user subreddits based on their creation date, newest first. This endpoint is a listing. More...
 
- Public Member Functions inherited from Reddit.Models.BaseModel
 BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
string Sr (string subreddit)
 
- Public Member Functions inherited from Reddit.Models.Internal.Request
 Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
SendRequest< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
async Task< T > SendRequestAsync< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareIDRequest (string path, string id, Method method=Method.POST)
 
RestRequest PrepareJSONRequest (string path, Method method=Method.POST)
 
RestRequest PrepareRequest (string url, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareRequest (string url, Method method, List< Parameter > parameters, List< FileParameter > files, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareRequest (RestRequest restRequest, string contentType="application/x-www-form-urlencoded")
 
string GetVersion ()
 
string ExecuteRequest (string url, Method method=Method.GET)
 
async Task< string > ExecuteRequestAsync (string url, Method method=Method.GET)
 
string ExecuteRequest (RestRequest restRequest)
 
async Task< string > ExecuteRequestAsync (RestRequest restRequest)
 
void UpdateAccessToken (string accessToken)
 
void UpdateRequests (List< DateTime > requests)
 
void AddParamIfNotNull (string name, dynamic value, ref RestRequest restRequest)
 

Additional Inherited Members

- Protected Member Functions inherited from Reddit.Models.Internal.Request
virtual void OnTokenUpdated (TokenUpdateEventArgs e)
 
virtual void OnRequestsUpdated (RequestsUpdateEventArgs e)
 
- Events inherited from Reddit.Models.Internal.Request
EventHandler< TokenUpdateEventArgsTokenUpdated
 
EventHandler< RequestsUpdateEventArgsRequestsUpdated
 

Constructor & Destructor Documentation

◆ Subreddits()

Reddit.Models.Subreddits.Subreddits ( string  appId,
string  appSecret,
string  refreshToken,
string  accessToken,
ref RestClient  restClient,
string  deviceId = null,
string  userAgent = null 
)

Member Function Documentation

◆ About() [1/2]

SubredditChild Reddit.Models.Subreddits.About ( string  subreddit)

Return information about the subreddit. Data includes the subscriber count, description, and header image.

Parameters
subredditThe subreddit being queried
Returns
A subreddit listing.

◆ About() [2/2]

DynamicShortListingContainer Reddit.Models.Subreddits.About ( string  where,
SubredditsAboutInput  subredditsAboutInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
whereOne of (banned, muted, wikibanned, contributors, wikicontributors, moderators)
subredditsAboutInputA valid SubredditsAboutInput instance
subredditThe subreddit being queried
Returns
An object containing the requested data.

◆ DeleteSrBanner()

GenericContainer Reddit.Models.Subreddits.DeleteSrBanner ( string  subreddit = null)

Remove the subreddit's custom mobile banner. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrBannerAsync()

async Task<GenericContainer> Reddit.Models.Subreddits.DeleteSrBannerAsync ( string  subreddit = null)

Remove the subreddit's custom mobile banner asynchronously. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrHeader()

GenericContainer Reddit.Models.Subreddits.DeleteSrHeader ( string  subreddit = null)

Remove the subreddit's custom header image. The sitewide-default header image will be shown again after this call. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrHeaderAsync()

async Task<GenericContainer> Reddit.Models.Subreddits.DeleteSrHeaderAsync ( string  subreddit = null)

Remove the subreddit's custom header image asynchronously. The sitewide-default header image will be shown again after this call. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrIcon()

GenericContainer Reddit.Models.Subreddits.DeleteSrIcon ( string  subreddit = null)

Remove the subreddit's custom mobile icon. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrIconAsync()

async Task<GenericContainer> Reddit.Models.Subreddits.DeleteSrIconAsync ( string  subreddit = null)

Remove the subreddit's custom mobile icon asynchronously. See also: /api/upload_sr_img.

Parameters
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrImg()

GenericContainer Reddit.Models.Subreddits.DeleteSrImg ( SubredditsDeleteSrImgInput  subredditsDeleteSrImgInput,
string  subreddit = null 
)

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. See also: /api/upload_sr_img.

Parameters
subredditsDeleteSrImgInputA valid SubredditsDeleteSrImgInput instance
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ DeleteSrImgAsync()

async Task<GenericContainer> Reddit.Models.Subreddits.DeleteSrImgAsync ( SubredditsDeleteSrImgInput  subredditsDeleteSrImgInput,
string  subreddit = null 
)

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. See also: /api/upload_sr_img.

Parameters
subredditsDeleteSrImgInputA valid SubredditsDeleteSrImgInput instance
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ Edit()

SubredditSettingsContainer Reddit.Models.Subreddits.Edit ( string  subreddit,
SubredditsEditInput  subredditsEditInput 
)

Get the current settings of a subreddit. This returns the current settings of the subreddit as used by /api/site_admin.

Parameters
subredditThe subreddit being queried
subredditsEditInputA valid SubredditsEditInput instance
Returns
Settings for the requested subreddit.

◆ Get()

SubredditContainer Reddit.Models.Subreddits.Get ( string  where,
CategorizedSrListingInput  categorizedSrListingInput 
)

Get all subreddits. The where parameter chooses the order in which the subreddits are displayed. popular sorts on the activity of the subreddit and the position of the subreddits can shift around. new sorts the subreddits based on their creation date, newest first. This endpoint is a listing.

Parameters
whereOne of (popular, new, gold, default)
categorizedSrListingInputA valid CategorizedSrListingInput instance
Returns
List of subreddit objects.

◆ GetUserSubreddits()

SubredditContainer Reddit.Models.Subreddits.GetUserSubreddits ( string  where,
CategorizedSrListingInput  categorizedSrListingInput 
)

Get all user subreddits. The where parameter chooses the order in which the subreddits are displayed. popular sorts on the activity of the subreddit and the position of the subreddits can shift around. new sorts the user subreddits based on their creation date, newest first. This endpoint is a listing.

Parameters
whereOne of (popular, new)
categorizedSrListingInputA valid CategorizedSrListingInput instance
Returns
List of subreddit objects.

◆ Mine()

SubredditContainer Reddit.Models.Subreddits.Mine ( string  where,
CategorizedSrListingInput  categorizedSrListingInput 
)

Get subreddits the user has a relationship with. The where parameter chooses which subreddits are returned as follows: subscriber - subreddits the user is subscribed to contributor - subreddits the user is an approved submitter in moderator - subreddits the user is a moderator of streams - subscribed to subreddits that contain hosted video links See also: /api/subscribe, /api/friend, and /api/accept_moderator_invite. This endpoint is a listing.

Parameters
whereOne of (subscriber, contributor, moderator, streams)
categorizedSrListingInputA valid CategorizedSrListingInput instance
Returns
List of subreddit objects.

◆ Recommended()

IEnumerable<SubredditRecommendations> Reddit.Models.Subreddits.Recommended ( string  srNames,
SubredditsRecommendInput  subredditsRecommendInput 
)

Return subreddits recommended for the given subreddit(s). Gets a list of subreddits recommended for srnames, filtering out any that appear in the optional omit param.

Parameters
srNamescomma-delimited list of subreddit names
omitcomma-delimited list of subreddit names
over18boolean value
Returns
A list of subreddits.

◆ Rules()

RulesContainer Reddit.Models.Subreddits.Rules ( string  subreddit)

Get the rules for the current subreddit.

Parameters
subredditThe subreddit being queried
Returns
Subreddit rules.

◆ Search()

SubredditContainer Reddit.Models.Subreddits.Search ( SubredditsSearchInput  subredditsSearchInput)

Search subreddits by title and description. This endpoint is a listing.

Parameters
subredditsSearchInputA valid SubredditsSearchInput instance
Returns
List of subreddit objects.

◆ Search< T >()

T Reddit.Models.Subreddits.Search< T > ( SubredditsSearchInput  subredditsSearchInput)

Search subreddits by title and description. This endpoint is a listing.

Parameters
subredditsSearchInputA valid SubredditsSearchInput instance
Returns
Results of the specified type.

◆ SearchProfiles()

object Reddit.Models.Subreddits.SearchProfiles ( SubredditsSearchProfilesInput  subredditsSearchProfilesInput)

Search user profiles by title and description. This endpoint is a listing.

Parameters
subredditsSearchProfilesInputA valid SubredditsSearchProfilesInput instance
Returns
(TODO - Untested)

◆ SearchRedditNames()

SubredditNames Reddit.Models.Subreddits.SearchRedditNames ( SubredditsSearchNamesInput  subredditsSearchInput)

List subreddit names that begin with a query string.

Parameters
subredditsSearchInputA valid SubredditsSearchInput instance
Returns
A list of subreddit names.

◆ SearchSubreddits()

SubSearch Reddit.Models.Subreddits.SearchSubreddits ( SubredditsSearchNamesInput  subredditsSearchInput)

List subreddits that begin with a query string.

Parameters
subredditsSearchInputA valid SubredditsSearchInput instance
Returns
A list of subreddit listings.

◆ Sidebar()

object Reddit.Models.Subreddits.Sidebar ( string  subreddit = null)

◆ SiteAdmin() [1/2]

GenericContainer Reddit.Models.Subreddits.SiteAdmin ( Subreddit  subreddit,
bool?  allowPostCrossposts = null,
bool?  allowTop = null,
bool?  excludeBannedModqueue = null,
bool?  freeFormReports = null,
string  gRecaptchaResponse = null,
string  linkType = null,
string  spamComments = null,
string  spamLinks = null,
string  spamSelfPosts = null,
string  sr = null,
string  themeSr = null,
bool?  themeSrUpdate = null,
string  wikiMode = null,
int?  wikiEditAge = null,
int?  wikiEditKarma = null 
)

Create or configure a subreddit. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json.

Parameters
subredditA valid subreddit object.
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)
srfullname of a thing
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 object indicating any errors.

◆ SiteAdmin() [2/2]

GenericContainer Reddit.Models.Subreddits.SiteAdmin ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = null,
string  headerTitle = null 
)

Create or configure a subreddit. Null values are ignored. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitlea string no longer than 500 characters
Returns
An object indicating any errors.

◆ SiteAdminAsync() [1/2]

async Task<GenericContainer> Reddit.Models.Subreddits.SiteAdminAsync ( Subreddit  subreddit,
bool?  allowPostCrossposts = null,
bool?  allowTop = null,
bool?  excludeBannedModqueue = null,
bool?  freeFormReports = null,
string  gRecaptchaResponse = null,
string  linkType = null,
string  spamComments = null,
string  spamLinks = null,
string  spamSelfPosts = null,
string  sr = null,
string  themeSr = null,
bool?  themeSrUpdate = null,
string  wikiMode = null,
int?  wikiEditAge = null,
int?  wikiEditKarma = null 
)

Create or configure a subreddit asynchronously. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json.

Parameters
subredditA valid subreddit object.
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)
srfullname of a thing
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 object indicating any errors.

◆ SiteAdminAsync() [2/2]

async Task<GenericContainer> Reddit.Models.Subreddits.SiteAdminAsync ( SubredditsSiteAdminInput  subredditsSiteAdminInput,
string  gRecaptchaResponse = null,
string  headerTitle = null 
)

Create or configure a subreddit asynchronously. Null values are ignored. If sr is specified, the request will attempt to modify the specified subreddit. If not, a subreddit with name name will be created. This endpoint expects all values to be supplied on every request. If modifying a subset of options, it may be useful to get the current settings from /about/edit.json first. For backwards compatibility, description is the sidebar text and public_description is the publicly visible subreddit description. Most of the parameters for this endpoint are identical to options visible in the user interface and their meanings are best explained there. See also: /about/edit.json.

Parameters
subredditsSiteAdminInputA valid SubredditsSiteAdminInput instance
gRecaptchaResponse
headerTitlea string no longer than 500 characters
Returns
An object indicating any errors.

◆ Sticky()

object Reddit.Models.Subreddits.Sticky ( string  subreddit = null,
int  num = 1 
)

◆ SubmitText()

SubredditSubmitText Reddit.Models.Subreddits.SubmitText ( string  subreddit = null)

Get the submission text for the subreddit. This text is set by the subreddit moderators and intended to be displayed on the submission form. See also: /api/site_admin.

Parameters
subredditThe subreddit being queried
Returns
An object containing submission text.

◆ SubredditAutocomplete()

SubredditAutocompleteResultContainer Reddit.Models.Subreddits.SubredditAutocomplete ( SubredditsAutocompleteInput  subredditsAutocompleteInput)

Return a list of subreddits and data for subreddits whose names start with 'query'. Uses typeahead endpoint to recieve the list of subreddits names. Typeahead provides exact matches, typo correction, fuzzy matching and boosts subreddits to the top that the user is subscribed to.

Parameters
subredditsAutocompleteInputA valid SubredditsAutocompleteInput instance
Returns
Matching subreddits.

◆ SubredditAutocompleteV2()

SubredditContainer Reddit.Models.Subreddits.SubredditAutocompleteV2 ( SubredditsAutocompleteV2Input  subredditsAutocompleteV2Input)

Version 2 of SubredditAutocomplete.

Parameters
subredditsAutocompleteV2InputA valid SubredditsAutocompleteV2Input instance
Returns
Matching subreddits.

◆ SubredditStylesheet()

GenericContainer Reddit.Models.Subreddits.SubredditStylesheet ( SubredditsSubredditStylesheetInput  subredditsSubredditStylesheetInput,
string  subreddit = null 
)

Update a subreddit's stylesheet. op should be save to update the contents of the stylesheet.

Parameters
subredditsSubredditStylesheetInputA valid SubredditsSubredditStylesheetInput instance
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ SubredditStylesheetAsync()

async Task<GenericContainer> Reddit.Models.Subreddits.SubredditStylesheetAsync ( SubredditsSubredditStylesheetInput  subredditsSubredditStylesheetInput,
string  subreddit = null 
)

Update a subreddit's stylesheet asynchronously. op should be save to update the contents of the stylesheet.

Parameters
subredditsSubredditStylesheetInputA valid SubredditsSubredditStylesheetInput instance
subredditThe subreddit being queried
Returns
An object indicating any errors.

◆ Subscribe()

void Reddit.Models.Subreddits.Subscribe ( SubredditsSubByNameInput  subredditsSubByNameInput)

Subscribe to or unsubscribe from a subreddit. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/.

Parameters
subredditsSubByNameInputA valid SubredditsSubByNameInput instance

◆ SubscribeAsync()

async Task Reddit.Models.Subreddits.SubscribeAsync ( SubredditsSubByNameInput  subredditsSubByNameInput)

Subscribe to or unsubscribe from a subreddit asynchronously. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/.

Parameters
subredditsSubByNameInputA valid SubredditsSubByNameInput instance

◆ SubscribeByFullname()

void Reddit.Models.Subreddits.SubscribeByFullname ( SubredditsSubByFullnameInput  subredditsSubByFullnameInput)

Subscribe to or unsubscribe from a subreddit. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/.

Parameters
subredditsSubByFullnameInputA valid SubredditsSubByFullnameInput instance

◆ SubscribeByFullnameAsync()

async Task Reddit.Models.Subreddits.SubscribeByFullnameAsync ( SubredditsSubByFullnameInput  subredditsSubByFullnameInput)

Subscribe to or unsubscribe from a subreddit asynchronously. To subscribe, action should be sub. To unsubscribe, action should be unsub.The user must have access to the subreddit to be able to subscribe to it. The skip_initial_defaults param can be set to True to prevent automatically subscribing the user to the current set of defaults when they take their first subscription action. Attempting to set it for an unsubscribe action will result in an error. See also: /subreddits/mine/.

Parameters
subredditsSubByFullnameInputA valid SubredditsSubByFullnameInput instance

◆ Traffic()

Traffic Reddit.Models.Subreddits.Traffic ( string  subreddit)

Get subreddit traffic.

Parameters
subredditThe subreddit being queried
Returns
Subreddit traffic data.

◆ UploadSrImg()

ImageUploadResult Reddit.Models.Subreddits.UploadSrImg ( SubredditsUploadSrImgInput  subredditsUploadSrImgInput,
string  subreddit = null 
)

Add or replace a subreddit image, custom header logo, custom mobile icon, or custom mobile banner. If the upload_type value is img, an image for use in the subreddit stylesheet is uploaded with the name specified in name. If the upload_type value is header then the image uploaded will be the subreddit's new logo and name will be ignored. If the upload_type value is icon then the image uploaded will be the subreddit's new mobile icon and name will be ignored. If the upload_type value is banner then the image uploaded will be the subreddit's new mobile banner and name will be ignored. For backwards compatibility, if upload_type is not specified, the header field will be used instead: If the header field has value 0, then upload_type is img. If the header field has value 1, then upload_type is header. The img_type field specifies whether to store the uploaded image as a PNG or JPEG. Subreddits have a limited number of images that can be in use at any given time. If no image with the specified name already exists, one of the slots will be consumed If an image with the specified name already exists, it will be replaced. This does not affect the stylesheet immediately, but will take effect the next time the stylesheet is saved. See also: /api/delete_sr_img, /api/delete_sr_header, /api/delete_sr_icon, and /api/delete_sr_banner.

Parameters
subredditsUploadSrImgInputA valid SubredditsUploadSrImgInput instance
subredditThe subreddit being queried
Returns
An object containing the resulting image URL and any errors.

◆ UploadSrImgAsync()

async Task<ImageUploadResult> Reddit.Models.Subreddits.UploadSrImgAsync ( SubredditsUploadSrImgInput  subredditsUploadSrImgInput,
string  subreddit = null 
)

Add or replace a subreddit image, custom header logo, custom mobile icon, or custom mobile banner asynchronously. If the upload_type value is img, an image for use in the subreddit stylesheet is uploaded with the name specified in name. If the upload_type value is header then the image uploaded will be the subreddit's new logo and name will be ignored. If the upload_type value is icon then the image uploaded will be the subreddit's new mobile icon and name will be ignored. If the upload_type value is banner then the image uploaded will be the subreddit's new mobile banner and name will be ignored. For backwards compatibility, if upload_type is not specified, the header field will be used instead: If the header field has value 0, then upload_type is img. If the header field has value 1, then upload_type is header. The img_type field specifies whether to store the uploaded image as a PNG or JPEG. Subreddits have a limited number of images that can be in use at any given time. If no image with the specified name already exists, one of the slots will be consumed If an image with the specified name already exists, it will be replaced. This does not affect the stylesheet immediately, but will take effect the next time the stylesheet is saved. See also: /api/delete_sr_img, /api/delete_sr_header, /api/delete_sr_icon, and /api/delete_sr_banner.

Parameters
subredditsUploadSrImgInputA valid SubredditsUploadSrImgInput instance
subredditThe subreddit being queried
Returns
An object containing the resulting image URL and any errors.

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