/// <summary> /// Creates a new message for a particular conversation. /// </summary> /// <param name="conversationId">base36 modmail conversation id</param> /// <param name="modmailNewMessageInput">A valid ModmailNewMessageInput instance</param> /// <returns>An object containing the conversation data.</returns> public ModmailConversationContainer NewMessage(string conversationId, ModmailNewMessageInput modmailNewMessageInput) { LinksAndCommentsThingInput linksAndCommentsThingInput = new LinksAndCommentsThingInput { text = modmailNewMessageInput.body, thing_id = "t4_" + conversationId }; return(Validate(Dispatch.LinksAndComments.Comment <ModmailConversationContainer>(linksAndCommentsThingInput))); //return Validate(Dispatch.Modmail.NewMessage(conversationId, modmailNewMessageInput)); }
/// <summary> /// Edit the body text of a self-post asynchronously. /// the thing_id is the fullname of a self post. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>The modified post data.</returns> public async Task <PostResultContainer> EditUserTextAsync(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(await SendRequestAsync <PostResultContainer>("api/editusertext", linksAndCommentsThingInput, Method.POST)); }
/// <summary> /// Edit the body text of a self-post. /// the thing_id is the fullname of a self post. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>The modified post data.</returns> public PostResultContainer EditUserText(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(SendRequest <PostResultContainer>("api/editusertext", linksAndCommentsThingInput, Method.POST)); }
/// <summary> /// Asynchronously submit a new comment or reply to a message. /// parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: /// the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) /// the fullname of a Comment: a comment reply to that comment. (requires submit scope) /// the fullname of a Message: a message reply to that message. (requires privatemessages scope) /// text should be the raw markdown body of the comment or message. /// To start a new message thread, use /api/compose. /// the thing_id is the fullname of the parent thing. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>A Reddit comment.</returns> public async Task <T> CommentAsync <T>(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(await SendRequestAsync <T>("api/comment", linksAndCommentsThingInput, Method.POST)); }
/// <summary> /// Submit a new comment or reply to a message. /// parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: /// the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) /// the fullname of a Comment: a comment reply to that comment. (requires submit scope) /// the fullname of a Message: a message reply to that message. (requires privatemessages scope) /// text should be the raw markdown body of the comment or message. /// To start a new message thread, use /api/compose. /// the thing_id is the fullname of the parent thing. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>A Reddit comment.</returns> public T Comment <T>(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(SendRequest <T>("api/comment", linksAndCommentsThingInput, Method.POST)); }
/// <summary> /// Reply to a private message asynchronously. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>The created message reply.</returns> public async Task <MessageContainer> ReplyAsync(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(Validate(await Dispatch.LinksAndComments.CommentAsync <MessageContainer>(linksAndCommentsThingInput))); }
/// <summary> /// Reply to a private message. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>The created message reply.</returns> public MessageContainer Reply(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(Validate(Dispatch.LinksAndComments.Comment <MessageContainer>(linksAndCommentsThingInput))); }
/// <summary> /// Asynchronously submit a new comment or reply to a message. /// parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: /// the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) /// the fullname of a Comment: a comment reply to that comment. (requires submit scope) /// the fullname of a Message: a message reply to that message. (requires privatemessages scope) /// text should be the raw markdown body of the comment or message. /// To start a new message thread, use /api/compose. /// the thing_id is the fullname of the parent thing. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>A Reddit comment.</returns> public async Task <CommentResultContainer> CommentAsync(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(await SendRequestAsync <CommentResultContainer>("api/comment", linksAndCommentsThingInput, Method.POST)); }
/// <summary> /// Submit a new comment or reply to a message. /// parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: /// the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) /// the fullname of a Comment: a comment reply to that comment. (requires submit scope) /// the fullname of a Message: a message reply to that message. (requires privatemessages scope) /// text should be the raw markdown body of the comment or message. /// To start a new message thread, use /api/compose. /// the thing_id is the fullname of the parent thing. /// </summary> /// <param name="linksAndCommentsThingInput">A valid LinksAndCommentsThingInput instance</param> /// <returns>A Reddit comment.</returns> public CommentResultContainer Comment(LinksAndCommentsThingInput linksAndCommentsThingInput) { return(SendRequest <CommentResultContainer>("api/comment", linksAndCommentsThingInput, Method.POST)); }