reddit-0.2.3.0: Library for interfacing with Reddit's API

Safe HaskellNone
LanguageHaskell2010

Reddit.Actions.Comment

Description

Contains comment-related actions, like editing comments and performing moderator actions on posts.

Synopsis

Documentation

getNewComments :: Monad m => Maybe SubredditName -> RedditT m CommentListing Source #

Get a CommentListing for the most recent comments on the site overall. This maps to http://reddit.com/r/$SUBREDDIT/comments, or http://reddit.com/comments if the subreddit is not specified. Note that none of the comments returned will have any child comments.

getNewComments' :: Monad m => Options CommentID -> Maybe SubredditName -> RedditT m CommentListing Source #

Get a CommentListing for the most recent comments with the specified Options and SubredditName. Note that none of the comments returned will have any child comments. If the Options is def, then this function is identical to getNewComments.

getMoreChildren Source #

Arguments

:: Monad m 
=> PostID

PostID for the top-level

-> [CommentID]

List of CommentIDs to expand

-> RedditT m [CommentReference] 

Expand children comments that weren't fetched on initial load. Equivalent to the web UI's "load more comments" button.

getCommentInfo :: Monad m => CommentID -> RedditT m Comment Source #

Given a CommentID, getCommentInfo will return the full details for that comment.

getCommentsInfo :: Monad m => [CommentID] -> RedditT m CommentListing Source #

Given a list of CommentIDs, getCommentsInfo will return another list containing the full details for all the comments. Note that Reddit's API imposes a limitation of 100 comments per request, so this function will fail immediately if given a list of more than 100 IDs.

editComment Source #

Arguments

:: Monad m 
=> CommentID

Comment to edit

-> Text

New comment text

-> RedditT m Comment 

Edit a comment.

deleteComment :: Monad m => CommentID -> RedditT m () Source #

Deletes one of your own comments. Note that this is different from removing a comment as a moderator action.

removeComment :: Monad m => CommentID -> RedditT m () Source #

Removes a comment (as a moderator action). Note that this is different from deleting a comment.