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.
Reddit.Models.Account Class Reference
Inheritance diagram for Reddit.Models.Account:
Reddit.Models.BaseModel Reddit.Models.Internal.Request

Public Member Functions

 Account (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
User Me ()
 Returns the identity of the user. More...
 
UserKarmaContainer 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< AccountPrefsUpdatePrefsAsync (AccountPrefsSubmit accountPrefs)
 Update preferences asynchronously. More...
 
TrophyList Trophies ()
 Return a list of trophies for the current user. More...
 
List< UserPrefsContainerPrefsList (string where, CategorizedSrListingInput accountPrefsInput)
 Get users with whom the current user has friended, blocked, or trusted. More...
 
UserPrefsContainer PrefsSingle (string where, CategorizedSrListingInput accountPrefsInput)
 Get users with whom the current user has friended, blocked, or trusted. More...
 
- Public Member Functions inherited from Reddit.Models.BaseModel
 BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
string Sr (string subreddit)
 
- Public Member Functions inherited from Reddit.Models.Internal.Request
 Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
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

- Protected Member Functions inherited from Reddit.Models.Internal.Request
virtual void OnTokenUpdated (TokenUpdateEventArgs e)
 
virtual void OnRequestsUpdated (RequestsUpdateEventArgs e)
 
- Events inherited from Reddit.Models.Internal.Request
EventHandler< TokenUpdateEventArgsTokenUpdated
 
EventHandler< RequestsUpdateEventArgsRequestsUpdated
 

Constructor & Destructor Documentation

◆ Account()

Reddit.Models.Account.Account ( string  appId,
string  appSecret,
string  refreshToken,
string  accessToken,
ref RestClient  restClient,
string  deviceId = null,
string  userAgent = null 
)

Member Function Documentation

◆ Karma()

UserKarmaContainer Reddit.Models.Account.Karma ( )

Return a breakdown of subreddit karma.

Returns
A breakdown of subreddit karma.

◆ Me()

User Reddit.Models.Account.Me ( )

Returns the identity of the user.

Returns
The identity of the user.

◆ Prefs()

AccountPrefs Reddit.Models.Account.Prefs ( )

Return the preference settings of the logged in user.

Returns
The preference settings of the logged in user.

◆ PrefsList()

List<UserPrefsContainer> Reddit.Models.Account.PrefsList ( string  where,
CategorizedSrListingInput  accountPrefsInput 
)

Get users with whom the current user has friended, blocked, or trusted.

Parameters
whereOne of (friends, messaging)
accountPrefsInputA valid AccountPrefsInput instance
Returns
A listing of users.

◆ PrefsSingle()

UserPrefsContainer Reddit.Models.Account.PrefsSingle ( string  where,
CategorizedSrListingInput  accountPrefsInput 
)

Get users with whom the current user has friended, blocked, or trusted.

Parameters
whereOne of (friends, messaging)
accountPrefsInputA valid AccountPrefsInput instance
Returns
A listing of users.

◆ Trophies()

TrophyList Reddit.Models.Account.Trophies ( )

Return a list of trophies for the current user.

Returns
A list of trophies for the current user.

◆ UpdatePrefs()

AccountPrefs Reddit.Models.Account.UpdatePrefs ( AccountPrefsSubmit  accountPrefs)

Update preferences.

Parameters
accountPrefsA valid AccountPrefs instance.
Returns
The updated preference settings of the logged in user.

◆ UpdatePrefsAsync()

async Task<AccountPrefs> Reddit.Models.Account.UpdatePrefsAsync ( AccountPrefsSubmit  accountPrefs)

Update preferences asynchronously.

Parameters
accountPrefsA valid AccountPrefs instance.
Returns
The updated preference settings of the logged in user.

The documentation for this class was generated from the following file: