![]() |
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.
|
Controller class for a subreddit's wiki. More...
Public Member Functions | |
Wiki (Dispatch dispatch, string subreddit) | |
Create a new instance of the wiki controller. More... | |
WikiPage | GetPage (string pageName, string v="", string v2="") |
Return the content of an existing wiki page. If v is given, show the wiki page as it was at that version. If both v and v2 are given, show a diff of the two. More... | |
WikiPage | Page (string pageName, bool mayRevise, DateTime revisionDate, string contentHtml, User revisionBy, string contentMd) |
Return a new instance of the WikiPage controller. More... | |
WikiPage | Page (string pageName, Things.WikiPage wikiPage) |
Return a new instance of the WikiPage controller. More... | |
WikiPage | Page (string pageName) |
Return a new instance of the WikiPage controller. More... | |
List< SubredditUser > | 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's wiki. More... | |
List< SubredditUser > | GetContributors (SubredditsAboutInput subredditsAboutInput) |
Get the approved submitters of this subreddit's wiki. More... | |
List< BannedUser > | 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's wiki. More... | |
List< BannedUser > | GetBannedUsers (SubredditsAboutInput subredditsAboutInput) |
Get the approved submitters of this subreddit's wiki. More... | |
List< string > | GetPages () |
Retrieve a list of wiki pages in this subreddit. More... | |
List< Things.WikiPageRevision > | GetRecentPageRevisions (int limit=25, string after="", string before="", string show="all", bool srDetail=false, int count=0) |
Retrieve a list of recently changed wiki pages in this subreddit. More... | |
List< Things.WikiPageRevision > | GetRecentPageRevisions (SrListingInput srListingInput) |
Retrieve a list of recently changed wiki pages in this subreddit. More... | |
bool | MonitorPages (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true) |
Monitor this wiki for added/removed pages. More... | |
bool | WikiPagesIsMonitored () |
Whether the wiki pages list is being monitored. More... | |
![]() | |
Monitors () | |
void | Wait (int ms) |
bool | IsMonitored (string key, string subKey) |
bool | IsScheduled () |
void | WaitOrDie (string key, int timeout=60) |
void | WaitOrDie (Thread thread, int timeout=60) |
void | KillAllMonitoringThreads () |
![]() | |
BaseController () | |
Create a new Controller instance. More... | |
![]() | |
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< ActionResult > | Validate (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< UserPrefsContainer > | Validate (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) |
Protected Member Functions | |
override Thread | CreateMonitoringThread (string key, string subKey, int startDelayMs=0, int? monitoringDelayMs=null) |
Creates a new monitoring thread. More... | |
![]() | |
bool | Monitor (string key, Thread thread, string subKey) |
void | RebuildThreads (string subKey) |
void | LaunchThreadIfNotNull (string key, Thread thread) |
void | KillThread (Thread thread) |
void | KillThread (string key) |
void | ResetThreads (List< string > oldThreads) |
![]() | |
void | CheckErrors (List< List< string >> errors) |
void | CheckErrors (List< string > errors) |
void | CheckNull (object res, string msg="Reddit API returned null response.") |
Properties | |
List< string >? | Pages [get, set] |
List of pages on this wiki. More... | |
![]() | |
IDictionary< string, HashSet< string > > | MonitoringCache [get, set] |
An optional cache for preventing the same post from appearing multiple times during monitoring. See: https://github.com/sirkris/Reddit.NET/issues/117#issuecomment-759501039 More... | |
![]() | |
Lists | Lists [get, set] |
List-handling. More... | |
Events | |
EventHandler< WikiPagesUpdateEventArgs > | PagesUpdated |
Event handler for monitoring the list of wiki pages. More... | |
Additional Inherited Members | |
![]() | |
int | MonitoringWaitDelayMS = 1500 |
![]() | |
volatile bool | Terminate = false |
Controller class for a subreddit's wiki.
Reddit.Controllers.Wiki.Wiki | ( | Dispatch | dispatch, |
string | subreddit | ||
) |
Create a new instance of the wiki controller.
dispatch | |
subreddit | The name of the subreddit to which this wiki belongs |
|
protectedvirtual |
Creates a new monitoring thread.
key | Monitoring key |
subKey | Monitoring subKey |
startDelayMs | How long to wait before starting the thread in milliseconds (default: 0) |
monitoringDelayMs | How long to wait between monitoring queries; pass null to leave it auto-managed (default: null) |
Implements Reddit.Controllers.Internal.Monitors.
List<BannedUser> Reddit.Controllers.Wiki.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's wiki.
after | fullname of a thing |
before | fullname of a thing |
limit | the maximum number of items desired (default: 25, maximum: 100) |
user | A valid, existing reddit username |
includeCategories | boolean value |
count | a positive integer (default: 0) |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
List<BannedUser> Reddit.Controllers.Wiki.GetBannedUsers | ( | SubredditsAboutInput | subredditsAboutInput | ) |
Get the approved submitters of this subreddit's wiki.
subredditsAboutInput | A valid SubredditsAboutInput instance |
List<SubredditUser> Reddit.Controllers.Wiki.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's wiki.
after | fullname of a thing |
before | fullname of a thing |
limit | the maximum number of items desired (default: 25, maximum: 100) |
user | A valid, existing reddit username |
includeCategories | boolean value |
count | a positive integer (default: 0) |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
List<SubredditUser> Reddit.Controllers.Wiki.GetContributors | ( | SubredditsAboutInput | subredditsAboutInput | ) |
Get the approved submitters of this subreddit's wiki.
subredditsAboutInput | A valid SubredditsAboutInput instance |
WikiPage Reddit.Controllers.Wiki.GetPage | ( | string | pageName, |
string | v = "" , |
||
string | v2 = "" |
||
) |
Return the content of an existing wiki page. If v is given, show the wiki page as it was at that version. If both v and v2 are given, show a diff of the two.
pageName | the name of an existing wiki page |
v | a wiki revision ID |
v2 | a wiki revision ID |
List<string> Reddit.Controllers.Wiki.GetPages | ( | ) |
Retrieve a list of wiki pages in this subreddit.
List<Things.WikiPageRevision> Reddit.Controllers.Wiki.GetRecentPageRevisions | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
int | count = 0 |
||
) |
Retrieve a list of recently changed wiki pages in this subreddit.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
count | a positive integer (default: 0) |
List<Things.WikiPageRevision> Reddit.Controllers.Wiki.GetRecentPageRevisions | ( | SrListingInput | srListingInput | ) |
Retrieve a list of recently changed wiki pages in this subreddit.
srListingInput | A valid SrListingInput instance |
bool Reddit.Controllers.Wiki.MonitorPages | ( | int? | monitoringDelayMs = null , |
int? | monitoringBaseDelayMs = null , |
||
List< MonitoringSchedule > | schedule = null , |
||
bool? | breakOnFailure = null , |
||
DateTime? | monitoringExpiration = null , |
||
bool | useCache = true |
||
) |
Monitor this wiki for added/removed pages.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
WikiPage Reddit.Controllers.Wiki.Page | ( | string | pageName | ) |
WikiPage Reddit.Controllers.Wiki.Page | ( | string | pageName, |
bool | mayRevise, | ||
DateTime | revisionDate, | ||
string | contentHtml, | ||
User | revisionBy, | ||
string | contentMd | ||
) |
Return a new instance of the WikiPage controller.
pageName | the name of an existing wiki page |
mayRevise | boolean value |
revisionDate | Date of current revision |
contentHtml | Page content as HTML |
revisionBy | Author of current revision |
contentMd | Page content as Markdown |
WikiPage Reddit.Controllers.Wiki.Page | ( | string | pageName, |
Things.WikiPage | wikiPage | ||
) |
Return a new instance of the WikiPage controller.
pageName | the name of an existing wiki page |
wikiPage | A valid instance of Things.WikiPage |
bool Reddit.Controllers.Wiki.WikiPagesIsMonitored | ( | ) |
Whether the wiki pages list is being monitored.
|
getset |
List of pages on this wiki.
EventHandler<WikiPagesUpdateEventArgs> Reddit.Controllers.Wiki.PagesUpdated |
Event handler for monitoring the list of wiki pages.