Copyright | (c) 2021 Rory Tyler Hayford |
---|---|
License | BSD-3-Clause |
Maintainer | rory.hayford@protonmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Actions related to the currently logged-in user, such as accounts, friends, etc... For actions related to other users, see Network.Reddit.User
Synopsis
- getMe :: MonadReddit m => m Account
- getPreferences :: MonadReddit m => m Preferences
- updatePreferences :: MonadReddit m => Preferences -> m Preferences
- getMyOverview :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item)
- getMySaved :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item)
- getMyComments :: MonadReddit m => Paginator CommentID Comment -> m (Listing CommentID Comment)
- getMySubmissions :: MonadReddit m => Paginator SubmissionID Submission -> m (Listing SubmissionID Submission)
- getMyHidden :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item)
- getMyFriends :: MonadReddit m => m (Seq Friend)
- getMyBlocked :: MonadReddit m => m (Seq Friend)
- getMyKarma :: MonadReddit m => m (Seq Karma)
- makeFriend :: MonadReddit m => Maybe Text -> Username -> m Friend
- unFriend :: MonadReddit m => Username -> m ()
- blockUser :: MonadReddit m => UserID -> m ()
- needsCaptcha :: MonadReddit m => m Bool
- getMyFlair :: MonadReddit m => SubredditName -> m (Maybe UserFlair)
- setMyFlair :: MonadReddit m => FlairSelection -> m ()
- getMySubscribed :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit)
- getMyModerated :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit)
- getMyContributing :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit)
- getMyMultireddits :: MonadReddit m => m (Seq Multireddit)
Actions
getMe :: MonadReddit m => m Account Source #
Get account information for the currently logged-in user
getPreferences :: MonadReddit m => m Preferences Source #
Get the user Preferences
for the currently authenticated user
updatePreferences :: MonadReddit m => Preferences -> m Preferences Source #
Update the authenticated users Preferences
. Returns the new preferences
upon success
Warning: Invalid fields or values are silently discarded by this endpoint. If you wish to check that an update has succeeded, consider an equality test between the existing preferences and the value returned by this action
getMyOverview :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) Source #
Get an overview of the authenticated user's Comment
s and Submission
s
getMySaved :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) Source #
Get items that the authenticated user has saved
getMyComments :: MonadReddit m => Paginator CommentID Comment -> m (Listing CommentID Comment) Source #
Get an overview of the authenticated user's Comment
s
getMySubmissions :: MonadReddit m => Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) Source #
Get an overview of the authenticated user's Submission
s
getMyHidden :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) Source #
Get items that the authenticated user has hidden
getMyFriends :: MonadReddit m => m (Seq Friend) Source #
Get the Friend
s of the currently logged-in user
getMyBlocked :: MonadReddit m => m (Seq Friend) Source #
Get blocked users (as Friend
s) of the currently logged-in user
getMyKarma :: MonadReddit m => m (Seq Karma) Source #
Get a breakdown of the current user's karma
makeFriend :: MonadReddit m => Maybe Text -> Username -> m Friend Source #
Make friends with another user
unFriend :: MonadReddit m => Username -> m () Source #
Remove an existing friend
blockUser :: MonadReddit m => UserID -> m () Source #
Block another user. Note that this cannot be reversed through the API; the logged-in user would need to manually revoke the block by visiting Reddit's website
needsCaptcha :: MonadReddit m => m Bool Source #
Find out if the authenticated user needs to complete a captcha when performing certain transactions, such as submitting a link or sending a private message
getMyFlair :: MonadReddit m => SubredditName -> m (Maybe UserFlair) Source #
Get the authenticated user's current flair for the given subreddit, if such flair exists
setMyFlair :: MonadReddit m => FlairSelection -> m () Source #
Set the flair for the authenticated user, provided that the given subreddit
allows users to perform this action. The text
field is ignored unless it is
Just
and the textEditable
field of the contained FlairChoice
is True
getMySubscribed :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) Source #
Get a listing of subreddits the currently authenticated user is subscribed to
getMyModerated :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) Source #
Get a listing of subreddits the currently authenticated user is a mod in
getMyContributing :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) Source #
Get a listing of subreddits the currently authenticated user is an approved user in
getMyMultireddits :: MonadReddit m => m (Seq Multireddit) Source #
Get all of the multireddits of the authenticated user