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
- data AssignedFlair = AssignedFlair {}
- data FlairTemplate = FlairTemplate {}
- defaultFlairTemplate :: FlairTemplate
- data PostedFlairTemplate
- type FlairID = Text
- data FlairText
- mkFlairText :: MonadThrow m => Text -> m FlairText
- data FlairSelection = FlairSelection {}
- data FlairChoice = FlairChoice {
- templateID :: FlairID
- text :: FlairText
- textEditable :: Bool
- cssClass :: Maybe CSSClass
- data UserFlair = UserFlair {}
- data ForegroundColor
- data FlairResult = FlairResult {}
- data CurrentUserFlair
- data FlairChoiceList
- data FlairList = FlairList {}
- flairlistToListing :: FlairList -> Listing UserID AssignedFlair
- data FlairContent
- data FlairType
- type CSSClass = Text
Documentation
data AssignedFlair Source #
Flair that has been, or will be, assigned to a user
Instances
data FlairTemplate Source #
Flair "templates" that describe choices for self-assigned flair, for both users and submissions
FlairTemplate | |
|
Instances
defaultFlairTemplate :: FlairTemplate Source #
A FlairTemplate
with default fields, for convenience when creating new
templates
data PostedFlairTemplate Source #
Wrapper around FlairTemplates
for posting via the API. If the flairID
field
is Nothing
, a new template will be created. Otherwise, the template with the
matching ID will be updated
Instances
An identifier for a FlairTemplate
The text displayed by the FlairTemplate
Instances
Eq FlairText Source # | |
Show FlairText Source # | |
Generic FlairText Source # | |
Semigroup FlairText Source # | |
Monoid FlairText Source # | |
ToJSON FlairText Source # | |
Defined in Network.Reddit.Types.Flair | |
FromJSON FlairText Source # | |
ToHttpApiData FlairText Source # | |
Defined in Network.Reddit.Types.Flair toUrlPiece :: FlairText -> Text # toEncodedUrlPiece :: FlairText -> Builder # toHeader :: FlairText -> ByteString # toQueryParam :: FlairText -> Text # | |
type Rep FlairText Source # | |
Defined in Network.Reddit.Types.Flair |
mkFlairText :: MonadThrow m => Text -> m FlairText Source #
Smart constructor for FlairText
, the length of which not exceed 64
characters
data FlairSelection Source #
Select a FlairChoice
for a submission or for the user
FlairSelection | |
|
Instances
data FlairChoice Source #
Information about flair that a user can choose. The templateID
corresponds
to the flairID
field of a FlairTemplate
FlairChoice | |
|
Instances
Flair that is currently assigned to a user
Instances
Eq UserFlair Source # | |
Show UserFlair Source # | |
Generic UserFlair Source # | |
FromJSON UserFlair Source # | |
type Rep UserFlair Source # | |
Defined in Network.Reddit.Types.Flair type Rep UserFlair = D1 ('MetaData "UserFlair" "Network.Reddit.Types.Flair" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "UserFlair" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FlairText)) :*: S1 ('MetaSel ('Just "cssClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CSSClass)))) |
data ForegroundColor Source #
Foreground color for v2 flair
Instances
data FlairResult Source #
The result of bulk setting of users' flairs as a mod action. The warnings
and errors
fields may be dynamically generated by Reddit, so they are
represented here as HashMap
s
Instances
data CurrentUserFlair Source #
Wrapper around UserFlair
for fetching the current flair. This uses the same
endpoint as the FlairChoiceList
above
Instances
Show CurrentUserFlair Source # | |
Defined in Network.Reddit.Types.Flair showsPrec :: Int -> CurrentUserFlair -> ShowS # show :: CurrentUserFlair -> String # showList :: [CurrentUserFlair] -> ShowS # | |
Generic CurrentUserFlair Source # | |
Defined in Network.Reddit.Types.Flair type Rep CurrentUserFlair :: Type -> Type # from :: CurrentUserFlair -> Rep CurrentUserFlair x # to :: Rep CurrentUserFlair x -> CurrentUserFlair # | |
FromJSON CurrentUserFlair Source # | |
Defined in Network.Reddit.Types.Flair parseJSON :: Value -> Parser CurrentUserFlair # parseJSONList :: Value -> Parser [CurrentUserFlair] # | |
type Rep CurrentUserFlair Source # | |
Defined in Network.Reddit.Types.Flair type Rep CurrentUserFlair = D1 ('MetaData "CurrentUserFlair" "Network.Reddit.Types.Flair" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "CurrentUserFlair" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserFlair))) |
data FlairChoiceList Source #
Instances
Show FlairChoiceList Source # | |
Defined in Network.Reddit.Types.Flair showsPrec :: Int -> FlairChoiceList -> ShowS # show :: FlairChoiceList -> String # showList :: [FlairChoiceList] -> ShowS # | |
Generic FlairChoiceList Source # | |
Defined in Network.Reddit.Types.Flair type Rep FlairChoiceList :: Type -> Type # from :: FlairChoiceList -> Rep FlairChoiceList x # to :: Rep FlairChoiceList x -> FlairChoiceList # | |
FromJSON FlairChoiceList Source # | |
Defined in Network.Reddit.Types.Flair parseJSON :: Value -> Parser FlairChoiceList # parseJSONList :: Value -> Parser [FlairChoiceList] # | |
type Rep FlairChoiceList Source # | |
Defined in Network.Reddit.Types.Flair type Rep FlairChoiceList = D1 ('MetaData "FlairChoiceList" "Network.Reddit.Types.Flair" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "FlairChoiceList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq FlairChoice)))) |
Reddit strangely does not use their usual Listing
mechanism for paginating
assigned flairs, but a different data structure
Instances
Eq FlairList Source # | |
Show FlairList Source # | |
Generic FlairList Source # | |
FromJSON FlairList Source # | |
type Rep FlairList Source # | |
Defined in Network.Reddit.Types.Flair type Rep FlairList = D1 ('MetaData "FlairList" "Network.Reddit.Types.Flair" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "FlairList" 'PrefixI 'True) (S1 ('MetaSel ('Just "prev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserID)) :*: (S1 ('MetaSel ('Just "next") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserID)) :*: S1 ('MetaSel ('Just "users") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq AssignedFlair))))) |
data FlairContent Source #
The type of content that is allowed in a flair template
Instances
The type of flair, when creating a new template
Instances
Eq FlairType Source # | |
Show FlairType Source # | |
Generic FlairType Source # | |
ToHttpApiData FlairType Source # | |
Defined in Network.Reddit.Types.Flair toUrlPiece :: FlairType -> Text # toEncodedUrlPiece :: FlairType -> Builder # toHeader :: FlairType -> ByteString # toQueryParam :: FlairType -> Text # | |
type Rep FlairType Source # | |
Defined in Network.Reddit.Types.Flair |