heddit-0.2: Reddit API bindings
Copyright(c) 2021 Rory Tyler Hayford
LicenseBSD-3-Clause
Maintainerrory.hayford@protonmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Network.Reddit.Me

Contents

Description

Actions related to the currently logged-in user, such as accounts, friends, etc... For actions related to other users, see Network.Reddit.User

Synopsis

Actions

getMe :: MonadReddit m => m Account Source #

Get account information for the currently logged-in user. If you are using an ApplicationOnly client, calling this will throw an InvalidRequest

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

getMySubreddit :: MonadReddit m => m Subreddit Source #

Get the special user Subreddit associated with the authenticated account

getMySubredditSettings :: MonadReddit m => m SubredditSettings Source #

Get settings for the special user Subreddit associated with the authenticated account. Also see setMySubredditSettings

setMySubredditSettings :: MonadReddit m => SubredditSettings -> m () Source #

Set the SubredditSettings for your special user subreddit. You can obtain the existing settings using getMySubredditSettings

getMyOverview :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) Source #

Get an overview of the authenticated user's Comments and Submissions

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 Comments

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 Friends of the currently logged-in user

getMyFriend :: MonadReddit m => Username -> m Friend Source #

Get information about one of the authenticated user's friends. You must be friends with the owner of the provided username, or an POSTError will be thrown

getMyBlocked :: MonadReddit m => m (Seq Friend) Source #

Get blocked users (as Friends) of the currently logged-in user

getMyKarma :: MonadReddit m => m (Seq Karma) Source #

Get a breakdown of the current user's karma

makeFriend Source #

Arguments

:: MonadReddit m 
=> Maybe Text

Providing this requires Reddit premium

-> Username 
-> m Friend 

Make friends with another user. You must have Reddit premium to add a note to the friendship. If you attempt to add the note without premium, you are likely to get an APIException (POSTError)

unFriend :: MonadReddit m => Username -> m () Source #

Remove an existing friend

trustUser :: MonadReddit m => Username -> m () Source #

Add the user to your list of trusted users who may always send you PMs

distrustUser :: MonadReddit m => Username -> m () Source #

Remove the user from your list of trusted users

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