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

Public Member Functions

 PrivateMessages (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
void Block (string id)
 For blocking the author of a thing via inbox. More...
 
async Task BlockAsync (string id)
 For asynchronously blocking the author of a thing via inbox. More...
 
void CollapseMessage (string id)
 Collapse a message. See also: /api/uncollapse_message More...
 
async Task CollapseMessageAsync (string id)
 Collapse a message asynchronously. See also: /api/uncollapse_message More...
 
GenericContainer Compose (PrivateMessagesComposeInput privateMessagesComposeInput, string gRecaptchaResponse="")
 Handles message composition under /message/compose. More...
 
async Task< GenericContainerComposeAsync (PrivateMessagesComposeInput privateMessagesComposeInput, string gRecaptchaResponse="")
 Handles message composition asynchronously under /message/compose. More...
 
void DelMsg (string id)
 Delete messages from the recipient's view of their inbox. More...
 
async Task DelMsgAsync (string id)
 Delete messages from the recipient's view of their inbox asynchronously. More...
 
void ReadAllMessages (string filterTypes)
 Queue up marking all messages for a user as read. This may take some time, and returns 202 to acknowledge acceptance of the request. More...
 
async Task ReadAllMessagesAsync (string filterTypes)
 Asynchronously queue up marking all messages for a user as read. This may take some time, and returns 202 to acknowledge acceptance of the request. More...
 
void ReadMessage (string id)
 Mark a message as read. More...
 
async Task ReadMessageAsync (string id)
 Mark a message as read asynchronously. More...
 
object UnblockSubreddit (string id)
 Unblock a subreddit. More...
 
void UncollapseMessage (string id)
 Uncollapse a message. More...
 
async Task UncollapseMessageAsync (string id)
 Uncollapse a message asynchronously. More...
 
void UnreadMessage (string id)
 Mark a message as unread. More...
 
async Task UnreadMessageAsync (string id)
 Mark a message as unread asynchronously. More...
 
MessageContainer GetMessages (string where, PrivateMessagesGetMessagesInput privateMessagesGetMessagesInput)
 This endpoint is a listing. 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

◆ PrivateMessages()

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

Member Function Documentation

◆ Block()

void Reddit.Models.PrivateMessages.Block ( string  id)

For blocking the author of a thing via inbox.

Parameters
idfullname of a thing

◆ BlockAsync()

async Task Reddit.Models.PrivateMessages.BlockAsync ( string  id)

For asynchronously blocking the author of a thing via inbox.

Parameters
idfullname of a thing

◆ CollapseMessage()

void Reddit.Models.PrivateMessages.CollapseMessage ( string  id)

Collapse a message. See also: /api/uncollapse_message

Parameters
idA comma-separated list of thing fullnames

◆ CollapseMessageAsync()

async Task Reddit.Models.PrivateMessages.CollapseMessageAsync ( string  id)

Collapse a message asynchronously. See also: /api/uncollapse_message

Parameters
idA comma-separated list of thing fullnames

◆ Compose()

GenericContainer Reddit.Models.PrivateMessages.Compose ( PrivateMessagesComposeInput  privateMessagesComposeInput,
string  gRecaptchaResponse = "" 
)

Handles message composition under /message/compose.

Parameters
privateMessagesComposeInputA valid PrivateMessagesComposeInput instance
gRecaptchaResponse
Returns
A generic response object containing any errors.

◆ ComposeAsync()

async Task<GenericContainer> Reddit.Models.PrivateMessages.ComposeAsync ( PrivateMessagesComposeInput  privateMessagesComposeInput,
string  gRecaptchaResponse = "" 
)

Handles message composition asynchronously under /message/compose.

Parameters
privateMessagesComposeInputA valid PrivateMessagesComposeInput instance
gRecaptchaResponse
Returns
A generic response object containing any errors.

◆ DelMsg()

void Reddit.Models.PrivateMessages.DelMsg ( string  id)

Delete messages from the recipient's view of their inbox.

Parameters
idfullname of a thing

◆ DelMsgAsync()

async Task Reddit.Models.PrivateMessages.DelMsgAsync ( string  id)

Delete messages from the recipient's view of their inbox asynchronously.

Parameters
idfullname of a thing

◆ GetMessages()

MessageContainer Reddit.Models.PrivateMessages.GetMessages ( string  where,
PrivateMessagesGetMessagesInput  privateMessagesGetMessagesInput 
)

This endpoint is a listing.

Parameters
whereOne of (inbox, unread, sent)
privateMessagesGetMessagesInputA valid PrivateMessagesGetMessagesInput instance
Returns
A list of messages.

◆ ReadAllMessages()

void Reddit.Models.PrivateMessages.ReadAllMessages ( string  filterTypes)

Queue up marking all messages for a user as read. This may take some time, and returns 202 to acknowledge acceptance of the request.

Parameters
filterTypesA comma-separated list of items

◆ ReadAllMessagesAsync()

async Task Reddit.Models.PrivateMessages.ReadAllMessagesAsync ( string  filterTypes)

Asynchronously queue up marking all messages for a user as read. This may take some time, and returns 202 to acknowledge acceptance of the request.

Parameters
filterTypesA comma-separated list of items

◆ ReadMessage()

void Reddit.Models.PrivateMessages.ReadMessage ( string  id)

Mark a message as read.

Parameters
idA comma-separated list of thing fullnames

◆ ReadMessageAsync()

async Task Reddit.Models.PrivateMessages.ReadMessageAsync ( string  id)

Mark a message as read asynchronously.

Parameters
idA comma-separated list of thing fullnames

◆ UnblockSubreddit()

object Reddit.Models.PrivateMessages.UnblockSubreddit ( string  id)

Unblock a subreddit.

Parameters
idfullname of a thing
Returns
(TODO - Untested)

◆ UncollapseMessage()

void Reddit.Models.PrivateMessages.UncollapseMessage ( string  id)

Uncollapse a message.

Parameters
idA comma-separated list of thing fullnames

◆ UncollapseMessageAsync()

async Task Reddit.Models.PrivateMessages.UncollapseMessageAsync ( string  id)

Uncollapse a message asynchronously.

Parameters
idA comma-separated list of thing fullnames

◆ UnreadMessage()

void Reddit.Models.PrivateMessages.UnreadMessage ( string  id)

Mark a message as unread.

Parameters
idA comma-separated list of thing fullnames

◆ UnreadMessageAsync()

async Task Reddit.Models.PrivateMessages.UnreadMessageAsync ( string  id)

Mark a message as unread asynchronously.

Parameters
idA comma-separated list of thing fullnames

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