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.Comment
Description
Synopsis
- data Comment = Comment {
- commentID :: CommentID
- author :: Username
- body :: Body
- bodyHTML :: Body
- replies :: Seq ChildComment
- score :: Maybe Integer
- ups :: Maybe Integer
- downs :: Maybe Integer
- created :: UTCTime
- edited :: Maybe UTCTime
- subreddit :: SubredditName
- subredditID :: SubredditID
- gilded :: Int
- scoreHidden :: Maybe Bool
- linkID :: SubmissionID
- linkURL :: Maybe URL
- linkAuthor :: Maybe Username
- permaLink :: URL
- userReports :: Seq ItemReport
- modReports :: Seq ItemReport
- numReports :: Maybe Integer
- distinguished :: Maybe Distinction
- isSubmitter :: Bool
- stickied :: Bool
- newtype CommentID = CommentID Text
- data MoreComments = MoreComments {}
- data ChildComment
- data WithChildren
- data WithReplies
- commentP :: Object -> Parser Comment
- data LoadedChildren
Documentation
A Reddit comment
Constructors
Comment | |
Fields
|
Instances
A Comment
ID
Instances
Eq CommentID Source # | |
Ord CommentID Source # | |
Show CommentID Source # | |
Generic CommentID Source # | |
FromJSON CommentID Source # | |
ToHttpApiData CommentID Source # | |
Defined in Network.Reddit.Types.Comment Methods toUrlPiece :: CommentID -> Text # toEncodedUrlPiece :: CommentID -> Builder # toHeader :: CommentID -> ByteString # toQueryParam :: CommentID -> Text # | |
Thing CommentID Source # | |
type Rep CommentID Source # | |
Defined in Network.Reddit.Types.Comment |
data MoreComments Source #
A link to load more children Comment
s
Constructors
MoreComments | |
Instances
Eq MoreComments Source # | |
Defined in Network.Reddit.Types.Comment | |
Show MoreComments Source # | |
Defined in Network.Reddit.Types.Comment Methods showsPrec :: Int -> MoreComments -> ShowS # show :: MoreComments -> String # showList :: [MoreComments] -> ShowS # | |
Generic MoreComments Source # | |
Defined in Network.Reddit.Types.Comment Associated Types type Rep MoreComments :: Type -> Type # | |
FromJSON MoreComments Source # | |
Defined in Network.Reddit.Types.Comment | |
type Rep MoreComments Source # | |
Defined in Network.Reddit.Types.Comment type Rep MoreComments = D1 ('MetaData "MoreComments" "Network.Reddit.Types.Comment" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "MoreComments" 'PrefixI 'True) (S1 ('MetaSel ('Just "childIDs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq CommentID)) :*: S1 ('MetaSel ('Just "count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))) |
data ChildComment Source #
Represents a comments on a submission or replies to a comment, which can
be actual Comment
s, or a list of children corresponding to "load more"
or "continue this thread" links on Reddit's UI
Constructors
TopLevel Comment | |
More MoreComments |
Instances
Eq ChildComment Source # | |
Defined in Network.Reddit.Types.Comment | |
Show ChildComment Source # | |
Defined in Network.Reddit.Types.Comment Methods showsPrec :: Int -> ChildComment -> ShowS # show :: ChildComment -> String # showList :: [ChildComment] -> ShowS # | |
Generic ChildComment Source # | |
Defined in Network.Reddit.Types.Comment Associated Types type Rep ChildComment :: Type -> Type # | |
FromJSON ChildComment Source # | |
Defined in Network.Reddit.Types.Comment | |
type Rep ChildComment Source # | |
Defined in Network.Reddit.Types.Comment type Rep ChildComment = D1 ('MetaData "ChildComment" "Network.Reddit.Types.Comment" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "TopLevel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Comment)) :+: C1 ('MetaCons "More" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MoreComments))) |
data WithChildren Source #
This wraps the ChildComment
s of a Submission
Instances
Eq WithChildren Source # | |
Defined in Network.Reddit.Types.Comment | |
Show WithChildren Source # | |
Defined in Network.Reddit.Types.Comment Methods showsPrec :: Int -> WithChildren -> ShowS # show :: WithChildren -> String # showList :: [WithChildren] -> ShowS # | |
Generic WithChildren Source # | |
Defined in Network.Reddit.Types.Comment Associated Types type Rep WithChildren :: Type -> Type # | |
FromJSON WithChildren Source # | |
Defined in Network.Reddit.Types.Comment | |
type Rep WithChildren Source # | |
Defined in Network.Reddit.Types.Comment type Rep WithChildren = D1 ('MetaData "WithChildren" "Network.Reddit.Types.Comment" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "WithChildren" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq ChildComment)))) |
data WithReplies Source #
This wraps a Comment
which has been fetched with its ChildComment
s
Instances
Eq WithReplies Source # | |
Defined in Network.Reddit.Types.Comment | |
Show WithReplies Source # | |
Defined in Network.Reddit.Types.Comment Methods showsPrec :: Int -> WithReplies -> ShowS # show :: WithReplies -> String # showList :: [WithReplies] -> ShowS # | |
Generic WithReplies Source # | |
Defined in Network.Reddit.Types.Comment Associated Types type Rep WithReplies :: Type -> Type # | |
FromJSON WithReplies Source # | |
Defined in Network.Reddit.Types.Comment | |
type Rep WithReplies Source # | |
Defined in Network.Reddit.Types.Comment type Rep WithReplies = D1 ('MetaData "WithReplies" "Network.Reddit.Types.Comment" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "WithReplies" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Comment))) |
data LoadedChildren Source #