![]() |
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 users. More...
Public Member Functions | |
User (Dispatch dispatch, Things.User user) | |
Create a new user controller instance from API return data. More... | |
User (Dispatch dispatch, User user) | |
Copy another user controller instance onto this one. More... | |
User (Dispatch dispatch, string name, string id=null, bool isFriend=false, bool profanityFilter=false, bool isSuspended=false, bool hasGoldSubscription=false, int numFriends=0, bool IsVerified=false, bool hasNewModmail=false, bool over18=false, bool isGold=false, bool isMod=false, bool hasVerifiedEmail=false, string iconImg=null, bool hasModmail=false, int linkKarma=0, int inboxCount=0, bool hasMail=false, DateTime created=default(DateTime), int commentKarma=0, bool hasSubscribed=false) | |
Create a new user controller instance, populated manually. More... | |
User (Dispatch dispatch) | |
Create an empty user controller instance. More... | |
void | AddRelationship (string banContext, string banMessage, string banReason, string container, int? duration, string permissions, string type, string subreddit=null) |
Create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend More... | |
async Task | AddRelationshipAsync (string banContext, string banMessage, string banReason, string container, int? duration, string permissions, string type, string subreddit=null) |
Asynchronously create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend More... | |
void | AddRelationship (UsersFriendInput usersFriendInput, string subreddit=null) |
Create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend More... | |
async Task | AddRelationshipAsync (UsersFriendInput usersFriendInput, string subreddit=null) |
Asynchronously create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend More... | |
void | RemoveRelationship (string type, string container="", string subreddit=null) |
Remove a relationship between a user and another user or subreddit. If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend). OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend More... | |
async Task | RemoveRelationshipAsync (string type, string container="", string subreddit=null) |
Asynchronously remove a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend More... | |
void | RemoveRelationship (UsersUnfriendInput usersUnfriendInput, string subreddit=null) |
Remove a relationship between a user and another user or subreddit. If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend). OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend More... | |
async Task | RemoveRelationshipAsync (UsersUnfriendInput usersUnfriendInput, string subreddit=null) |
Asynchronously remove a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend More... | |
void | Report (string reason, string details="{}") |
Report a user. Reporting a user brings it to the attention of a Reddit admin. More... | |
async Task | ReportAsync (string reason, string details="{}") |
Report a user asynchronously. Reporting a user brings it to the attention of a Reddit admin. More... | |
void | SetPermissions (string subreddit, string permissions, string type) |
Set permissions. More... | |
async Task | SetPermissionsAsync (string subreddit, string permissions, string type) |
Set permissions asynchronously. More... | |
void | SetPermissions (UsersSetPermissionsInput usersSetPermissionsInput, string subreddit=null) |
Set permissions. More... | |
async Task | SetPermissionsAsync (UsersSetPermissionsInput usersSetPermissionsInput, string subreddit=null) |
Set permissions asynchronously. More... | |
bool? | UsernameAvailable () |
Check whether this instance's username is available for registration. More... | |
List< Award > | Trophies () |
Return a list of trophies for the given user. More... | |
User | About () |
Return information about the user, including karma and gold status. More... | |
List< Post > | GetPostHistory (string where="submitted", int context=3, string t="all", int limit=25, string sort="", string after="", string before="", bool includeCategories=false, string show="all", bool srDetail=false, int count=0) |
Retrieve the user's post history. More... | |
List< Post > | GetPostHistory (UsersHistoryInput usersHistoryInput, string where="submitted") |
Retrieve the user's post history. More... | |
List< CommentOrPost > | GetOverview (int context=3, string t="all", int limit=25, string sort="", string after="", string before="", bool includeCategories=false, string show="all", bool srDetail=false, int count=0) |
Retrieve the user's overview. More... | |
List< CommentOrPost > | GetOverview (UsersHistoryInput usersHistoryInput) |
Retrieve the user's overview. More... | |
List< Comment > | GetCommentHistory (int context=3, string t="all", int limit=25, string sort="", string after="", string before="", bool includeCategories=false, string show="all", bool srDetail=false, int count=0) |
Retrieve the user's comment history. More... | |
List< Comment > | GetCommentHistory (UsersHistoryInput usersHistoryInput) |
Retrieve the user's comment history. More... | |
List< ModeratedListItem > | GetModeratedSubreddits (int limit=25, string after="", string before="", bool includeCategories=false, string show="all", bool srDetail=false, int count=0) |
Retrieve a list of subreddits that the user moderates. More... | |
List< ModeratedListItem > | GetModeratedSubreddits (UsersHistoryInput usersHistoryInput) |
Retrieve a list of subreddits that the user moderates. More... | |
void | DeleteFlair (string subreddit) |
Delete flair. More... | |
async Task | DeleteFlairAsync (string subreddit) |
Delete flair asynchronously. More... | |
void | CreateFlair (string subreddit, string text, string cssClass="") |
Create a new user flair. More... | |
async Task | CreateFlairAsync (string subreddit, string text, string cssClass="") |
Create a new user flair asynchronously. More... | |
void | CreateFlair (FlairCreateInput flairCreateInput, string subreddit=null) |
Create a new user flair. More... | |
async Task | CreateFlairAsync (FlairCreateInput flairCreateInput, string subreddit=null) |
Create a new user flair asynchronously. More... | |
List< FlairListResult > | FlairList (string subreddit="", int limit=25, string after="", string before="", int count=0, string show="all", bool srDetail=false) |
List of flairs. More... | |
List< FlairListResult > | FlairList (FlairNameListingInput flairNameListingInput, string subreddit="") |
List of flairs. More... | |
FlairSelectorResultContainer | FlairSelector (string subreddit) |
Return information about a users's flair options. More... | |
void | InviteToLiveThread (string thread, string permissions, string type) |
Invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More... | |
async Task | InviteToLiveThreadAsync (string thread, string permissions, string type) |
Asynchronously invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More... | |
void | InviteToLiveThread (LiveThreadsContributorInput liveThreadsContributorInput, string thread="") |
Invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More... | |
async Task | InviteToLiveThreadAsync (LiveThreadsContributorInput liveThreadsContributorInput, string thread="") |
Asynchronously invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More... | |
void | RemoveFromLiveThread (string thread) |
Revoke another user's contributorship. Requires the manage permission for this thread. More... | |
async Task | RemoveFromLiveThreadAsync (string thread) |
Revoke another user's contributorship asynchronously. Requires the manage permission for this thread. More... | |
void | RevokeLiveThreadInvitation (string thread) |
Revoke an outstanding contributor invite. Requires the manage permission for this thread. More... | |
async Task | RevokeLiveThreadInvitationAsync (string thread) |
Revoke an outstanding contributor invite asynchronously. Requires the manage permission for this thread. More... | |
void | SetLiveThreadPermissions (string thread, string permissions, string type) |
Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More... | |
async Task | SetLiveThreadPermissionsAsync (string thread, string permissions, string type) |
Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More... | |
void | SetLiveThreadPermissions (LiveThreadsContributorInput liveThreadsContributorInput, string thread="") |
Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More... | |
async Task | SetLiveThreadPermissionsAsync (LiveThreadsContributorInput liveThreadsContributorInput, string thread="") |
Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More... | |
void | UpdateLiveThread (string id="", string body="") |
Post an update to a live thread. Requires the update permission for this thread. More... | |
async Task | UpdateLiveThreadAsync (string id="", string body="") |
Post an update to a live thread asynchronously. Requires the update permission for this thread. More... | |
void | AcceptLiveThreadInvite (string id) |
Accept a pending invitation to contribute to the thread. More... | |
async Task | AcceptLiveThreadInviteAsync (string id) |
Asynchronously accept a pending invitation to contribute to the thread. More... | |
List< LabeledMulti > | Multis (bool expandSrs=false) |
Fetch a list of public multis belonging to this user. More... | |
void | AllowWikiEdit (string page, string subreddit=null) |
Allow this user to edit the specified wiki page on the specified subreddit. More... | |
async Task | AllowWikiEditAsync (string page, string subreddit=null) |
Asynchronously allow this user to edit the specified wiki page on the specified subreddit. More... | |
void | DenyWikiEdit (string page, string subreddit=null) |
Deny this user from editing the specified wiki page on the specified subreddit. More... | |
async Task | DenyWikiEditAsync (string page, string subreddit=null) |
Asynchronously deny this user from editing the specified wiki page on the specified subreddit. More... | |
void | Block () |
Block this user. More... | |
async Task | BlockAsync () |
Block this user asynchronously. More... | |
bool | MonitorPostHistory (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true) |
Monitor the user for new posts. More... | |
bool | MonitorCommentHistory (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true) |
Monitor the user for new comments. More... | |
![]() | |
Monitors () | |
void | Wait (int ms) |
bool | IsMonitored (string key, string subKey) |
bool | IsScheduled () |
void | WaitOrDie (string key, int timeout=60) |
void | WaitOrDie (Thread thread, int timeout=60) |
void | KillAllMonitoringThreads () |
![]() | |
BaseController () | |
Create a new Controller instance. More... | |
![]() | |
Exception | BuildException (Exception ex, List< List< string >> errors) |
dynamic | Validate (dynamic obj) |
GenericContainer | Validate (GenericContainer genericContainer) |
Generic | Validate (Generic generic) |
DynamicShortListingContainer | Validate (DynamicShortListingContainer dynamicShortListingContainer) |
DynamicShortListingData | Validate (DynamicShortListingData dynamicShortListingData) |
ImageUploadResult | Validate (ImageUploadResult imageUploadResult) |
LiveUpdateEventContainer | Validate (LiveUpdateEventContainer liveUpdateEventContainer) |
LiveThreadCreateResultContainer | Validate (LiveThreadCreateResultContainer liveThreadCreateResultContainer) |
LiveUpdateContainer | Validate (LiveUpdateContainer liveUpdateContainer, int? minChildren=null) |
SubredditSettingsContainer | Validate (SubredditSettingsContainer subredditSettingsContainer) |
SubredditSettings | Validate (SubredditSettings subredditSettings) |
List< ActionResult > | Validate (List< ActionResult > actionResults) |
ActionResult | Validate (ActionResult actionResult) |
FlairListResultContainer | Validate (FlairListResultContainer flairListResultContainer) |
Flair | Validate (Flair flair) |
FlairV2 | Validate (FlairV2 flairV2) |
ModActionContainer | Validate (ModActionContainer modActionContainer) |
ModActionData | Validate (ModActionData modActionData) |
WikiPageRevisionContainer | Validate (WikiPageRevisionContainer wikiPageRevisionContainer) |
WikiPageRevisionData | Validate (WikiPageRevisionData wikiPageRevisionData) |
WikiPageSettingsContainer | Validate (WikiPageSettingsContainer wikiPageSettingsContainer) |
WikiPageSettings | Validate (WikiPageSettings wikiPageSettings) |
List< UserPrefsContainer > | Validate (List< UserPrefsContainer > userPrefsContainers) |
UserPrefsContainer | Validate (UserPrefsContainer userPrefsContainer) |
UserPrefsData | Validate (UserPrefsData userPrefsData) |
PostResultShortContainer | Validate (PostResultShortContainer postResultShortContainer) |
PostResultShort | Validate (PostResultShort postResultShort) |
PostResultContainer | Validate (PostResultContainer postResultContainer) |
PostResult | Validate (PostResult postResult) |
JQueryReturn | Validate (JQueryReturn jQueryReturn) |
List<(PostContainer, CommentContainer)> | Validate (List<(PostContainer, CommentContainer)> ps) |
CommentResultContainer | Validate (CommentResultContainer commentResultContainer) |
SubredditContainer | Validate (SubredditContainer subredditContainer) |
Protected Member Functions | |
override Thread | CreateMonitoringThread (string key, string subKey, int startDelayMs=0, int? monitoringDelayMs=null) |
Creates a new monitoring thread. More... | |
![]() | |
bool | Monitor (string key, Thread thread, string subKey) |
void | RebuildThreads (string subKey) |
void | LaunchThreadIfNotNull (string key, Thread thread) |
void | KillThread (Thread thread) |
void | KillThread (string key) |
void | ResetThreads (List< string > oldThreads) |
![]() | |
void | CheckErrors (List< List< string >> errors) |
void | CheckErrors (List< string > errors) |
void | CheckNull (object res, string msg="Reddit API returned null response.") |
Properties | |
bool? | IsFriend [get, set] |
Whether this user is friends with the authenticated user. More... | |
bool? | ProfanityFilter [get, set] |
Whether this user's profanity filter is enabled. More... | |
bool? | IsSuspended [get, set] |
Whether this user account has been suspended. More... | |
bool? | HasGoldSubscription [get, set] |
Whether this user has a Reddit Gold subscription. More... | |
int? | NumFriends [get, set] |
How many friends this user has. More... | |
bool? | IsVerified [get, set] |
Whether this user account has been verified. More... | |
bool??? | HasNewModmail [get, set] |
Whether this user has the new modmail. More... | |
string? | Id [get, set] |
The ID36 of this user. More... | |
string? | Fullname [get] |
The fullname of this user. This value is generated from the Id property. More... | |
bool? | Over18 [get, set] |
Whether this user is over 18 years of age. More... | |
bool? | IsGold [get, set] |
Whether this user is gold. More... | |
bool? | IsMod [get, set] |
Whether this user is a mod. More... | |
bool? | HasVerifiedEmail [get, set] |
Whether this user has a verified email address. More... | |
string? | IconImg [get, set] |
This user's icon image URL. More... | |
bool? | HasModmail [get, set] |
Whether this user has modmail. More... | |
int? | LinkKarma [get, set] |
This user's total post karma. More... | |
int? | InboxCount [get, set] |
The number of messages in this user's inbox. More... | |
bool? | HasMail [get, set] |
Whether this user has mail. More... | |
string? | Name [get, set] |
This user's username. More... | |
DateTime? | Created [get, set] |
When this user was created. More... | |
int? | CommentKarma [get, set] |
This user's total comment karma. More... | |
bool? | HasSubscribed [get, set] |
Whether this user has subscribed. More... | |
List< CommentOrPost >? | Overview [get] |
This user's Overview (posts and comments). More... | |
List< Post >? | PostHistory [get] |
This user's post history. More... | |
List< Comment >? | CommentHistory [get] |
This user's comment history. More... | |
List< ModeratedListItem >? | ModeratedSubreddits [get] |
A list of subreddits moderated by this user. More... | |
Things.User | UserData [get, set] |
Full user data from the API. 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< PostsUpdateEventArgs > | PostHistoryUpdated |
Event handler for monitoring post history. More... | |
EventHandler< CommentsUpdateEventArgs > | CommentHistoryUpdated |
Event handler for monitoring comment history. More... | |
Additional Inherited Members | |
![]() | |
int | MonitoringWaitDelayMS = 1500 |
![]() | |
volatile bool | Terminate = false |
Controller class for users.
Reddit.Controllers.User.User | ( | Dispatch | dispatch, |
Things.User | user | ||
) |
Create a new user controller instance from API return data.
dispatch | |
user |
Copy another user controller instance onto this one.
dispatch | |
user |
Reddit.Controllers.User.User | ( | Dispatch | dispatch, |
string | name, | ||
string | id = null , |
||
bool | isFriend = false , |
||
bool | profanityFilter = false , |
||
bool | isSuspended = false , |
||
bool | hasGoldSubscription = false , |
||
int | numFriends = 0 , |
||
bool | IsVerified = false , |
||
bool | hasNewModmail = false , |
||
bool | over18 = false , |
||
bool | isGold = false , |
||
bool | isMod = false , |
||
bool | hasVerifiedEmail = false , |
||
string | iconImg = null , |
||
bool | hasModmail = false , |
||
int | linkKarma = 0 , |
||
int | inboxCount = 0 , |
||
bool | hasMail = false , |
||
DateTime | created = default(DateTime) , |
||
int | commentKarma = 0 , |
||
bool | hasSubscribed = false |
||
) |
Create a new user controller instance, populated manually.
dispatch | |
name | A valid Reddit username |
id | |
isFriend | |
profanityFilter | |
isSuspended | |
hasGoldSubscription | |
numFriends | |
IsVerified | |
hasNewModmail | |
over18 | |
isGold | |
isMod | |
hasVerifiedEmail | |
iconImg | |
hasModmail | |
linkKarma | |
inboxCount | |
hasMail | |
created | |
commentKarma | |
hasSubscribed |
Reddit.Controllers.User.User | ( | Dispatch | dispatch | ) |
Create an empty user controller instance.
dispatch |
User Reddit.Controllers.User.About | ( | ) |
Return information about the user, including karma and gold status.
void Reddit.Controllers.User.AcceptLiveThreadInvite | ( | string | id | ) |
Accept a pending invitation to contribute to the thread.
id | The ID of the live thread |
async Task Reddit.Controllers.User.AcceptLiveThreadInviteAsync | ( | string | id | ) |
Asynchronously accept a pending invitation to contribute to the thread.
id | The ID of the live thread |
void Reddit.Controllers.User.AddRelationship | ( | string | banContext, |
string | banMessage, | ||
string | banReason, | ||
string | container, | ||
int? | duration, | ||
string | permissions, | ||
string | type, | ||
string | subreddit = null |
||
) |
Create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend
banContext | fullname of a thing |
banMessage | raw markdown text |
banReason | a string no longer than 100 characters |
container | |
duration | an integer between 1 and 999, or null to specify permanent duration |
permissions | |
type | one of (friend, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor) |
subreddit | A subreddit |
void Reddit.Controllers.User.AddRelationship | ( | UsersFriendInput | usersFriendInput, |
string | subreddit = null |
||
) |
Create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend
usersFriendInput | A valid UsersFriendInput instance |
subreddit | A subreddit |
async Task Reddit.Controllers.User.AddRelationshipAsync | ( | string | banContext, |
string | banMessage, | ||
string | banReason, | ||
string | container, | ||
int? | duration, | ||
string | permissions, | ||
string | type, | ||
string | subreddit = null |
||
) |
Asynchronously create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend
banContext | fullname of a thing |
banMessage | raw markdown text |
banReason | a string no longer than 100 characters |
container | |
duration | an integer between 1 and 999, or null to specify permanent duration |
permissions | |
type | one of (friend, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor) |
subreddit | A subreddit |
async Task Reddit.Controllers.User.AddRelationshipAsync | ( | UsersFriendInput | usersFriendInput, |
string | subreddit = null |
||
) |
Asynchronously create a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_unfriend
usersFriendInput | A valid UsersFriendInput instance |
subreddit | A subreddit |
void Reddit.Controllers.User.AllowWikiEdit | ( | string | page, |
string | subreddit = null |
||
) |
Allow this user to edit the specified wiki page on the specified subreddit.
page | the name of an existing wiki page |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Controllers.User.AllowWikiEditAsync | ( | string | page, |
string | subreddit = null |
||
) |
Asynchronously allow this user to edit the specified wiki page on the specified subreddit.
page | the name of an existing wiki page |
subreddit | The subreddit where the wiki lives |
void Reddit.Controllers.User.Block | ( | ) |
Block this user.
async Task Reddit.Controllers.User.BlockAsync | ( | ) |
Block this user asynchronously.
void Reddit.Controllers.User.CreateFlair | ( | FlairCreateInput | flairCreateInput, |
string | subreddit = null |
||
) |
Create a new user flair.
flairCreateInput | A valid FlairCreateInput instance |
subreddit | The subreddit with the flairs |
void Reddit.Controllers.User.CreateFlair | ( | string | subreddit, |
string | text, | ||
string | cssClass = "" |
||
) |
Create a new user flair.
subreddit | The subreddit with the flairs |
text | The flair text |
cssClass | a valid subreddit image name |
async Task Reddit.Controllers.User.CreateFlairAsync | ( | FlairCreateInput | flairCreateInput, |
string | subreddit = null |
||
) |
Create a new user flair asynchronously.
flairCreateInput | A valid FlairCreateInput instance |
subreddit | The subreddit with the flairs |
async Task Reddit.Controllers.User.CreateFlairAsync | ( | string | subreddit, |
string | text, | ||
string | cssClass = "" |
||
) |
Create a new user flair asynchronously.
subreddit | The subreddit with the flairs |
text | The flair text |
cssClass | a valid subreddit image name |
|
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.User.DeleteFlair | ( | string | subreddit | ) |
Delete flair.
subreddit | The subreddit with the flairs |
async Task Reddit.Controllers.User.DeleteFlairAsync | ( | string | subreddit | ) |
Delete flair asynchronously.
subreddit | The subreddit with the flairs |
void Reddit.Controllers.User.DenyWikiEdit | ( | string | page, |
string | subreddit = null |
||
) |
Deny this user from editing the specified wiki page on the specified subreddit.
page | the name of an existing wiki page |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Controllers.User.DenyWikiEditAsync | ( | string | page, |
string | subreddit = null |
||
) |
Asynchronously deny this user from editing the specified wiki page on the specified subreddit.
page | the name of an existing wiki page |
subreddit | The subreddit where the wiki lives |
List<FlairListResult> Reddit.Controllers.User.FlairList | ( | FlairNameListingInput | flairNameListingInput, |
string | subreddit = "" |
||
) |
List of flairs.
flairNameListingInput | A valid FlairNameListingInput instance |
subreddit | The subreddit with the flairs |
List<FlairListResult> Reddit.Controllers.User.FlairList | ( | string | subreddit = "" , |
int | limit = 25 , |
||
string | after = "" , |
||
string | before = "" , |
||
int | count = 0 , |
||
string | show = "all" , |
||
bool | srDetail = false |
||
) |
List of flairs.
subreddit | The subreddit with the flairs |
limit | the maximum number of items desired (default: 25, maximum: 1000) |
after | fullname of a thing |
before | fullname of a thing |
count | a positive integer (default: 0) |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
FlairSelectorResultContainer Reddit.Controllers.User.FlairSelector | ( | string | subreddit | ) |
Return information about a users's flair options.
subreddit | The subreddit with the flairs |
List<Comment> Reddit.Controllers.User.GetCommentHistory | ( | int | context = 3 , |
string | t = "all" , |
||
int | limit = 25 , |
||
string | sort = "" , |
||
string | after = "" , |
||
string | before = "" , |
||
bool | includeCategories = false , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
int | count = 0 |
||
) |
Retrieve the user's comment history.
context | an integer between 2 and 10 |
t | one of (hour, day, week, month, year, all) |
limit | the maximum number of items desired (default: 25, maximum: 100) |
sort | one of (hot, new, top, controversial) |
after | fullname of a thing |
before | fullname of a thing |
includeCategories | boolean value |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
count | a positive integer (default: 0) |
List<Comment> Reddit.Controllers.User.GetCommentHistory | ( | UsersHistoryInput | usersHistoryInput | ) |
Retrieve the user's comment history.
usersHistoryInput | A valid UsersHistoryInput instance |
List<ModeratedListItem> Reddit.Controllers.User.GetModeratedSubreddits | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
bool | includeCategories = false , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
int | count = 0 |
||
) |
Retrieve a list of subreddits that the user moderates.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
includeCategories | boolean value |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
count | a positive integer (default: 0) |
List<ModeratedListItem> Reddit.Controllers.User.GetModeratedSubreddits | ( | UsersHistoryInput | usersHistoryInput | ) |
Retrieve a list of subreddits that the user moderates.
usersHistoryInput | A valid UsersHistoryInput instance |
List<CommentOrPost> Reddit.Controllers.User.GetOverview | ( | int | context = 3 , |
string | t = "all" , |
||
int | limit = 25 , |
||
string | sort = "" , |
||
string | after = "" , |
||
string | before = "" , |
||
bool | includeCategories = false , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
int | count = 0 |
||
) |
Retrieve the user's overview.
context | an integer between 2 and 10 |
t | one of (hour, day, week, month, year, all) |
limit | the maximum number of items desired (default: 25, maximum: 100) |
sort | one of (hot, new, newForced, top, controversial) |
after | fullname of a thing |
before | fullname of a thing |
includeCategories | boolean value |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
count | a positive integer (default: 0) |
List<CommentOrPost> Reddit.Controllers.User.GetOverview | ( | UsersHistoryInput | usersHistoryInput | ) |
Retrieve the user's overview.
usersHistoryInput | A valid UsersHistoryInput instance |
List<Post> Reddit.Controllers.User.GetPostHistory | ( | string | where = "submitted" , |
int | context = 3 , |
||
string | t = "all" , |
||
int | limit = 25 , |
||
string | sort = "" , |
||
string | after = "" , |
||
string | before = "" , |
||
bool | includeCategories = false , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
int | count = 0 |
||
) |
Retrieve the user's post history.
where | One of (overview, submitted, upvotes, downvoted, hidden, saved, gilded) |
context | an integer between 2 and 10 |
t | one of (hour, day, week, month, year, all) |
limit | the maximum number of items desired (default: 25, maximum: 100) |
sort | one of (hot, new, newForced, top, controversial) |
after | fullname of a thing |
before | fullname of a thing |
includeCategories | boolean value |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
count | a positive integer (default: 0) |
List<Post> Reddit.Controllers.User.GetPostHistory | ( | UsersHistoryInput | usersHistoryInput, |
string | where = "submitted" |
||
) |
Retrieve the user's post history.
usersHistoryInput | A valid UsersHistoryInput instance |
where | One of (overview, submitted, upvotes, downvoted, hidden, saved, gilded) |
void Reddit.Controllers.User.InviteToLiveThread | ( | LiveThreadsContributorInput | liveThreadsContributorInput, |
string | thread = "" |
||
) |
Invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
thread | id |
void Reddit.Controllers.User.InviteToLiveThread | ( | string | thread, |
string | permissions, | ||
string | type | ||
) |
Invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.
thread | id |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
async Task Reddit.Controllers.User.InviteToLiveThreadAsync | ( | LiveThreadsContributorInput | liveThreadsContributorInput, |
string | thread = "" |
||
) |
Asynchronously invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
thread | id |
async Task Reddit.Controllers.User.InviteToLiveThreadAsync | ( | string | thread, |
string | permissions, | ||
string | type | ||
) |
Asynchronously invite another user to contribute to a live thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.
thread | id |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
bool Reddit.Controllers.User.MonitorCommentHistory | ( | int? | monitoringDelayMs = null , |
int? | monitoringBaseDelayMs = null , |
||
List< MonitoringSchedule > | schedule = null , |
||
bool? | breakOnFailure = null , |
||
DateTime? | monitoringExpiration = null , |
||
bool | useCache = true |
||
) |
Monitor the user for new comments.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
bool Reddit.Controllers.User.MonitorPostHistory | ( | int? | monitoringDelayMs = null , |
int? | monitoringBaseDelayMs = null , |
||
List< MonitoringSchedule > | schedule = null , |
||
bool? | breakOnFailure = null , |
||
DateTime? | monitoringExpiration = null , |
||
bool | useCache = true |
||
) |
Monitor the user for new posts.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
List<LabeledMulti> Reddit.Controllers.User.Multis | ( | bool | expandSrs = false | ) |
Fetch a list of public multis belonging to this user.
expandSrs | boolean value |
void Reddit.Controllers.User.RemoveFromLiveThread | ( | string | thread | ) |
Revoke another user's contributorship. Requires the manage permission for this thread.
thread | id |
async Task Reddit.Controllers.User.RemoveFromLiveThreadAsync | ( | string | thread | ) |
Revoke another user's contributorship asynchronously. Requires the manage permission for this thread.
thread | id |
void Reddit.Controllers.User.RemoveRelationship | ( | string | type, |
string | container = "" , |
||
string | subreddit = null |
||
) |
Remove a relationship between a user and another user or subreddit. If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend). OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend
type | one of (friend, enemy, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor) |
container | |
subreddit | A subreddit |
void Reddit.Controllers.User.RemoveRelationship | ( | UsersUnfriendInput | usersUnfriendInput, |
string | subreddit = null |
||
) |
Remove a relationship between a user and another user or subreddit. If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend). OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend
usersUnfriendInput | A valid UsersUnfriendInput instance |
subreddit | A subreddit |
async Task Reddit.Controllers.User.RemoveRelationshipAsync | ( | string | type, |
string | container = "" , |
||
string | subreddit = null |
||
) |
Asynchronously remove a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend
type | one of (friend, enemy, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor) |
container | |
subreddit | A subreddit |
async Task Reddit.Controllers.User.RemoveRelationshipAsync | ( | UsersUnfriendInput | usersUnfriendInput, |
string | subreddit = null |
||
) |
Asynchronously remove a relationship between a user and another user or subreddit. OAuth2 use requires appropriate scope based on the 'type' of the relationship: moderator: Use "moderator_invite" moderator_invite: modothers contributor: modcontributors banned: modcontributors muted: modcontributors wikibanned: modcontributors and modwiki wikicontributor: modcontributors and modwiki friend: Use /api/v1/me/friends/{username} enemy: Use /api/block Complement to POST_friend
usersUnfriendInput | A valid UsersUnfriendInput instance |
subreddit | A subreddit |
void Reddit.Controllers.User.Report | ( | string | reason, |
string | details = "{}" |
||
) |
Report a user. Reporting a user brings it to the attention of a Reddit admin.
details | JSON data |
reason | a string no longer than 100 characters |
async Task Reddit.Controllers.User.ReportAsync | ( | string | reason, |
string | details = "{}" |
||
) |
Report a user asynchronously. Reporting a user brings it to the attention of a Reddit admin.
details | JSON data |
reason | a string no longer than 100 characters |
void Reddit.Controllers.User.RevokeLiveThreadInvitation | ( | string | thread | ) |
Revoke an outstanding contributor invite. Requires the manage permission for this thread.
thread | id |
async Task Reddit.Controllers.User.RevokeLiveThreadInvitationAsync | ( | string | thread | ) |
Revoke an outstanding contributor invite asynchronously. Requires the manage permission for this thread.
thread | id |
void Reddit.Controllers.User.SetLiveThreadPermissions | ( | LiveThreadsContributorInput | liveThreadsContributorInput, |
string | thread = "" |
||
) |
Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
thread | id |
void Reddit.Controllers.User.SetLiveThreadPermissions | ( | string | thread, |
string | permissions, | ||
string | type | ||
) |
Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.
thread | id |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
async Task Reddit.Controllers.User.SetLiveThreadPermissionsAsync | ( | LiveThreadsContributorInput | liveThreadsContributorInput, |
string | thread = "" |
||
) |
Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
thread | id |
async Task Reddit.Controllers.User.SetLiveThreadPermissionsAsync | ( | string | thread, |
string | permissions, | ||
string | type | ||
) |
Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.
thread | id |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
void Reddit.Controllers.User.SetPermissions | ( | string | subreddit, |
string | permissions, | ||
string | type | ||
) |
Set permissions.
subreddit | the name of an existing subreddit |
permissions | A string representing the permissions being set (e.g. "+wiki") |
type | A string representing the type (e.g. "moderator_invite") |
void Reddit.Controllers.User.SetPermissions | ( | UsersSetPermissionsInput | usersSetPermissionsInput, |
string | subreddit = null |
||
) |
Set permissions.
usersSetPermissionsInput | A valid UsersSetPermissionsInput instance |
subreddit | the name of an existing subreddit |
async Task Reddit.Controllers.User.SetPermissionsAsync | ( | string | subreddit, |
string | permissions, | ||
string | type | ||
) |
Set permissions asynchronously.
subreddit | the name of an existing subreddit |
permissions | A string representing the permissions being set (e.g. "+wiki") |
type | A string representing the type (e.g. "moderator_invite") |
async Task Reddit.Controllers.User.SetPermissionsAsync | ( | UsersSetPermissionsInput | usersSetPermissionsInput, |
string | subreddit = null |
||
) |
Set permissions asynchronously.
usersSetPermissionsInput | A valid UsersSetPermissionsInput instance |
subreddit | the name of an existing subreddit |
List<Award> Reddit.Controllers.User.Trophies | ( | ) |
Return a list of trophies for the given user.
void Reddit.Controllers.User.UpdateLiveThread | ( | string | id = "" , |
string | body = "" |
||
) |
Post an update to a live thread. Requires the update permission for this thread.
id | The ID of the live thread |
body | raw markdown text |
async Task Reddit.Controllers.User.UpdateLiveThreadAsync | ( | string | id = "" , |
string | body = "" |
||
) |
Post an update to a live thread asynchronously. Requires the update permission for this thread.
id | The ID of the live thread |
body | raw markdown text |
bool? Reddit.Controllers.User.UsernameAvailable | ( | ) |
Check whether this instance's username is available for registration.
|
get |
This user's comment history.
|
getset |
This user's total comment karma.
|
getset |
When this user was created.
|
get |
The fullname of this user. This value is generated from the Id property.
|
getset |
Whether this user has a Reddit Gold subscription.
|
getset |
Whether this user has mail.
|
getset |
Whether this user has modmail.
|
getset |
Whether this user has the new modmail.
|
getset |
Whether this user has subscribed.
|
getset |
Whether this user has a verified email address.
|
getset |
This user's icon image URL.
|
getset |
The ID36 of this user.
|
getset |
The number of messages in this user's inbox.
|
getset |
Whether this user is friends with the authenticated user.
|
getset |
Whether this user is gold.
|
getset |
Whether this user is a mod.
|
getset |
Whether this user account has been suspended.
|
getset |
Whether this user account has been verified.
|
getset |
This user's total post karma.
|
get |
A list of subreddits moderated by this user.
|
getset |
This user's username.
|
getset |
How many friends this user has.
|
getset |
Whether this user is over 18 years of age.
|
get |
This user's Overview (posts and comments).
|
get |
This user's post history.
|
getset |
Whether this user's profanity filter is enabled.
|
getset |
Full user data from the API.
EventHandler<CommentsUpdateEventArgs> Reddit.Controllers.User.CommentHistoryUpdated |
Event handler for monitoring comment history.
EventHandler<PostsUpdateEventArgs> Reddit.Controllers.User.PostHistoryUpdated |
Event handler for monitoring post history.