![]() |
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.
|
Base controller for posts. More...
Public Member Functions | |
Post (Dispatch dispatch, Things.Post listing) | |
Create a new post controller instance from API return data. More... | |
Post (Dispatch dispatch, string subreddit, string title=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, bool nsfw=false) | |
Create a new post controller instance, populated manually. More... | |
Post (Dispatch dispatch, string fullname) | |
Create a new post controller instance, populated with only its fullname. More... | |
Post (Dispatch dispatch, string fullname, string subreddit) | |
Create a new post controller instance, populated with only its fullname and subreddit. More... | |
Post (Dispatch dispatch) | |
Create an empty post controller instance. More... | |
void | SetTitle (string value) |
Set the title manually without any automatic decoding. More... | |
Comment | Comment (string body, string bodyHtml=null, string author=null, string collapsedReason=null, bool collapsed=false, bool isSubmitter=false, List< Comment > replies=null, List< More > more=null, bool scoreHidden=false, int depth=0, 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 comment controller instance bound to this post, populated manually. More... | |
Comment | Comment () |
Create a new comment controller instance bound to this post. More... | |
Comment | Reply (string body, string bodyHtml=null, string author=null, string collapsedReason=null, bool collapsed=false, bool isSubmitter=false, List< Comment > replies=null, List< More > more=null, bool scoreHidden=false, int depth=0, 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) |
Reply with a comment to this post. More... | |
async Task< Comment > | ReplyAsync (string body, string bodyHtml=null, string author=null, string collapsedReason=null, bool collapsed=false, bool isSubmitter=false, List< Comment > replies=null, List< More > more=null, bool scoreHidden=false, int depth=0, 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) |
Reply with a comment to this post asynchronously. More... | |
Post | About () |
Return information about the current Post instance. More... | |
Post | Info () |
Return information about the current Post instance via the api/info endpoint. More... | |
void | SetFlair (string flairText="", string flairTemplateId="") |
Sets the link flair. More... | |
void | SetFlair (FlairSelectFlairInput flairSelectFlairInput) |
Sets the link flair. More... | |
Post | Distinguish (string how) |
Distinguish a post's author with a sigil. This can be useful to draw attention to and confirm the identity of the user in the context of a link of theirs. The options for distinguish are as follows: yes - add a moderator distinguish([M]). only if the user is a moderator of the subreddit the thing is in. no - remove any distinguishes. admin - add an admin distinguish([A]). admin accounts only. special - add a user-specific distinguish. depends on user. More... | |
async Task< Post > | DistinguishAsync (string how) |
Distinguish a post's author with a sigil asynchronously. This can be useful to draw attention to and confirm the identity of the user in the context of a link of theirs. The options for distinguish are as follows: yes - add a moderator distinguish([M]). only if the user is a moderator of the subreddit the thing is in. no - remove any distinguishes. admin - add an admin distinguish([A]). admin accounts only. special - add a user-specific distinguish. depends on user. More... | |
void | Remove (bool spam=false) |
Remove this post from all subreddit listings. More... | |
async Task | RemoveAsync (bool spam=false) |
Asynchronously remove this post from all subreddit listings. More... | |
void | Delete () |
Delete this post. More... | |
async Task | DeleteAsync () |
Delete this post asynchronously. More... | |
void | Hide () |
Hide this post. This removes it from the user's default view of subreddit listings. More... | |
async Task | HideAsync () |
Hide this post asynchronously. This removes it from the user's default view of subreddit listings. More... | |
void | Lock () |
Lock this post. Prevents a post from receiving new comments. More... | |
async Task | LockAsync () |
Lock this post asynchronously. Prevents a post from receiving new comments. More... | |
void | MarkNSFW () |
Mark this post as NSFW. More... | |
async Task | MarkNSFWAsync () |
Mark this post as NSFW asynchronously. More... | |
MoreChildren | MoreChildren (string children, bool limitChildren, string sort, string id=null) |
Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested. More... | |
MoreChildren | MoreChildren (LinksAndCommentsMoreChildrenInput linksAndCommentsMoreChildrenInput) |
Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested. More... | |
void | Report (string additionalInfo, string banEvadingAccountsNames, string customText, bool fromHelpCenter, string otherReason, string reason, string ruleReason, string siteReason, string violatorUsername) |
Report this post to the subreddit moderators. The post then becomes implicitly hidden, as well. More... | |
async Task | ReportAsync (string additionalInfo, string banEvadingAccountsNames, string customText, bool fromHelpCenter, string otherReason, string reason, string ruleReason, string siteReason, string violatorUsername) |
Report this post to the subreddit moderators asynchronously. The post then becomes implicitly hidden, as well. More... | |
void | Report (LinksAndCommentsReportInput linksAndCommentsReportInput) |
Report this post to the subreddit moderators. The post then becomes implicitly hidden, as well. More... | |
async Task | ReportAsync (LinksAndCommentsReportInput linksAndCommentsReportInput) |
Report this post to the subreddit moderators asynchronously. The post then becomes implicitly hidden, as well. More... | |
void | Save (string category) |
Save this post. Saved things are kept in the user's saved listing for later perusal. More... | |
async Task | SaveAsync (string category) |
Save this post asynchronously. Saved things are kept in the user's saved listing for later perusal. More... | |
void | EnableSendReplies () |
Enable inbox replies for this post. More... | |
async Task | EnableSendRepliesAsync () |
Enable inbox replies for this post asynchronously. More... | |
void | DisableSendReplies () |
Disable inbox replies for this post. More... | |
async Task | DisableSendRepliesAsync () |
Disable inbox replies for this post asynchronously. More... | |
void | EnableContestMode () |
Enable contest mode for this post. More... | |
async Task | EnableContestModeAsync () |
Enable contest mode for this post asynchronously. More... | |
void | DisableContestMode () |
Disable contest mode for this post. More... | |
async Task | DisableContestModeAsync () |
Disable contest mode for this post asynchronously. More... | |
void | SetSubredditSticky (int num, bool toProfile) |
Set this post as the sticky in its subreddit. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More... | |
async Task | SetSubredditStickyAsync (int num, bool toProfile) |
Set this post as the sticky in its subreddit asynchronously. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More... | |
void | UnsetSubredditSticky (int num, bool toProfile) |
Unset this post as the sticky in its subreddit. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More... | |
async Task | UnsetSubredditStickyAsync (int num, bool toProfile) |
Unset this post as the sticky in its subreddit asynchronously. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More... | |
void | SetSuggestedSort (string sort) |
Set a suggested sort for this post. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort. More... | |
async Task | SetSuggestedSortAsync (string sort) |
Set a suggested sort for this post asynchronously. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort. More... | |
void | Spoiler () |
Mark this post as containing spoilers. More... | |
async Task | SpoilerAsync () |
Mark this post as containing spoilers asynchronously. More... | |
void | Unhide () |
Unhide this post. More... | |
async Task | UnhideAsync () |
Unhide this post asynchronously. More... | |
void | Unlock () |
Unlock this post. Allows this post to receive new comments. More... | |
async Task | UnlockAsync () |
Unlock this post asynchronously. Allows this post to receive new comments. More... | |
void | UnmarkNSFW () |
Remove the NSFW marking from this post. More... | |
async Task | UnmarkNSFWAsync () |
Remove the NSFW marking from this post asynchronously. More... | |
void | Unsave () |
Unsave this post. This removes the thing from the user's saved listings as well. More... | |
async Task | UnsaveAsync () |
Unsave this post asynchronously. This removes the thing from the user's saved listings as well. More... | |
void | Unspoiler () |
Remove spoiler. More... | |
async Task | UnspoilerAsync () |
Remove spoiler asynchronously. More... | |
void | Upvote () |
Upvote this post. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
async Task | UpvoteAsync () |
Upvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
void | Downvote () |
Downvote this post. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
async Task | DownvoteAsync () |
Downvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
void | Unvote () |
Unvote this post. This is equivalent to "un-voting" by clicking again on a highlighted arrow. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
async Task | UnvoteAsync () |
Unvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating. More... | |
void | Approve () |
Approve this post. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded. More... | |
FlairSelectorResultContainer | FlairSelector (string username) |
Return information about a users's flair options. More... | |
bool | MonitorPostData (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null) |
Monitor this post for any configuration changes. More... | |
bool | MonitorPostScore (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, int? minScoreMonitoringThreshold=null, int? scoreMonitoringPercentThreshold=null, int? cancellationThresholdMinutes=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null) |
Monitor this post for any score changes. In order for the event to fire, both minScoreMonitoringThreshold AND scoreMonitoringPercentThreshold must be met. More... | |
bool | PostDataIsMonitored () |
Whether post data is being monitored. More... | |
bool | PostScoreIsMonitored () |
Whether post score 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 | |
virtual void | OnPostDataUpdated (PostUpdateEventArgs e) |
Invoke monitoring event for post data. More... | |
virtual void | OnPostScoreUpdated (PostUpdateEventArgs e) |
Invoke monitoring event for post score. More... | |
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 | |
string? | Subreddit [get, set] |
The subreddit in which the post exists. More... | |
string? | Author [get, set] |
The username of the post author. More... | |
string? | Id [get, set] |
The ID36 of the post. More... | |
string? | Fullname [get, set] |
The fullname of the post. More... | |
string? | Permalink [get, set] |
The permalink URL of the post. More... | |
DateTime? | Created [get, set] |
When the post was created. More... | |
DateTime? | Edited [get, set] |
When the post was last edited. More... | |
bool? | Removed [get, set] |
Whether the post was removed. More... | |
bool? | Spam [get, set] |
Whether the post was marked as spam. More... | |
bool? | NSFW [get, set] |
Whether the post was marked as NSFW. More... | |
int? | Score [get, set] |
The post score. More... | |
int? | UpVotes [get, set] |
The number of upvotes received. More... | |
double? | UpvoteRatio [get, set] |
The number of upvotes received divided by the total number of votes. More... | |
bool | IsUpvoted [get] |
Whether the post has been upvoted by the authenticated user. More... | |
bool | IsDownvoted [get] |
Whether the post has been downvoted by the authenticated user. More... | |
Awards | Awards [get, set] |
Any awards applied to the post. More... | |
int | DownVotes [get] |
The number of downvotes received. More... | |
string | Title [get, set] |
The title of the post. More... | |
Things.Post | Listing [get, set] |
The full Listing object returned by the Reddit API; More... | |
Comments?? | Comments [get] |
Comment replies to this post. 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< PostUpdateEventArgs > | PostDataUpdated |
Event handler for monitoring post data. More... | |
EventHandler< PostUpdateEventArgs > | PostScoreUpdated |
Event handler for monitoring post score. More... | |
Additional Inherited Members | |
![]() | |
int | MonitoringWaitDelayMS = 1500 |
![]() | |
volatile bool | Terminate = false |
Base controller for posts.
Reddit.Controllers.Post.Post | ( | Dispatch | dispatch, |
Things.Post | listing | ||
) |
Create a new post controller instance from API return data.
dispatch | |
listing |
Reddit.Controllers.Post.Post | ( | Dispatch | dispatch, |
string | subreddit, | ||
string | title = 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 , |
||
bool | nsfw = false |
||
) |
Create a new post controller instance, populated manually.
dispatch | |
subreddit | The subreddit to which the post belongs |
title | The title of the post |
author | The post author's username |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam | |
nsfw |
Reddit.Controllers.Post.Post | ( | Dispatch | dispatch, |
string | fullname | ||
) |
Create a new post controller instance, populated with only its fullname.
dispatch | |
fullname | Fullname of the post |
Reddit.Controllers.Post.Post | ( | Dispatch | dispatch, |
string | fullname, | ||
string | subreddit | ||
) |
Create a new post controller instance, populated with only its fullname and subreddit.
dispatch | |
fullname | Fullname of the post |
subreddit | A valid subreddit name |
Reddit.Controllers.Post.Post | ( | Dispatch | dispatch | ) |
Create an empty post controller instance.
dispatch |
Post Reddit.Controllers.Post.About | ( | ) |
Return information about the current Post instance.
void Reddit.Controllers.Post.Approve | ( | ) |
Approve this post. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded.
Comment Reddit.Controllers.Post.Comment | ( | ) |
Create a new comment controller instance bound to this post.
Comment Reddit.Controllers.Post.Comment | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< More > | more = null , |
||
bool | scoreHidden = false , |
||
int | depth = 0 , |
||
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 comment controller instance bound to this post, populated manually.
body | The comment text |
bodyHtml | |
author | The username of the comment's author |
collapsedReason | |
collapsed | |
isSubmitter | |
replies | |
more | |
scoreHidden | |
depth | |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam |
|
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.
void Reddit.Controllers.Post.Delete | ( | ) |
Delete this post.
async Task Reddit.Controllers.Post.DeleteAsync | ( | ) |
Delete this post asynchronously.
void Reddit.Controllers.Post.DisableContestMode | ( | ) |
Disable contest mode for this post.
async Task Reddit.Controllers.Post.DisableContestModeAsync | ( | ) |
Disable contest mode for this post asynchronously.
void Reddit.Controllers.Post.DisableSendReplies | ( | ) |
Disable inbox replies for this post.
async Task Reddit.Controllers.Post.DisableSendRepliesAsync | ( | ) |
Disable inbox replies for this post asynchronously.
Post Reddit.Controllers.Post.Distinguish | ( | string | how | ) |
Distinguish a post's author with a sigil. This can be useful to draw attention to and confirm the identity of the user in the context of a link of theirs. The options for distinguish are as follows: yes - add a moderator distinguish([M]). only if the user is a moderator of the subreddit the thing is in. no - remove any distinguishes. admin - add an admin distinguish([A]). admin accounts only. special - add a user-specific distinguish. depends on user.
how | one of (yes, no, admin, special) |
async Task<Post> Reddit.Controllers.Post.DistinguishAsync | ( | string | how | ) |
Distinguish a post's author with a sigil asynchronously. This can be useful to draw attention to and confirm the identity of the user in the context of a link of theirs. The options for distinguish are as follows: yes - add a moderator distinguish([M]). only if the user is a moderator of the subreddit the thing is in. no - remove any distinguishes. admin - add an admin distinguish([A]). admin accounts only. special - add a user-specific distinguish. depends on user.
how | one of (yes, no, admin, special) |
void Reddit.Controllers.Post.Downvote | ( | ) |
Downvote this post. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
async Task Reddit.Controllers.Post.DownvoteAsync | ( | ) |
Downvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
void Reddit.Controllers.Post.EnableContestMode | ( | ) |
Enable contest mode for this post.
async Task Reddit.Controllers.Post.EnableContestModeAsync | ( | ) |
Enable contest mode for this post asynchronously.
void Reddit.Controllers.Post.EnableSendReplies | ( | ) |
Enable inbox replies for this post.
async Task Reddit.Controllers.Post.EnableSendRepliesAsync | ( | ) |
Enable inbox replies for this post asynchronously.
FlairSelectorResultContainer Reddit.Controllers.Post.FlairSelector | ( | string | username | ) |
Return information about a users's flair options.
username | A valid Reddit username |
void Reddit.Controllers.Post.Hide | ( | ) |
Hide this post. This removes it from the user's default view of subreddit listings.
async Task Reddit.Controllers.Post.HideAsync | ( | ) |
Hide this post asynchronously. This removes it from the user's default view of subreddit listings.
Post Reddit.Controllers.Post.Info | ( | ) |
Return information about the current Post instance via the api/info endpoint.
void Reddit.Controllers.Post.Lock | ( | ) |
Lock this post. Prevents a post from receiving new comments.
async Task Reddit.Controllers.Post.LockAsync | ( | ) |
Lock this post asynchronously. Prevents a post from receiving new comments.
void Reddit.Controllers.Post.MarkNSFW | ( | ) |
Mark this post as NSFW.
async Task Reddit.Controllers.Post.MarkNSFWAsync | ( | ) |
Mark this post as NSFW asynchronously.
bool Reddit.Controllers.Post.MonitorPostData | ( | int? | monitoringDelayMs = null , |
int? | monitoringBaseDelayMs = null , |
||
List< MonitoringSchedule > | schedule = null , |
||
bool? | breakOnFailure = null , |
||
DateTime? | monitoringExpiration = null |
||
) |
Monitor this post for any configuration changes.
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 |
bool Reddit.Controllers.Post.MonitorPostScore | ( | int? | monitoringDelayMs = null , |
int? | monitoringBaseDelayMs = null , |
||
int? | minScoreMonitoringThreshold = null , |
||
int? | scoreMonitoringPercentThreshold = null , |
||
int? | cancellationThresholdMinutes = null , |
||
List< MonitoringSchedule > | schedule = null , |
||
bool? | breakOnFailure = null , |
||
DateTime? | monitoringExpiration = null |
||
) |
Monitor this post for any score changes. In order for the event to fire, both minScoreMonitoringThreshold AND scoreMonitoringPercentThreshold must be met.
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) |
minScoreMonitoringThreshold | The minimum change in score value between events (default: 4) |
scoreMonitoringPercentThreshold | The minimum score percent change between events (default: 8) |
cancellationThresholdMinutes | If not null, monitoring will automatically stop if more than this time elapses between score updates (default: null) |
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 |
MoreChildren Reddit.Controllers.Post.MoreChildren | ( | LinksAndCommentsMoreChildrenInput | linksAndCommentsMoreChildrenInput | ) |
Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested.
linksAndCommentsMoreChildrenInput | A valid LinksAndCommentsMoreChildrenInput instance |
MoreChildren Reddit.Controllers.Post.MoreChildren | ( | string | children, |
bool | limitChildren, | ||
string | sort, | ||
string | id = null |
||
) |
Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested.
children | a comma-delimited list of comment ID36s |
limitChildren | boolean value |
sort | one of (confidence, top, new, controversial, old, random, qa, live) |
id | (optional) id of the associated MoreChildren object |
|
protectedvirtual |
Invoke monitoring event for post data.
e | A valid PostUpdateEventArgs instance |
|
protectedvirtual |
Invoke monitoring event for post score.
e | A valid PostUpdateEventArgs instance |
bool Reddit.Controllers.Post.PostDataIsMonitored | ( | ) |
Whether post data is being monitored.
bool Reddit.Controllers.Post.PostScoreIsMonitored | ( | ) |
Whether post score is being monitored.
void Reddit.Controllers.Post.Remove | ( | bool | spam = false | ) |
Remove this post from all subreddit listings.
spam | boolean value |
async Task Reddit.Controllers.Post.RemoveAsync | ( | bool | spam = false | ) |
Asynchronously remove this post from all subreddit listings.
Comment Reddit.Controllers.Post.Reply | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< More > | more = null , |
||
bool | scoreHidden = false , |
||
int | depth = 0 , |
||
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 |
||
) |
Reply with a comment to this post.
body | The comment reply text |
bodyHtml | |
author | |
collapsedReason | |
collapsed | |
isSubmitter | |
replies | |
more | |
scoreHidden | |
depth | |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam |
async Task<Comment> Reddit.Controllers.Post.ReplyAsync | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< More > | more = null , |
||
bool | scoreHidden = false , |
||
int | depth = 0 , |
||
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 |
||
) |
Reply with a comment to this post asynchronously.
body | The comment reply text |
bodyHtml | |
author | |
collapsedReason | |
collapsed | |
isSubmitter | |
replies | |
more | |
scoreHidden | |
depth | |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam |
void Reddit.Controllers.Post.Report | ( | LinksAndCommentsReportInput | linksAndCommentsReportInput | ) |
Report this post to the subreddit moderators. The post then becomes implicitly hidden, as well.
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
void Reddit.Controllers.Post.Report | ( | string | additionalInfo, |
string | banEvadingAccountsNames, | ||
string | customText, | ||
bool | fromHelpCenter, | ||
string | otherReason, | ||
string | reason, | ||
string | ruleReason, | ||
string | siteReason, | ||
string | violatorUsername | ||
) |
Report this post to the subreddit moderators. The post then becomes implicitly hidden, as well.
additionalInfo | a string no longer than 2000 characters |
banEvadingAccountsNames | a string no longer than 1000 characters |
customText | a string no longer than 250 characters |
fromHelpCenter | boolean value |
otherReason | a string no longer than 100 characters |
reason | a string no longer than 100 characters |
ruleReason | a string no longer than 100 characters |
siteReason | a string no longer than 100 characters |
violatorUsername | A valid Reddit username |
async Task Reddit.Controllers.Post.ReportAsync | ( | LinksAndCommentsReportInput | linksAndCommentsReportInput | ) |
Report this post to the subreddit moderators asynchronously. The post then becomes implicitly hidden, as well.
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
async Task Reddit.Controllers.Post.ReportAsync | ( | string | additionalInfo, |
string | banEvadingAccountsNames, | ||
string | customText, | ||
bool | fromHelpCenter, | ||
string | otherReason, | ||
string | reason, | ||
string | ruleReason, | ||
string | siteReason, | ||
string | violatorUsername | ||
) |
Report this post to the subreddit moderators asynchronously. The post then becomes implicitly hidden, as well.
additionalInfo | a string no longer than 2000 characters |
banEvadingAccountsNames | a string no longer than 1000 characters |
customText | a string no longer than 250 characters |
fromHelpCenter | boolean value |
otherReason | a string no longer than 100 characters |
reason | a string no longer than 100 characters |
ruleReason | a string no longer than 100 characters |
siteReason | a string no longer than 100 characters |
violatorUsername | A valid Reddit username |
void Reddit.Controllers.Post.Save | ( | string | category | ) |
Save this post. Saved things are kept in the user's saved listing for later perusal.
category | a category name |
async Task Reddit.Controllers.Post.SaveAsync | ( | string | category | ) |
Save this post asynchronously. Saved things are kept in the user's saved listing for later perusal.
category | a category name |
void Reddit.Controllers.Post.SetFlair | ( | FlairSelectFlairInput | flairSelectFlairInput | ) |
Sets the link flair.
flairSelectFlairInput | The text to be displayed in the flair |
void Reddit.Controllers.Post.SetFlair | ( | string | flairText = "" , |
string | flairTemplateId = "" |
||
) |
Sets the link flair.
flairText | The text to be displayed in the flair |
flairTemplateId | (optional) A flair template ID |
void Reddit.Controllers.Post.SetSubredditSticky | ( | int | num, |
bool | toProfile | ||
) |
Set this post as the sticky in its subreddit. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.
num | an integer between 1 and 4 |
toProfile | boolean value |
async Task Reddit.Controllers.Post.SetSubredditStickyAsync | ( | int | num, |
bool | toProfile | ||
) |
Set this post as the sticky in its subreddit asynchronously. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.
num | an integer between 1 and 4 |
toProfile | boolean value |
void Reddit.Controllers.Post.SetSuggestedSort | ( | string | sort | ) |
Set a suggested sort for this post. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort.
sort | one of (confidence, top, new, controversial, old, random, qa, live, blank) |
async Task Reddit.Controllers.Post.SetSuggestedSortAsync | ( | string | sort | ) |
Set a suggested sort for this post asynchronously. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort.
sort | one of (confidence, top, new, controversial, old, random, qa, live, blank) |
void Reddit.Controllers.Post.SetTitle | ( | string | value | ) |
Set the title manually without any automatic decoding.
value | The title value you wish to set |
void Reddit.Controllers.Post.Spoiler | ( | ) |
Mark this post as containing spoilers.
async Task Reddit.Controllers.Post.SpoilerAsync | ( | ) |
Mark this post as containing spoilers asynchronously.
void Reddit.Controllers.Post.Unhide | ( | ) |
Unhide this post.
async Task Reddit.Controllers.Post.UnhideAsync | ( | ) |
Unhide this post asynchronously.
void Reddit.Controllers.Post.Unlock | ( | ) |
Unlock this post. Allows this post to receive new comments.
async Task Reddit.Controllers.Post.UnlockAsync | ( | ) |
Unlock this post asynchronously. Allows this post to receive new comments.
void Reddit.Controllers.Post.UnmarkNSFW | ( | ) |
Remove the NSFW marking from this post.
async Task Reddit.Controllers.Post.UnmarkNSFWAsync | ( | ) |
Remove the NSFW marking from this post asynchronously.
void Reddit.Controllers.Post.Unsave | ( | ) |
Unsave this post. This removes the thing from the user's saved listings as well.
async Task Reddit.Controllers.Post.UnsaveAsync | ( | ) |
Unsave this post asynchronously. This removes the thing from the user's saved listings as well.
void Reddit.Controllers.Post.UnsetSubredditSticky | ( | int | num, |
bool | toProfile | ||
) |
Unset this post as the sticky in its subreddit. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.
num | an integer between 1 and 4 |
toProfile | boolean value |
async Task Reddit.Controllers.Post.UnsetSubredditStickyAsync | ( | int | num, |
bool | toProfile | ||
) |
Unset this post as the sticky in its subreddit asynchronously. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.
num | an integer between 1 and 4 |
toProfile | boolean value |
void Reddit.Controllers.Post.Unspoiler | ( | ) |
Remove spoiler.
async Task Reddit.Controllers.Post.UnspoilerAsync | ( | ) |
Remove spoiler asynchronously.
void Reddit.Controllers.Post.Unvote | ( | ) |
Unvote this post. This is equivalent to "un-voting" by clicking again on a highlighted arrow. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
async Task Reddit.Controllers.Post.UnvoteAsync | ( | ) |
Unvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
void Reddit.Controllers.Post.Upvote | ( | ) |
Upvote this post. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
async Task Reddit.Controllers.Post.UpvoteAsync | ( | ) |
Upvote this post asynchronously. Please note that votes must be cast by humans. Automated bot-voting violates Reddit's rules. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the Reddit rules for more details on what constitutes vote cheating.
|
getset |
The username of the post author.
|
getset |
Any awards applied to the post.
|
getset |
When the post was created.
|
get |
The number of downvotes received.
|
getset |
When the post was last edited.
|
getset |
The fullname of the post.
|
getset |
The ID36 of the post.
|
get |
Whether the post has been downvoted by the authenticated user.
|
get |
Whether the post has been upvoted by the authenticated user.
|
getset |
The full Listing object returned by the Reddit API;
|
getset |
Whether the post was marked as NSFW.
|
getset |
The permalink URL of the post.
|
getset |
Whether the post was removed.
|
getset |
The post score.
|
getset |
Whether the post was marked as spam.
|
getset |
The subreddit in which the post exists.
|
getset |
The title of the post.
|
getset |
The number of upvotes received divided by the total number of votes.
|
getset |
The number of upvotes received.
EventHandler<PostUpdateEventArgs> Reddit.Controllers.Post.PostDataUpdated |
Event handler for monitoring post data.
EventHandler<PostUpdateEventArgs> Reddit.Controllers.Post.PostScoreUpdated |
Event handler for monitoring post score.