![]() |
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 comment-related tasks. More...
Public Member Functions | |
Comment (Dispatch dispatch, Things.Comment listing) | |
Create a new comment controller instance from API return data. More... | |
Comment (Dispatch dispatch, string subreddit, string author, string body, string parentFullname, string bodyHtml=null, string collapsedReason=null, bool collapsed=false, bool isSubmitter=false, List< Comment > replies=null, List< Things.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, populated manually. More... | |
Comment (Dispatch dispatch, string fullname) | |
Create a new comment controller instance, populated only with its fullname. More... | |
Comment (Dispatch dispatch) | |
Create an empty comment controller instance. More... | |
void | SetBody (string value) |
Set the body manually without any automatic decoding. More... | |
void | SetBodyHTML (string value) |
Set the body HTML manually without any automatic decoding. More... | |
Post | GetRoot (string fullname=null) |
Get the post to which this comment belongs. More... | |
Comment | Submit () |
Submit this comment to Reddit. More... | |
async Task< Comment > | SubmitAsync () |
Submit this comment to Reddit asynchronously. 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< Things.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 to this comment. 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< Things.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 to this comment asynchronously. More... | |
Comment | BuildReply (string body, string bodyHtml=null, string author=null, string collapsedReason=null, bool collapsed=false, bool isSubmitter=false, List< Comment > replies=null, List< Things.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 comment reply object without submitting it to Reddit. More... | |
Comment | About () |
Return information about the current Comment instance. More... | |
Comment | Info () |
Return information about the current Comment instance via the api/info endpoint. More... | |
Comment | Distinguish (string how, bool? sticky=null) |
Distinguish a comment'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 comment 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. The first time a top-level comment is moderator distinguished, the author of the link the comment is in reply to will get a notification in their inbox. sticky is a boolean flag for comments, which will stick the distingushed comment to the top of all comments threads. If a comment is marked sticky, it will override any other stickied comment for that link (as only one comment may be stickied at a time). Only top-level comments may be stickied. More... | |
async Task< Comment > | DistinguishAsync (string how, bool? sticky=null) |
Distinguish a comment'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 comment 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. The first time a top-level comment is moderator distinguished, the author of the link the comment is in reply to will get a notification in their inbox. sticky is a boolean flag for comments, which will stick the distingushed comment to the top of all comments threads. If a comment is marked sticky, it will override any other stickied comment for that link (as only one comment may be stickied at a time). Only top-level comments may be stickied. More... | |
void | Remove (bool spam=false) |
Redact and remove this comment from all subreddit comment listings. More... | |
async Task | RemoveAsync (bool spam=false) |
Asynchronously redact and remove this comment from all subreddit comment listings. More... | |
void | Delete () |
Delete this comment. More... | |
async Task | DeleteAsync () |
Delete this comment asynchronously. More... | |
void | Report (string additionalInfo, string banEvadingAccountsNames, string customText, bool fromHelpCenter, string otherReason, string reason, string ruleReason, string siteReason, string violatorUsername) |
Report this comment to the subreddit moderators. The comment 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 comment to the subreddit moderators asynchronously. The comment then becomes implicitly hidden, as well. More... | |
void | Report (LinksAndCommentsReportInput linksAndCommentsReportInput) |
Report this comment to the subreddit moderators. The comment then becomes implicitly hidden, as well. More... | |
async Task | ReportAsync (LinksAndCommentsReportInput linksAndCommentsReportInput) |
Report this comment to the subreddit moderators asynchronously. The comment then becomes implicitly hidden, as well. More... | |
void | Save (string category) |
Save this comment. Saved things are kept in the user's saved listing for later perusal. More... | |
async Task | SaveAsync (string category) |
Save this comment asynchronously. Saved things are kept in the user's saved listing for later perusal. More... | |
void | EnableSendReplies () |
Enable inbox replies for this comment. More... | |
async Task | EnableSendRepliesAsync () |
Enable inbox replies for this comment asynchronously. More... | |
void | DisableSendReplies () |
Disable inbox replies for this comment. More... | |
async Task | DisableSendRepliesAsync () |
Disable inbox replies for this comment asynchronously. More... | |
void | Unsave () |
Unsave this comment. This removes the thing from the user's saved listings as well. More... | |
async Task | UnsaveAsync () |
Unsave this comment asynchronously. This removes the thing from the user's saved listings as well. More... | |
Comment | Edit (string text) |
Edit the body text of this comment. This instance will be automatically updated with the return data. More... | |
async Task< Comment > | EditAsync (string text) |
Edit the body text of this comment asynchronously. This instance will be automatically updated with the return data. More... | |
Things.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... | |
Things.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 | Upvote () |
Upvote this comment. 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 comment 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 comment. 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 comment 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 comment. 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 comment 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... | |
bool | MonitorCommentScore (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 comment for any score changes. In order for the event to fire, both minScoreMonitoringThreshold AND scoreMonitoringPercentThreshold must be met. More... | |
bool | CommentScoreIsMonitored () |
Whether the comment score is currently 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) |
Public Attributes | |
Things.Comment | Listing |
Full comment data returned by the API. More... | |
![]() | |
int | MonitoringWaitDelayMS = 1500 |
Protected Member Functions | |
virtual void | OnCommentScoreUpdated (CommentUpdateEventArgs e) |
Invocation for CommentScoreUpdated event. 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 this comment exists. More... | |
string? | Author [get, set] |
The username of the comment author. More... | |
string? | Id [get, set] |
The comment ID36. More... | |
string? | Fullname [get, set] |
The comment fullname. More... | |
string? | Permalink [get, set] |
The permalink URL of the comment. More... | |
DateTime? | Created [get, set] |
When the comment was created. More... | |
DateTime? | Edited [get, set] |
When the comment was last edited. More... | |
int? | Score [get, set] |
The comment score. More... | |
int? | UpVotes [get, set] |
The number of upvotes received. More... | |
int? | DownVotes [get, set] |
The number of downvotes received. More... | |
bool? | Removed [get, set] |
Whether the comment has been removed. More... | |
bool? | Spam [get, set] |
Whether the comment has been marked as spam. More... | |
List< Things.More > | More [get, set] |
A list of Things.More objects. More... | |
string?? | ParentId [get] |
The parent ID36. More... | |
string? | ParentFullname [get, set] |
The parent fullname. More... | |
string? | CollapsedReason [get, set] |
The reason the comment was collapsed (if applicable). More... | |
bool? | Collapsed [get, set] |
Whether the comment was collapsed. More... | |
bool? | IsSubmitter [get, set] |
Whether the comment was authored by the authenticated user. More... | |
bool? | ScoreHidden [get, set] |
Whether the comment score should be hidden. More... | |
int? | Depth [get, set] |
The comment depth. More... | |
Awards?? | Awards [get] |
Any awards applied to the comment. More... | |
bool | IsUpvoted [get] |
Whether the comment has been upvoted by the authenticated user. More... | |
bool | IsDownvoted [get] |
Whether the comment has been downvoted by the authenticated user. More... | |
List< Comment >?? | Replies [get, set] |
A list of comment replies. More... | |
List< Comment > | replies [get] |
A list of comment replies that does not automatically query the API if null. More... | |
int????? | NumReplies [get] |
The number of direct comment replies. Unlike Replies, accessing this property does not require a separate API call. More... | |
string?? | Body [get, set] |
The comment body. More... | |
string?? | BodyHTML [get, set] |
The comment body in HTML format. More... | |
Post?? | Root [get] |
The parent post. More... | |
Comments?? | Comments [get] |
Comment replies to this comment. 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< CommentUpdateEventArgs > | CommentScoreUpdated |
Event handler for monitoring comment score. More... | |
Additional Inherited Members | |
![]() | |
volatile bool | Terminate = false |
Controller class for comment-related tasks.
Reddit.Controllers.Comment.Comment | ( | Dispatch | dispatch, |
Things.Comment | listing | ||
) |
Create a new comment controller instance from API return data.
dispatch | |
listing |
Reddit.Controllers.Comment.Comment | ( | Dispatch | dispatch, |
string | subreddit, | ||
string | author, | ||
string | body, | ||
string | parentFullname, | ||
string | bodyHtml = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< Things.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, populated manually.
dispatch | |
subreddit | The subreddit to which the comment belongs |
author | The username of the comment's author |
body | The comment text |
parentFullname | Fullname of the parent post or comment |
bodyHtml | |
collapsedReason | |
collapsed | |
isSubmitter | |
replies | |
more | |
scoreHidden | |
depth | |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam |
Reddit.Controllers.Comment.Comment | ( | Dispatch | dispatch, |
string | fullname | ||
) |
Create a new comment controller instance, populated only with its fullname.
dispatch | |
fullname | Fullname of the comment |
Reddit.Controllers.Comment.Comment | ( | Dispatch | dispatch | ) |
Create an empty comment controller instance.
dispatch |
Comment Reddit.Controllers.Comment.About | ( | ) |
Return information about the current Comment instance.
Comment Reddit.Controllers.Comment.BuildReply | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< Things.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 comment reply object without submitting it to Reddit.
body | The comment reply text |
bodyHtml | |
author | |
collapsedReason | |
collapsed | |
isSubmitter | |
replies | |
more | |
scoreHidden | |
depth | |
id | |
fullname | |
permalink | |
created | |
edited | |
score | |
upVotes | |
downVotes | |
removed | |
spam |
bool Reddit.Controllers.Comment.CommentScoreIsMonitored | ( | ) |
Whether the comment score is currently being monitored.
|
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.Comment.Delete | ( | ) |
Delete this comment.
async Task Reddit.Controllers.Comment.DeleteAsync | ( | ) |
Delete this comment asynchronously.
void Reddit.Controllers.Comment.DisableSendReplies | ( | ) |
Disable inbox replies for this comment.
async Task Reddit.Controllers.Comment.DisableSendRepliesAsync | ( | ) |
Disable inbox replies for this comment asynchronously.
Comment Reddit.Controllers.Comment.Distinguish | ( | string | how, |
bool? | sticky = null |
||
) |
Distinguish a comment'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 comment 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. The first time a top-level comment is moderator distinguished, the author of the link the comment is in reply to will get a notification in their inbox. sticky is a boolean flag for comments, which will stick the distingushed comment to the top of all comments threads. If a comment is marked sticky, it will override any other stickied comment for that link (as only one comment may be stickied at a time). Only top-level comments may be stickied.
how | one of (yes, no, admin, special) |
sticky | boolean value |
async Task<Comment> Reddit.Controllers.Comment.DistinguishAsync | ( | string | how, |
bool? | sticky = null |
||
) |
Distinguish a comment'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 comment 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. The first time a top-level comment is moderator distinguished, the author of the link the comment is in reply to will get a notification in their inbox. sticky is a boolean flag for comments, which will stick the distingushed comment to the top of all comments threads. If a comment is marked sticky, it will override any other stickied comment for that link (as only one comment may be stickied at a time). Only top-level comments may be stickied.
how | one of (yes, no, admin, special) |
sticky | boolean value |
void Reddit.Controllers.Comment.Downvote | ( | ) |
Downvote this comment. 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.Comment.DownvoteAsync | ( | ) |
Downvote this comment 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.
Comment Reddit.Controllers.Comment.Edit | ( | string | text | ) |
Edit the body text of this comment. This instance will be automatically updated with the return data.
text | raw markdown text |
async Task<Comment> Reddit.Controllers.Comment.EditAsync | ( | string | text | ) |
Edit the body text of this comment asynchronously. This instance will be automatically updated with the return data.
text | raw markdown text |
void Reddit.Controllers.Comment.EnableSendReplies | ( | ) |
Enable inbox replies for this comment.
async Task Reddit.Controllers.Comment.EnableSendRepliesAsync | ( | ) |
Enable inbox replies for this comment asynchronously.
Post Reddit.Controllers.Comment.GetRoot | ( | string | fullname = null | ) |
Get the post to which this comment belongs.
fullname | The fullname of the comment whose post data we're looking for |
Comment Reddit.Controllers.Comment.Info | ( | ) |
Return information about the current Comment instance via the api/info endpoint.
bool Reddit.Controllers.Comment.MonitorCommentScore | ( | 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 comment 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 |
Things.MoreChildren Reddit.Controllers.Comment.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 |
Things.MoreChildren Reddit.Controllers.Comment.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 |
Invocation for CommentScoreUpdated event.
e |
void Reddit.Controllers.Comment.Remove | ( | bool | spam = false | ) |
Redact and remove this comment from all subreddit comment listings.
async Task Reddit.Controllers.Comment.RemoveAsync | ( | bool | spam = false | ) |
Asynchronously redact and remove this comment from all subreddit comment listings.
Comment Reddit.Controllers.Comment.Reply | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< Things.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 to this comment.
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.Comment.ReplyAsync | ( | string | body, |
string | bodyHtml = null , |
||
string | author = null , |
||
string | collapsedReason = null , |
||
bool | collapsed = false , |
||
bool | isSubmitter = false , |
||
List< Comment > | replies = null , |
||
List< Things.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 to this comment 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.Comment.Report | ( | LinksAndCommentsReportInput | linksAndCommentsReportInput | ) |
Report this comment to the subreddit moderators. The comment then becomes implicitly hidden, as well.
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
void Reddit.Controllers.Comment.Report | ( | string | additionalInfo, |
string | banEvadingAccountsNames, | ||
string | customText, | ||
bool | fromHelpCenter, | ||
string | otherReason, | ||
string | reason, | ||
string | ruleReason, | ||
string | siteReason, | ||
string | violatorUsername | ||
) |
Report this comment to the subreddit moderators. The comment 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.Comment.ReportAsync | ( | LinksAndCommentsReportInput | linksAndCommentsReportInput | ) |
Report this comment to the subreddit moderators asynchronously. The comment then becomes implicitly hidden, as well.
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
async Task Reddit.Controllers.Comment.ReportAsync | ( | string | additionalInfo, |
string | banEvadingAccountsNames, | ||
string | customText, | ||
bool | fromHelpCenter, | ||
string | otherReason, | ||
string | reason, | ||
string | ruleReason, | ||
string | siteReason, | ||
string | violatorUsername | ||
) |
Report this comment to the subreddit moderators asynchronously. The comment 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.Comment.Save | ( | string | category | ) |
Save this comment. Saved things are kept in the user's saved listing for later perusal.
category | a category name |
async Task Reddit.Controllers.Comment.SaveAsync | ( | string | category | ) |
Save this comment asynchronously. Saved things are kept in the user's saved listing for later perusal.
category | a category name |
void Reddit.Controllers.Comment.SetBody | ( | string | value | ) |
Set the body manually without any automatic decoding.
value | The body value you wish to set |
void Reddit.Controllers.Comment.SetBodyHTML | ( | string | value | ) |
Set the body HTML manually without any automatic decoding.
value | The body HTML value you wish to set |
Comment Reddit.Controllers.Comment.Submit | ( | ) |
Submit this comment to Reddit.
async Task<Comment> Reddit.Controllers.Comment.SubmitAsync | ( | ) |
Submit this comment to Reddit asynchronously.
void Reddit.Controllers.Comment.Unsave | ( | ) |
Unsave this comment. This removes the thing from the user's saved listings as well.
async Task Reddit.Controllers.Comment.UnsaveAsync | ( | ) |
Unsave this comment asynchronously. This removes the thing from the user's saved listings as well.
void Reddit.Controllers.Comment.Unvote | ( | ) |
Unvote this comment. 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.Comment.UnvoteAsync | ( | ) |
Unvote this comment 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.Comment.Upvote | ( | ) |
Upvote this comment. 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.Comment.UpvoteAsync | ( | ) |
Upvote this comment 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.
Things.Comment Reddit.Controllers.Comment.Listing |
Full comment data returned by the API.
|
getset |
The username of the comment author.
|
get |
Any awards applied to the comment.
|
getset |
The comment body.
|
getset |
The comment body in HTML format.
|
getset |
Whether the comment was collapsed.
|
getset |
The reason the comment was collapsed (if applicable).
|
getset |
When the comment was created.
|
getset |
The comment depth.
|
getset |
The number of downvotes received.
|
getset |
When the comment was last edited.
|
getset |
The comment fullname.
|
getset |
The comment ID36.
|
get |
Whether the comment has been downvoted by the authenticated user.
|
getset |
Whether the comment was authored by the authenticated user.
|
get |
Whether the comment has been upvoted by the authenticated user.
|
getset |
A list of Things.More objects.
|
get |
The number of direct comment replies.
Unlike Replies, accessing this property does not require a separate API call.
|
getset |
The parent fullname.
|
get |
The parent ID36.
|
getset |
The permalink URL of the comment.
|
getset |
Whether the comment has been removed.
|
getset |
A list of comment replies.
|
get |
A list of comment replies that does not automatically query the API if null.
|
get |
The parent post.
|
getset |
The comment score.
|
getset |
Whether the comment score should be hidden.
|
getset |
Whether the comment has been marked as spam.
|
getset |
The subreddit in which this comment exists.
|
getset |
The number of upvotes received.
EventHandler<CommentUpdateEventArgs> Reddit.Controllers.Comment.CommentScoreUpdated |
Event handler for monitoring comment score.