C# Class RedditSharp.Things.Subreddit

Inheritance: Thing
Datei anzeigen Open project: SirCmpwn/RedditSharp Class Usage Examples

Private Properties

Property Type Description
CommonInit void
GetHot Listing
GetModQueue Listing
GetModerators IEnumerable
GetNew Listing
GetPosts Listing
GetSettings SubredditSettings
GetStylesheet SubredditStyle
GetUnmoderatedLinks Listing
GetUserFlairTemplates UserFlairTemplate[]
SetName void
Submit Post

Public Methods

Method Description
AcceptModeratorInvite ( ) : void
AddContributor ( string user ) : void
AddFlairTemplate ( string cssClass, FlairType flairType, string text, bool userEditable ) : void
AddModerator ( string user ) : void
BanUser ( string user, string reason ) : void
ClearFlairTemplates ( FlairType flairType ) : void
GetFlairCssClass ( string user ) : string
GetFlairText ( string user ) : string
GetFrontPage ( Reddit reddit ) : Subreddit
GetModerationLog ( ) : Listing

Gets the moderation log of the current subreddit

GetModerationLog ( ModActionType action ) : Listing

Gets the moderation log of the current subreddit filtered by the action taken

GetModerationLog ( ModActionType action, string mods ) : Listing

Gets the moderation log of the current subreddit filtered by the action taken and moderator(s) who performed the action

GetModerationLog ( string mods ) : Listing

Gets the moderation log of the current subreddit filtered by moderator(s) who performed the action

GetRSlashAll ( Reddit reddit ) : Subreddit
GetTop ( FromTime timePeriod ) : Listing
Init ( Reddit reddit, JToken json, IWebAgent webAgent ) : Subreddit
InitAsync ( Reddit reddit, JToken json, IWebAgent webAgent ) : Task
RemoveContributor ( string id ) : void
RemoveModerator ( string id ) : void
Search ( System.DateTime from, System.DateTime to, Sorting sortE = Sorting.New ) : Listing
Search ( string terms, Sorting sortE = Sorting.Relevance, TimeSorting timeE = TimeSorting.All ) : Listing
SetUserFlair ( string user, string cssClass, string text ) : void
SubmitPost ( string title, string url, string captchaId = "", string captchaAnswer = "", bool resubmit = false ) : Post

Submits a link post in the current subreddit using the logged-in user

SubmitTextPost ( string title, string text, string captchaId = "", string captchaAnswer = "" ) : Post

Submits a text post in the current subreddit using the logged-in user

Subscribe ( ) : void
ToString ( ) : string
Unsubscribe ( ) : void
UploadHeaderImage ( string name, ImageType imageType, byte file ) : void

Private Methods

Method Description
CommonInit ( Reddit reddit, JToken json, IWebAgent webAgent ) : void
GetHot ( ) : Listing
GetModQueue ( ) : Listing
GetModerators ( ) : IEnumerable
GetNew ( ) : Listing
GetPosts ( ) : Listing
GetSettings ( ) : SubredditSettings
GetStylesheet ( ) : SubredditStyle
GetUnmoderatedLinks ( ) : Listing
GetUserFlairTemplates ( ) : UserFlairTemplate[]
SetName ( ) : void
Submit ( SubmitData data ) : Post

Method Details

AcceptModeratorInvite() public method

public AcceptModeratorInvite ( ) : void
return void

AddContributor() public method

public AddContributor ( string user ) : void
user string
return void

AddFlairTemplate() public method

public AddFlairTemplate ( string cssClass, FlairType flairType, string text, bool userEditable ) : void
cssClass string
flairType FlairType
text string
userEditable bool
return void

AddModerator() public method

public AddModerator ( string user ) : void
user string
return void

BanUser() public method

public BanUser ( string user, string reason ) : void
user string
reason string
return void

ClearFlairTemplates() public method

public ClearFlairTemplates ( FlairType flairType ) : void
flairType FlairType
return void

GetFlairCssClass() public method

public GetFlairCssClass ( string user ) : string
user string
return string

GetFlairText() public method

public GetFlairText ( string user ) : string
user string
return string

GetFrontPage() public static method

public static GetFrontPage ( Reddit reddit ) : Subreddit
reddit Reddit
return Subreddit

GetModerationLog() public method

Gets the moderation log of the current subreddit
public GetModerationLog ( ) : Listing
return Listing

GetModerationLog() public method

Gets the moderation log of the current subreddit filtered by the action taken
public GetModerationLog ( ModActionType action ) : Listing
action ModActionType ModActionType of action performed
return Listing

GetModerationLog() public method

Gets the moderation log of the current subreddit filtered by the action taken and moderator(s) who performed the action
public GetModerationLog ( ModActionType action, string mods ) : Listing
action ModActionType ModActionType of action performed
mods string String array of mods to filter by
return Listing

GetModerationLog() public method

Gets the moderation log of the current subreddit filtered by moderator(s) who performed the action
public GetModerationLog ( string mods ) : Listing
mods string String array of mods to filter by
return Listing

GetRSlashAll() public static method

public static GetRSlashAll ( Reddit reddit ) : Subreddit
reddit Reddit
return Subreddit

GetTop() public method

public GetTop ( FromTime timePeriod ) : Listing
timePeriod FromTime
return Listing

Init() public method

public Init ( Reddit reddit, JToken json, IWebAgent webAgent ) : Subreddit
reddit Reddit
json JToken
webAgent IWebAgent
return Subreddit

InitAsync() public method

public InitAsync ( Reddit reddit, JToken json, IWebAgent webAgent ) : Task
reddit Reddit
json JToken
webAgent IWebAgent
return Task

RemoveContributor() public method

public RemoveContributor ( string id ) : void
id string
return void

RemoveModerator() public method

public RemoveModerator ( string id ) : void
id string
return void

Search() public method

public Search ( System.DateTime from, System.DateTime to, Sorting sortE = Sorting.New ) : Listing
from System.DateTime
to System.DateTime
sortE Sorting
return Listing

Search() public method

public Search ( string terms, Sorting sortE = Sorting.Relevance, TimeSorting timeE = TimeSorting.All ) : Listing
terms string
sortE Sorting
timeE TimeSorting
return Listing

SetUserFlair() public method

public SetUserFlair ( string user, string cssClass, string text ) : void
user string
cssClass string
text string
return void

SubmitPost() public method

Submits a link post in the current subreddit using the logged-in user
public SubmitPost ( string title, string url, string captchaId = "", string captchaAnswer = "", bool resubmit = false ) : Post
title string The title of the submission
url string The url of the submission link
captchaId string
captchaAnswer string
resubmit bool
return Post

SubmitTextPost() public method

Submits a text post in the current subreddit using the logged-in user
public SubmitTextPost ( string title, string text, string captchaId = "", string captchaAnswer = "" ) : Post
title string The title of the submission
text string The raw markdown text of the submission
captchaId string
captchaAnswer string
return Post

Subscribe() public method

public Subscribe ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

Unsubscribe() public method

public Unsubscribe ( ) : void
return void

UploadHeaderImage() public method

public UploadHeaderImage ( string name, ImageType imageType, byte file ) : void
name string
imageType ImageType
file byte
return void