| Copyright | (c) 2021 Rory Tyler Hayford |
|---|---|
| License | BSD-3-Clause |
| Maintainer | rory.hayford@protonmail.com |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.Reddit.Types.Item
Description
Synopsis
- data Item
- data ItemID
- data PostedItem a
- data Vote
- data Report
- mkReport :: MonadThrow m => Text -> m Report
Documentation
Certain endpoints will return either Comments or a Submissions, or both
Constructors
| CommentItem Comment | |
| SubmissionItem Submission |
Instances
Wraps either a CommentID or a SubmissionID. This is required to use
Items with Paginators
Constructors
| CommentItemID CommentID | |
| SubmissionItemID SubmissionID |
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))) | |
data PostedItem a Source #
Wrapper for parsing new Items, Comments, or Submissions that are returned
after requesting their creation
Instances
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))) | |
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 Methods toUrlPiece :: Report -> Text # toEncodedUrlPiece :: Report -> Builder # toHeader :: Report -> ByteString # toQueryParam :: Report -> Text # | |
| type Rep Report Source # | |
Defined in Network.Reddit.Types.Item | |