Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains comment-related actions, like editing comments and performing moderator actions on posts.
- getNewComments :: MonadIO m => Maybe SubredditName -> RedditT m CommentListing
- getNewComments' :: MonadIO m => Options CommentID -> Maybe SubredditName -> RedditT m CommentListing
- getMoreChildren :: MonadIO m => PostID -> [CommentID] -> RedditT m [CommentReference]
- getCommentInfo :: MonadIO m => CommentID -> RedditT m Comment
- getCommentsInfo :: MonadIO m => [CommentID] -> RedditT m CommentListing
- editComment :: MonadIO m => CommentID -> Text -> RedditT m Comment
- deleteComment :: MonadIO m => CommentID -> RedditT m ()
- removeComment :: MonadIO m => CommentID -> RedditT m ()
Documentation
getNewComments :: MonadIO 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' :: MonadIO 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
.
:: MonadIO m | |
=> PostID |
|
-> [CommentID] | List of |
-> RedditT m [CommentReference] |
Expand children comments that weren't fetched on initial load. Equivalent to the web UI's "load more comments" button.
getCommentInfo :: MonadIO m => CommentID -> RedditT m Comment Source
Given a CommentID
, getCommentInfo
will return the full details for that comment.
getCommentsInfo :: MonadIO m => [CommentID] -> RedditT m CommentListing Source
Given a list of CommentID
s, 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.
Edit a comment.
deleteComment :: MonadIO 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 :: MonadIO m => CommentID -> RedditT m () Source
Removes a comment (as a moderator action). Note that this is different from deleting a comment.