Copyright | (c) 2021 Rory Tyler Hayford |
---|---|
License | BSD-3-Clause |
Maintainer | rory.hayford@protonmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- getInbox :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message)
- getUnread :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message)
- getSent :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message)
- markRead :: MonadReddit m => MessageID -> m ()
- sendMessage :: MonadReddit m => NewMessage -> m ()
- replyToMessage :: MonadReddit m => MessageID -> Body -> m Message
- reportMessage :: MonadReddit m => Report -> MessageID -> m ()
- data NewMessage = NewMessage Subject Body Username
- newtype PrivateMessageID = PrivateMessageID Text
- data MessageID
- data MessageOpts = MessageOpts Bool
- data Message = Message MessageID Username Username Body Body Subject UTCTime Bool (Seq Message)
Actions
getInbox :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) Source #
Get the Message
inbox for the currently authenticated user
getUnread :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) Source #
Get the unread Message
s of the currently authenticated user
getSent :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) Source #
Get the Message
s sent by the currently authenticated user
sendMessage :: MonadReddit m => NewMessage -> m () Source #
Send a NewMessage
to another user
replyToMessage :: MonadReddit m => MessageID -> Body -> m Message Source #
reportMessage :: MonadReddit m => Report -> MessageID -> m () Source #
Report a message, bringing it to the attention of the Reddit admins
Types
data NewMessage Source #
For sending new Message
s via the compose
API endpoint
Instances
newtype PrivateMessageID Source #
A private message ID
Instances
This can be CommentID
for replies to a comment, or a PrivateMessageID
for private messages. Querying one's inbox or unread messages can provide
both types
Instances
Eq MessageID Source # | |
Ord MessageID Source # | |
Defined in Network.Reddit.Types.Message | |
Show MessageID Source # | |
Generic MessageID Source # | |
FromJSON MessageID Source # | |
ToHttpApiData MessageID Source # | |
Defined in Network.Reddit.Types.Message toUrlPiece :: MessageID -> Text # toEncodedUrlPiece :: MessageID -> Builder # toHeader :: MessageID -> ByteString # toQueryParam :: MessageID -> Text # | |
Thing MessageID Source # | |
type Rep MessageID Source # | |
Defined in Network.Reddit.Types.Message type Rep MessageID = D1 ('MetaData "MessageID" "Network.Reddit.Types.Message" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "CommentReply" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommentID)) :+: C1 ('MetaCons "PrivateMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PrivateMessageID))) |
data MessageOpts Source #
Instances
Eq MessageOpts Source # | |
Defined in Network.Reddit.Types.Message (==) :: MessageOpts -> MessageOpts -> Bool # (/=) :: MessageOpts -> MessageOpts -> Bool # | |
Show MessageOpts Source # | |
Defined in Network.Reddit.Types.Message showsPrec :: Int -> MessageOpts -> ShowS # show :: MessageOpts -> String # showList :: [MessageOpts] -> ShowS # | |
Generic MessageOpts Source # | |
Defined in Network.Reddit.Types.Message type Rep MessageOpts :: Type -> Type # from :: MessageOpts -> Rep MessageOpts x # to :: Rep MessageOpts x -> MessageOpts # | |
ToForm MessageOpts Source # | |
Defined in Network.Reddit.Types.Message toForm :: MessageOpts -> Form # | |
type Rep MessageOpts Source # | |
Defined in Network.Reddit.Types.Message type Rep MessageOpts = D1 ('MetaData "MessageOpts" "Network.Reddit.Types.Message" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "MessageOpts" 'PrefixI 'True) (S1 ('MetaSel ('Just "mark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) |
A private message or comment reply