![]() |
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 tasks pertaining to the authenticated user. More...
Public Member Functions | |
Account (Dispatch dispatch) | |
Creates a new Account instance. Note that this is already taken care of in the main class. More... | |
User | GetMe () |
Returns a User instance with the data returned from a call to the "me" endpoint. More... | |
List< UserKarma > | Karma () |
Return a breakdown of subreddit karma. More... | |
AccountPrefs | Prefs () |
Return the preference settings of the logged in user. More... | |
AccountPrefs | UpdatePrefs (AccountPrefsSubmit accountPrefs) |
Update preferences. More... | |
async Task< AccountPrefs > | UpdatePrefsAsync (AccountPrefsSubmit accountPrefs) |
Update preferences asynchronously. More... | |
List< Award > | Trophies () |
Return a list of trophies for the current user. More... | |
List< UserPrefs > | Friends (int limit=25, string after="", string before="", string show="all", bool srDetail=false, bool includeCategories=false, int count=0) |
Get users whom the current user has friended. More... | |
List< UserPrefs > | Messaging (int limit=25, string after="", string before="", string show="all", bool srDetail=false, bool includeCategories=false, int count=0) |
Get users with whom the current user is messaging. More... | |
List< UserPrefs > | Blocked (int limit=25, string after="", string before="", string show="all", bool srDetail=false, bool includeCategories=false, int count=0) |
Get users whom the current user has blocked. More... | |
List< UserPrefs > | Trusted (int limit=25, string after="", string before="", string show="all", bool srDetail=false, bool includeCategories=false, int count=0) |
Get users whom the current user has trusted. More... | |
void | DeleteFriend (string username) |
Stop being friends with a user. More... | |
async Task | DeleteFriendAsync (string username) |
Asynchronously stop being friends with a user. More... | |
UserActionResult | GetFriend (string username) |
Get information about a specific 'friend', such as notes. More... | |
UserActionResult | UpdateFriend (string username, string json="{}") |
Create or update a "friend" relationship. This operation is idempotent. It can be used to add a new friend, or update an existing friend (e.g., add/change the note on that friend). The JSON fields can only be included if you have a Reddit Gold subscription, for some reason. More... | |
async Task | UpdateFriendAsync (string username, string json="{}") |
Create or update a "friend" relationship asynchronously. This operation is idempotent. It can be used to add a new friend, or update an existing friend (e.g., add/change the note on that friend). The JSON fields can only be included if you have a Reddit Gold subscription, for some reason. More... | |
List< LabeledMulti > | Multis (bool expandSrs=false) |
Fetch a list of multis belonging to the current user. More... | |
List< Subreddit > | MySubscribedSubreddits (int limit=25, string after="", string before="", string show="all", bool srDetail=true, bool includeCategories=false, int count=0) |
Get subreddits that the current user is subscribed to. More... | |
List< Subreddit > | MyContributingSubreddits (int limit=25, string after="", string before="", string show="all", bool srDetail=true, bool includeCategories=false, int count=0) |
Get subreddits that the current user is an approved submitter in. More... | |
List< Subreddit > | MyModeratorSubreddits (int limit=25, string after="", string before="", string show="all", bool srDetail=true, bool includeCategories=false, int count=0) |
Get subreddits that the current user is a moderator of. More... | |
List< Subreddit > | MyStreamingSubreddits (int limit=25, string after="", string before="", string show="all", bool srDetail=true, bool includeCategories=false, int count=0) |
Get subreddits that the current user is subscribed to that contain hosted video links. More... | |
Dictionary< string, ModmailSubreddit > | ModmailSubreddits () |
Returns a list of srs that the user moderates that are also enrolled in the new modmail. More... | |
ModmailUnreadCount | ModmailUnreadCount () |
Endpoint to retrieve the unread conversation count by conversation state. More... | |
void | AcceptLiveThreadInvite (string thread) |
Accept a pending invitation to contribute to a live thread. More... | |
async Task | AcceptLiveThreadInviteAsync (string thread) |
Asynchronously accept a pending invitation to contribute to a live thread. More... | |
void | AbandonLiveThread (string thread) |
Abdicate contributorship of the thread. More... | |
async Task | AbandonLiveThreadAsync (string thread) |
Abdicate contributorship of the thread asynchronously. More... | |
![]() | |
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 | |
Dispatch | Dispatch |
Allows direct access to the Models. More... | |
Properties | |
User? | Me [get, set] |
The authenticated user's data. More... | |
PrivateMessages?? | Messages [get, set] |
The authenticated user's private messages. More... | |
Modmail?? | Modmail [get, set] |
The authenticated user's modmail conversations. More... | |
![]() | |
Lists | Lists [get, set] |
List-handling. More... | |
Additional Inherited Members | |
![]() | |
void | CheckErrors (List< List< string >> errors) |
void | CheckErrors (List< string > errors) |
void | CheckNull (object res, string msg="Reddit API returned null response.") |
Controller class for tasks pertaining to the authenticated user.
Reddit.Controllers.Account.Account | ( | Dispatch | dispatch | ) |
Creates a new Account instance. Note that this is already taken care of in the main class.
dispatch |
void Reddit.Controllers.Account.AbandonLiveThread | ( | string | thread | ) |
Abdicate contributorship of the thread.
thread | id |
async Task Reddit.Controllers.Account.AbandonLiveThreadAsync | ( | string | thread | ) |
Abdicate contributorship of the thread asynchronously.
thread | id |
void Reddit.Controllers.Account.AcceptLiveThreadInvite | ( | string | thread | ) |
Accept a pending invitation to contribute to a live thread.
thread | id |
async Task Reddit.Controllers.Account.AcceptLiveThreadInviteAsync | ( | string | thread | ) |
Asynchronously accept a pending invitation to contribute to a live thread.
thread | id |
List<UserPrefs> Reddit.Controllers.Account.Blocked | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get users whom the current user has blocked.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
void Reddit.Controllers.Account.DeleteFriend | ( | string | username | ) |
Stop being friends with a user.
username | A valid, existing reddit username |
async Task Reddit.Controllers.Account.DeleteFriendAsync | ( | string | username | ) |
Asynchronously stop being friends with a user.
username | A valid, existing reddit username |
List<UserPrefs> Reddit.Controllers.Account.Friends | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get users whom the current user has friended.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
UserActionResult Reddit.Controllers.Account.GetFriend | ( | string | username | ) |
Get information about a specific 'friend', such as notes.
username | A valid, existing reddit username |
User Reddit.Controllers.Account.GetMe | ( | ) |
Returns a User instance with the data returned from a call to the "me" endpoint.
List<UserKarma> Reddit.Controllers.Account.Karma | ( | ) |
Return a breakdown of subreddit karma.
List<UserPrefs> Reddit.Controllers.Account.Messaging | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get users with whom the current user is messaging.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
Dictionary<string, ModmailSubreddit> Reddit.Controllers.Account.ModmailSubreddits | ( | ) |
Returns a list of srs that the user moderates that are also enrolled in the new modmail.
ModmailUnreadCount Reddit.Controllers.Account.ModmailUnreadCount | ( | ) |
Endpoint to retrieve the unread conversation count by conversation state.
List<LabeledMulti> Reddit.Controllers.Account.Multis | ( | bool | expandSrs = false | ) |
Fetch a list of multis belonging to the current user.
expandSrs | boolean value |
List<Subreddit> Reddit.Controllers.Account.MyContributingSubreddits | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = true , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get subreddits that the current user is an approved submitter in.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
List<Subreddit> Reddit.Controllers.Account.MyModeratorSubreddits | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = true , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get subreddits that the current user is a moderator of.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
List<Subreddit> Reddit.Controllers.Account.MyStreamingSubreddits | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = true , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get subreddits that the current user is subscribed to that contain hosted video links.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
List<Subreddit> Reddit.Controllers.Account.MySubscribedSubreddits | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = true , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get subreddits that the current user is subscribed to.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
AccountPrefs Reddit.Controllers.Account.Prefs | ( | ) |
Return the preference settings of the logged in user.
List<Award> Reddit.Controllers.Account.Trophies | ( | ) |
Return a list of trophies for the current user.
List<UserPrefs> Reddit.Controllers.Account.Trusted | ( | int | limit = 25 , |
string | after = "" , |
||
string | before = "" , |
||
string | show = "all" , |
||
bool | srDetail = false , |
||
bool | includeCategories = false , |
||
int | count = 0 |
||
) |
Get users whom the current user has trusted.
limit | the maximum number of items desired (default: 25, maximum: 100) |
after | fullname of a thing |
before | fullname of a thing |
show | (optional) the string all |
srDetail | (optional) expand subreddits |
includeCategories | boolean value |
count | a positive integer (default: 0) |
UserActionResult Reddit.Controllers.Account.UpdateFriend | ( | string | username, |
string | json = "{}" |
||
) |
Create or update a "friend" relationship. This operation is idempotent. It can be used to add a new friend, or update an existing friend (e.g., add/change the note on that friend). The JSON fields can only be included if you have a Reddit Gold subscription, for some reason.
username | A valid, existing reddit username |
json | { "name": A valid, existing reddit username "note": a string no longer than 300 characters } |
async Task Reddit.Controllers.Account.UpdateFriendAsync | ( | string | username, |
string | json = "{}" |
||
) |
Create or update a "friend" relationship asynchronously. This operation is idempotent. It can be used to add a new friend, or update an existing friend (e.g., add/change the note on that friend). The JSON fields can only be included if you have a Reddit Gold subscription, for some reason.
username | A valid, existing reddit username |
json | { "name": A valid, existing reddit username "note": a string no longer than 300 characters } |
AccountPrefs Reddit.Controllers.Account.UpdatePrefs | ( | AccountPrefsSubmit | accountPrefs | ) |
Update preferences.
accountPrefs | A valid AccountPrefs instance. |
async Task<AccountPrefs> Reddit.Controllers.Account.UpdatePrefsAsync | ( | AccountPrefsSubmit | accountPrefs | ) |
Update preferences asynchronously.
accountPrefs | A valid AccountPrefs instance. |
|
getset |
The authenticated user's data.
|
getset |
The authenticated user's private messages.
|
getset |
The authenticated user's modmail conversations.