コード例 #1
0
        /// <summary>
        /// Get user conversations for a logged in user or subreddits.
        /// </summary>
        /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
        /// <returns>The requested conversations.</returns>
        public ConversationContainer GetUnreadConversations(ModmailGetConversationsInput modmailGetConversationsInput)
        {
            modmailGetConversationsInput.sort = "unread";

            Unread            = GetConversations(modmailGetConversationsInput);
            UnreadLastUpdated = DateTime.Now;

            return(Unread);
        }
コード例 #2
0
        /// <summary>
        /// Get user conversations for a logged in user or subreddits.
        /// </summary>
        /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
        /// <returns>The requested conversations.</returns>
        public ConversationContainer GetUserConversations(ModmailGetConversationsInput modmailGetConversationsInput)
        {
            modmailGetConversationsInput.sort = "user";

            User            = GetConversations(modmailGetConversationsInput);
            UserLastUpdated = DateTime.Now;

            return(User);
        }
コード例 #3
0
        /// <summary>
        /// Get mod conversations for a logged in user or subreddits.
        /// </summary>
        /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
        /// <returns>The requested conversations.</returns>
        public ConversationContainer GetModConversations(ModmailGetConversationsInput modmailGetConversationsInput)
        {
            modmailGetConversationsInput.sort = "mod";

            Mod            = GetConversations(modmailGetConversationsInput);
            ModLastUpdated = DateTime.Now;

            return(Mod);
        }
コード例 #4
0
        /// <summary>
        /// Get recent conversations for a logged in user or subreddits.
        /// </summary>
        /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
        /// <returns>The requested conversations.</returns>
        public ConversationContainer GetRecentConversations(ModmailGetConversationsInput modmailGetConversationsInput)
        {
            modmailGetConversationsInput.sort = "recent";

            Recent            = GetConversations(modmailGetConversationsInput);
            RecentLastUpdated = DateTime.Now;

            return(Recent);
        }
コード例 #5
0
 /// <summary>
 /// Get conversations for a logged in user or subreddits.
 /// </summary>
 /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
 /// <returns>The requested conversations.</returns>
 public ConversationContainer GetConversations(ModmailGetConversationsInput modmailGetConversationsInput)
 {
     return(Validate(Dispatch.Modmail.GetConversations(modmailGetConversationsInput)));
 }
コード例 #6
0
ファイル: Modmail.cs プロジェクト: Gasur/Reddit.NET
 /// <summary>
 /// Get conversations for a logged in user or subreddits.
 /// </summary>
 /// <param name="modmailGetConversationsInput">A valid ModmailGetConversationsInput instance</param>
 /// <returns>The requested conversations.</returns>
 public ConversationContainer GetConversations(ModmailGetConversationsInput modmailGetConversationsInput)
 {
     return(SendRequest <ConversationContainer>("api/mod/conversations", modmailGetConversationsInput));
 }