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
- delete :: MonadReddit m => ItemID -> m ()
- reply :: MonadReddit m => ItemID -> Body -> m Comment
- edit :: MonadReddit m => ItemID -> Body -> m Item
- vote :: MonadReddit m => Vote -> ItemID -> m ()
- report :: MonadReddit m => Report -> ItemID -> m ()
- save :: MonadReddit m => ItemID -> m ()
- unsave :: MonadReddit m => ItemID -> m ()
- setInboxReplies :: MonadReddit m => Bool -> ItemID -> m ()
- getGildedItems :: MonadReddit m => SubredditName -> Paginator ItemID Item -> m (Listing ItemID Item)
- data Report
- data Vote
- data Item
- data ItemID
- mkReport :: MonadThrow m => Text -> m Report
Actions
vote :: MonadReddit m => Vote -> ItemID -> m () Source #
Submit a vote. Be careful! Reddit views bot-based vote manipulation as a serious violation
report :: MonadReddit m => Report -> ItemID -> m () Source #
Report an item, which brings it to the attention of the subreddit moderators
save :: MonadReddit m => ItemID -> m () Source #
Save an item
unsave :: MonadReddit m => ItemID -> m () Source #
Unsave an item
setInboxReplies :: MonadReddit m => Bool -> ItemID -> m () Source #
Enable or disable inbox replies for an item given its ItemID
getGildedItems :: MonadReddit m => SubredditName -> Paginator ItemID Item -> m (Listing ItemID Item) Source #
Get a Listing
of Item
s that have been gilded
Types
The reason for issuing a report. The length of the contained text must be <= 100 characters
Instances
Eq Report Source # | |
Show Report Source # | |
Generic Report Source # | |
ToHttpApiData Report Source # | |
Defined in Network.Reddit.Types.Item toUrlPiece :: Report -> Text # toEncodedUrlPiece :: Report -> Builder # toHeader :: Report -> ByteString # toQueryParam :: Report -> Text # | |
type Rep Report Source # | |
Defined in Network.Reddit.Types.Item |
The direction in which to vote
Instances
Eq Vote Source # | |
Ord Vote Source # | |
Show Vote Source # | |
Generic Vote Source # | |
type Rep Vote Source # | |
Defined in Network.Reddit.Types.Item type Rep Vote = D1 ('MetaData "Vote" "Network.Reddit.Types.Item" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Downvote" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Unvote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Upvote" 'PrefixI 'False) (U1 :: Type -> Type))) |
Certain endpoints will return either Comment
s or a Submission
s, or both
Instances
Wraps either a CommentID
or a SubmissionID
. This is required to use
Item
s with Paginator
s
Instances
Eq ItemID Source # | |
Show ItemID Source # | |
Generic ItemID Source # | |
FromJSON ItemID Source # | |
Thing ItemID Source # | |
type Rep ItemID Source # | |
Defined in Network.Reddit.Types.Item type Rep ItemID = D1 ('MetaData "ItemID" "Network.Reddit.Types.Item" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "CommentItemID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommentID)) :+: C1 ('MetaCons "SubmissionItemID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionID))) |