![]() |
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 | |
Modmail (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
object | BulkRead (ModmailBulkReadInput modmailBulkReadInput) |
Marks all conversations read for a particular conversation state within the passed list of subreddits. More... | |
ConversationContainer | GetConversations (ModmailGetConversationsInput modmailGetConversationsInput) |
Get conversations for a logged in user or subreddits. More... | |
ModmailConversationContainer | NewConversation (ModmailNewConversationInput modmailNewConversationInput) |
Creates a new conversation for a particular SR. This endpoint will create a ModmailConversation object as well as the first ModmailMessage within the ModmailConversation object. More... | |
async Task< ModmailConversationContainer > | NewConversationAsync (ModmailNewConversationInput modmailNewConversationInput) |
Creates a new conversation for a particular SR asynchronously. This endpoint will create a ModmailConversation object as well as the first ModmailMessage within the ModmailConversation object. More... | |
ModmailConversationContainer | GetConversation (string conversationId, bool markRead) |
Returns all messages, mod actions and conversation metadata for a given conversation id. More... | |
ModmailConversationContainer | NewMessage (string conversationId, ModmailNewMessageInput modmailNewMessageInput) |
Creates a new message for a particular conversation. More... | |
async Task< ModmailConversationContainer > | NewMessageAsync (string conversationId, ModmailNewMessageInput modmailNewMessageInput) |
Creates a new message for a particular conversation asynchronously. More... | |
object | ArchiveConversation (string conversationId) |
Marks a conversation as archived. More... | |
ModmailConversationContainer | RemoveHighlight (string conversationId) |
Removes a highlight from a conversation. More... | |
async Task< ModmailConversationContainer > | RemoveHighlightAsync (string conversationId) |
Removes a highlight from a conversation asynchronously. More... | |
ModmailConversationContainer | MarkHighlighted (string conversationId) |
Marks a conversation as highlighted. More... | |
async Task< ModmailConversationContainer > | MarkHighlightedAsync (string conversationId) |
Marks a conversation as highlighted asynchronously. More... | |
ModmailConversationContainer | Mute (string conversationId) |
Mutes the non-mod user associated with a particular conversation. More... | |
async Task< ModmailConversationContainer > | MuteAsync (string conversationId) |
Asynchronously mutes the non-mod user associated with a particular conversation. More... | |
object | UnarchiveConversation (string conversationId) |
Marks conversation as unarchived. More... | |
ModmailConversationContainer | UnMute (string conversationId) |
Unmutes the non mod user associated with a particular conversation. More... | |
async Task< ModmailConversationContainer > | UnMuteAsync (string conversationId) |
Asynchronously unmutes the non mod user associated with a particular conversation. More... | |
ModmailUser | User (string conversationId) |
Returns recent posts, comments and modmail conversations for the user that started this conversation. More... | |
void | MarkRead (string conversationIds) |
Marks conversations as read for the user. More... | |
async Task | MarkReadAsync (string conversationIds) |
Asynchronously marks conversations as read for the user. More... | |
ModmailSubredditContainer | Subreddits () |
Returns a list of srs that the user moderates that are also enrolled in the new modmail. More... | |
void | MarkUnread (string conversationIds) |
Marks conversations as unread for the user. More... | |
async Task | MarkUnreadAsync (string conversationIds) |
Asynchronously marks conversations as unread for the user. More... | |
ModmailUnreadCount | UnreadCount () |
Endpoint to retrieve the unread conversation count by conversation state. 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.Modmail.Modmail | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
object Reddit.Models.Modmail.ArchiveConversation | ( | string | conversationId | ) |
Marks a conversation as archived.
conversationId | base36 modmail conversation id |
object Reddit.Models.Modmail.BulkRead | ( | ModmailBulkReadInput | modmailBulkReadInput | ) |
Marks all conversations read for a particular conversation state within the passed list of subreddits.
modmailBulkReadInput | A valid ModmailBulkReadInput instance |
ModmailConversationContainer Reddit.Models.Modmail.GetConversation | ( | string | conversationId, |
bool | markRead | ||
) |
Returns all messages, mod actions and conversation metadata for a given conversation id.
conversationId | base36 modmail conversation id |
markRead | boolean value |
ConversationContainer Reddit.Models.Modmail.GetConversations | ( | ModmailGetConversationsInput | modmailGetConversationsInput | ) |
Get conversations for a logged in user or subreddits.
modmailGetConversationsInput | A valid ModmailGetConversationsInput instance |
ModmailConversationContainer Reddit.Models.Modmail.MarkHighlighted | ( | string | conversationId | ) |
Marks a conversation as highlighted.
conversationId | base36 modmail conversation id |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.MarkHighlightedAsync | ( | string | conversationId | ) |
Marks a conversation as highlighted asynchronously.
conversationId | base36 modmail conversation id |
void Reddit.Models.Modmail.MarkRead | ( | string | conversationIds | ) |
Marks conversations as read for the user.
conversationIds | A comma-separated list of items |
async Task Reddit.Models.Modmail.MarkReadAsync | ( | string | conversationIds | ) |
Asynchronously marks conversations as read for the user.
conversationIds | A comma-separated list of items |
void Reddit.Models.Modmail.MarkUnread | ( | string | conversationIds | ) |
Marks conversations as unread for the user.
conversationIds | A comma-separated list of items |
async Task Reddit.Models.Modmail.MarkUnreadAsync | ( | string | conversationIds | ) |
Asynchronously marks conversations as unread for the user.
conversationIds | A comma-separated list of items |
ModmailConversationContainer Reddit.Models.Modmail.Mute | ( | string | conversationId | ) |
Mutes the non-mod user associated with a particular conversation.
conversationId | base36 modmail conversation id |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.MuteAsync | ( | string | conversationId | ) |
Asynchronously mutes the non-mod user associated with a particular conversation.
conversationId | base36 modmail conversation id |
ModmailConversationContainer Reddit.Models.Modmail.NewConversation | ( | ModmailNewConversationInput | modmailNewConversationInput | ) |
Creates a new conversation for a particular SR. This endpoint will create a ModmailConversation object as well as the first ModmailMessage within the ModmailConversation object.
modmailNewConversationInput | A valid ModmailNewConversationInput instance |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.NewConversationAsync | ( | ModmailNewConversationInput | modmailNewConversationInput | ) |
Creates a new conversation for a particular SR asynchronously. This endpoint will create a ModmailConversation object as well as the first ModmailMessage within the ModmailConversation object.
modmailNewConversationInput | A valid ModmailNewConversationInput instance |
ModmailConversationContainer Reddit.Models.Modmail.NewMessage | ( | string | conversationId, |
ModmailNewMessageInput | modmailNewMessageInput | ||
) |
Creates a new message for a particular conversation.
conversationId | base36 modmail conversation id |
modmailNewMessageInput | A valid ModmailNewMessageInput instance |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.NewMessageAsync | ( | string | conversationId, |
ModmailNewMessageInput | modmailNewMessageInput | ||
) |
Creates a new message for a particular conversation asynchronously.
conversationId | base36 modmail conversation id |
modmailNewMessageInput | A valid ModmailNewMessageInput instance |
ModmailConversationContainer Reddit.Models.Modmail.RemoveHighlight | ( | string | conversationId | ) |
Removes a highlight from a conversation.
conversationId | base36 modmail conversation id |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.RemoveHighlightAsync | ( | string | conversationId | ) |
Removes a highlight from a conversation asynchronously.
conversationId | base36 modmail conversation id |
ModmailSubredditContainer Reddit.Models.Modmail.Subreddits | ( | ) |
Returns a list of srs that the user moderates that are also enrolled in the new modmail.
object Reddit.Models.Modmail.UnarchiveConversation | ( | string | conversationId | ) |
Marks conversation as unarchived.
conversationId | base36 modmail conversation id |
ModmailConversationContainer Reddit.Models.Modmail.UnMute | ( | string | conversationId | ) |
Unmutes the non mod user associated with a particular conversation.
conversationId | base36 modmail conversation id |
async Task<ModmailConversationContainer> Reddit.Models.Modmail.UnMuteAsync | ( | string | conversationId | ) |
Asynchronously unmutes the non mod user associated with a particular conversation.
conversationId | base36 modmail conversation id |
ModmailUnreadCount Reddit.Models.Modmail.UnreadCount | ( | ) |
Endpoint to retrieve the unread conversation count by conversation state.
ModmailUser Reddit.Models.Modmail.User | ( | string | conversationId | ) |
Returns recent posts, comments and modmail conversations for the user that started this conversation.
conversationId | base36 modmail conversation id |