![]() |
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.
|
Public Member Functions | |
Moderation (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
ModActionContainer | GetLog (ModerationGetLogInput moderationGetLogInput, string subreddit=null) |
Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified. This endpoint is a listing. More... | |
PostContainer | ModQueue (ModerationModQueueInput moderationModQueueInput, string location="modqueue", string subreddit=null) |
Return a listing of posts relevant to moderators. reports: Things that have been reported. spam: Things that have been marked as spam or otherwise removed. modqueue: Things requiring moderator review, such as reported things and items caught by the spam filter. unmoderated: Things that have yet to be approved/removed by a mod. edited: Things that have been edited recently. Requires the "posts" moderator permission for the subreddit. This endpoint is a listing. More... | |
GenericContainer | AcceptModeratorInvite (string subreddit=null) |
Accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. See also: /api/friend and /subreddits/mine. More... | |
async Task< GenericContainer > | AcceptModeratorInviteAsync (string subreddit=null) |
Asynchronously accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. See also: /api/friend and /subreddits/mine. More... | |
void | Approve (string id) |
Approve a link or comment. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded. See also: /api/remove. More... | |
async Task | ApproveAsync (string id) |
Approve a link or comment asynchronously. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded. See also: /api/remove. More... | |
T | Distinguish< T > (ModerationDistinguishInput moderationDistinguishInput) |
Distinguish a thing'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 or 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< T > | DistinguishAsync< T > (ModerationDistinguishInput moderationDistinguishInput) |
Distinguish a thing'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 or 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... | |
PostResultContainer | DistinguishPost (string how, string id) |
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< PostResultContainer > | DistinguishPostAsync (string how, string id) |
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... | |
CommentResultContainer | DistinguishComment (string how, string id, 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< CommentResultContainer > | DistinguishCommentAsync (string how, string id, 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 | IgnoreReports (string id) |
Prevent future reports on a thing from causing notifications. Any reports made about a thing after this flag is set on it will not cause notifications or make the thing show up in the various moderation listings. See also: /api/unignore_reports. More... | |
async Task | IgnoreReportsAsync (string id) |
Asynchronously future reports on a thing from causing notifications. Any reports made about a thing after this flag is set on it will not cause notifications or make the thing show up in the various moderation listings. See also: /api/unignore_reports. More... | |
void | LeaveContributor (string id) |
Abdicate approved submitter status in a subreddit. See also: /api/friend. More... | |
async Task | LeaveContributorAsync (string id) |
Abdicate approved submitter status in a subreddit asynchronously. See also: /api/friend. More... | |
void | LeaveModerator (string id, string subreddit) |
Abdicate moderator status in a subreddit. See also: /api/friend. More... | |
async Task | LeaveModeratorAsync (string id, string subreddit) |
Abdicate moderator status in a subreddit asynchronously. See also: /api/friend. More... | |
object | MuteMessageAuthor (string id) |
For muting user via modmail. More... | |
void | Remove (ModerationRemoveInput moderationRemoveInput) |
Remove a link, comment, or modmail message. If the thing is a link, it will be removed from all subreddit listings. If the thing is a comment, it will be redacted and removed from all subreddit comment listings. See also: /api/approve. More... | |
async Task | RemoveAsync (ModerationRemoveInput moderationRemoveInput) |
Remove a link, comment, or modmail message asynchronously. If the thing is a link, it will be removed from all subreddit listings. If the thing is a comment, it will be redacted and removed from all subreddit comment listings. See also: /api/approve. More... | |
void | UnignoreReports (string id) |
Allow future reports on a thing to cause notifications. See also: /api/ignore_reports. More... | |
async Task | UnignoreReportsAsync (string id) |
Asynchronously allow future reports on a thing to cause notifications. See also: /api/ignore_reports. More... | |
object | UnmuteMessageAuthor (string id) |
For unmuting user via modmail. More... | |
string | Stylesheet (string subreddit=null) |
Redirect to the subreddit's stylesheet if one exists. See also: /api/subreddit_stylesheet. More... | |
![]() | |
BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
string | Sr (string subreddit) |
![]() | |
Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
T | SendRequest< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
async Task< T > | SendRequestAsync< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareIDRequest (string path, string id, Method method=Method.POST) |
RestRequest | PrepareJSONRequest (string path, Method method=Method.POST) |
RestRequest | PrepareRequest (string url, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareRequest (string url, Method method, List< Parameter > parameters, List< FileParameter > files, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareRequest (RestRequest restRequest, string contentType="application/x-www-form-urlencoded") |
string | GetVersion () |
string | ExecuteRequest (string url, Method method=Method.GET) |
async Task< string > | ExecuteRequestAsync (string url, Method method=Method.GET) |
string | ExecuteRequest (RestRequest restRequest) |
async Task< string > | ExecuteRequestAsync (RestRequest restRequest) |
void | UpdateAccessToken (string accessToken) |
void | UpdateRequests (List< DateTime > requests) |
void | AddParamIfNotNull (string name, dynamic value, ref RestRequest restRequest) |
Additional Inherited Members | |
![]() | |
virtual void | OnTokenUpdated (TokenUpdateEventArgs e) |
virtual void | OnRequestsUpdated (RequestsUpdateEventArgs e) |
![]() | |
EventHandler< TokenUpdateEventArgs > | TokenUpdated |
EventHandler< RequestsUpdateEventArgs > | RequestsUpdated |
Reddit.Models.Moderation.Moderation | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
GenericContainer Reddit.Models.Moderation.AcceptModeratorInvite | ( | string | subreddit = null | ) |
Accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. See also: /api/friend and /subreddits/mine.
subreddit | The subreddit being moderated |
async Task<GenericContainer> Reddit.Models.Moderation.AcceptModeratorInviteAsync | ( | string | subreddit = null | ) |
Asynchronously accept an invite to moderate the specified subreddit. The authenticated user must have been invited to moderate the subreddit by one of its current moderators. See also: /api/friend and /subreddits/mine.
subreddit | The subreddit being moderated |
void Reddit.Models.Moderation.Approve | ( | string | id | ) |
Approve a link or comment. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded. See also: /api/remove.
id | fullname of a thing |
async Task Reddit.Models.Moderation.ApproveAsync | ( | string | id | ) |
Approve a link or comment asynchronously. If the thing was removed, it will be re-inserted into appropriate listings. Any reports on the approved thing will be discarded. See also: /api/remove.
id | fullname of a thing |
T Reddit.Models.Moderation.Distinguish< T > | ( | ModerationDistinguishInput | moderationDistinguishInput | ) |
Distinguish a thing'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 or 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.
moderationDistinguishInput | A valid ModerationDistinguishInput instance |
async Task<T> Reddit.Models.Moderation.DistinguishAsync< T > | ( | ModerationDistinguishInput | moderationDistinguishInput | ) |
Distinguish a thing'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 or 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.
moderationDistinguishInput | A valid ModerationDistinguishInput instance |
CommentResultContainer Reddit.Models.Moderation.DistinguishComment | ( | string | how, |
string | id, | ||
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) |
id | fullname of a thing |
sticky | boolean value |
async Task<CommentResultContainer> Reddit.Models.Moderation.DistinguishCommentAsync | ( | string | how, |
string | id, | ||
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) |
id | fullname of a thing |
sticky | boolean value |
PostResultContainer Reddit.Models.Moderation.DistinguishPost | ( | string | how, |
string | id | ||
) |
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) |
id | fullname of a thing |
async Task<PostResultContainer> Reddit.Models.Moderation.DistinguishPostAsync | ( | string | how, |
string | id | ||
) |
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) |
id | fullname of a thing |
ModActionContainer Reddit.Models.Moderation.GetLog | ( | ModerationGetLogInput | moderationGetLogInput, |
string | subreddit = null |
||
) |
Get a list of recent moderation actions. Moderator actions taken within a subreddit are logged. This listing is a view of that log with various filters to aid in analyzing the information. The optional mod parameter can be a comma-delimited list of moderator names to restrict the results to, or the string a to restrict the results to admin actions taken within the subreddit. The type parameter is optional and if sent limits the log entries returned to only those of the type specified. This endpoint is a listing.
moderationGetLogInput | A valid ModerationGetLogInput instance |
subreddit | The subreddit being moderated |
void Reddit.Models.Moderation.IgnoreReports | ( | string | id | ) |
Prevent future reports on a thing from causing notifications. Any reports made about a thing after this flag is set on it will not cause notifications or make the thing show up in the various moderation listings. See also: /api/unignore_reports.
id | fullname of a thing |
async Task Reddit.Models.Moderation.IgnoreReportsAsync | ( | string | id | ) |
Asynchronously future reports on a thing from causing notifications. Any reports made about a thing after this flag is set on it will not cause notifications or make the thing show up in the various moderation listings. See also: /api/unignore_reports.
id | fullname of a thing |
void Reddit.Models.Moderation.LeaveContributor | ( | string | id | ) |
Abdicate approved submitter status in a subreddit. See also: /api/friend.
id | fullname of a thing |
async Task Reddit.Models.Moderation.LeaveContributorAsync | ( | string | id | ) |
Abdicate approved submitter status in a subreddit asynchronously. See also: /api/friend.
id | fullname of a thing |
void Reddit.Models.Moderation.LeaveModerator | ( | string | id, |
string | subreddit | ||
) |
Abdicate moderator status in a subreddit. See also: /api/friend.
fullname | fullname of the abdicating user |
subreddit | The name of the subreddit being abdicated |
async Task Reddit.Models.Moderation.LeaveModeratorAsync | ( | string | id, |
string | subreddit | ||
) |
Abdicate moderator status in a subreddit asynchronously. See also: /api/friend.
fullname | fullname of the abdicating user |
subreddit | The name of the subreddit being abdicated |
PostContainer Reddit.Models.Moderation.ModQueue | ( | ModerationModQueueInput | moderationModQueueInput, |
string | location = "modqueue" , |
||
string | subreddit = null |
||
) |
Return a listing of posts relevant to moderators. reports: Things that have been reported. spam: Things that have been marked as spam or otherwise removed. modqueue: Things requiring moderator review, such as reported things and items caught by the spam filter. unmoderated: Things that have yet to be approved/removed by a mod. edited: Things that have been edited recently. Requires the "posts" moderator permission for the subreddit. This endpoint is a listing.
location | One of (reports, spam, modqueue, unmoderated, edited) |
moderationModQueueInput | A valid ModerationModQueueInput instance |
subreddit | The subreddit being moderated |
object Reddit.Models.Moderation.MuteMessageAuthor | ( | string | id | ) |
For muting user via modmail.
id | fullname of a thing |
void Reddit.Models.Moderation.Remove | ( | ModerationRemoveInput | moderationRemoveInput | ) |
Remove a link, comment, or modmail message. If the thing is a link, it will be removed from all subreddit listings. If the thing is a comment, it will be redacted and removed from all subreddit comment listings. See also: /api/approve.
moderationRemoveInput | A valid ModerationRemoveInput instance |
async Task Reddit.Models.Moderation.RemoveAsync | ( | ModerationRemoveInput | moderationRemoveInput | ) |
Remove a link, comment, or modmail message asynchronously. If the thing is a link, it will be removed from all subreddit listings. If the thing is a comment, it will be redacted and removed from all subreddit comment listings. See also: /api/approve.
moderationRemoveInput | A valid ModerationRemoveInput instance |
string Reddit.Models.Moderation.Stylesheet | ( | string | subreddit = null | ) |
Redirect to the subreddit's stylesheet if one exists. See also: /api/subreddit_stylesheet.
subreddit | The subreddit being moderated |
void Reddit.Models.Moderation.UnignoreReports | ( | string | id | ) |
Allow future reports on a thing to cause notifications. See also: /api/ignore_reports.
id | fullname of a thing |
async Task Reddit.Models.Moderation.UnignoreReportsAsync | ( | string | id | ) |
Asynchronously allow future reports on a thing to cause notifications. See also: /api/ignore_reports.
id | fullname of a thing |
object Reddit.Models.Moderation.UnmuteMessageAuthor | ( | string | id | ) |
For unmuting user via modmail.
id | fullname of a thing |