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 Awarding
- newtype AwardID where
- data AwardType
- data Award = Award {}
- mkAward :: AwardID -> Award
- data Trophy
- type TrophyID = Text
- data TrophyList
- data AwardingsSummary = AwardingsSummary {}
Documentation
Information about a Reddit award that has been granted. This can be a "global" award that may be granted site-wide, or a "community" award that is limited to a single subreddit
Instances
The ID for an award, which users can grant each other. If you want to create
a new AwardID
, see the bundled pattern synonyms for this type, which include
various common awards. Also see "doc/awards.org" in this repository for a list
of awards and their IDs.
Note: Most newer awards are composed of a UUID identifier and an "award_" prefix. If you construct this type directly, you should omit the prefix, which will be added for you when making API requests
pattern Silver :: AwardID | |
pattern Gold :: AwardID | |
pattern Platinum :: AwardID | |
pattern Argentium :: AwardID | |
pattern Ternion :: AwardID |
Instances
Eq AwardID Source # | |
Show AwardID Source # | |
Generic AwardID Source # | |
Hashable AwardID Source # | |
Defined in Network.Reddit.Types.Award | |
FromJSON AwardID Source # | |
FromJSONKey AwardID Source # | |
ToHttpApiData AwardID Source # | |
Defined in Network.Reddit.Types.Award toUrlPiece :: AwardID -> Text # toEncodedUrlPiece :: AwardID -> Builder # toHeader :: AwardID -> ByteString # toQueryParam :: AwardID -> Text # | |
type Rep AwardID Source # | |
Defined in Network.Reddit.Types.Award |
The type of the Awarding
, either site-wide ("global") or limited to a
"community"
Options for awarding an item
Instances
Eq Award Source # | |
Show Award Source # | |
Generic Award Source # | |
ToForm Award Source # | |
Defined in Network.Reddit.Types.Award | |
type Rep Award Source # | |
Defined in Network.Reddit.Types.Award type Rep Award = D1 ('MetaData "Award" "Network.Reddit.Types.Award" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Award" 'PrefixI 'True) (S1 ('MetaSel ('Just "awardID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AwardID) :*: (S1 ('MetaSel ('Just "isAnonymous") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body))))) |
A Reddit trophy, such as the "one-year club", that the Reddit grants users. Redditors cannot gift each other these trophies
Instances
data TrophyList Source #
Wrapper for parsing JSON objects listing Trophy
s
Instances
Show TrophyList Source # | |
Defined in Network.Reddit.Types.Award showsPrec :: Int -> TrophyList -> ShowS # show :: TrophyList -> String # showList :: [TrophyList] -> ShowS # | |
Generic TrophyList Source # | |
Defined in Network.Reddit.Types.Award type Rep TrophyList :: Type -> Type # from :: TrophyList -> Rep TrophyList x # to :: Rep TrophyList x -> TrophyList # | |
FromJSON TrophyList Source # | |
Defined in Network.Reddit.Types.Award parseJSON :: Value -> Parser TrophyList # parseJSONList :: Value -> Parser [TrophyList] # | |
type Rep TrophyList Source # | |
Defined in Network.Reddit.Types.Award type Rep TrophyList = D1 ('MetaData "TrophyList" "Network.Reddit.Types.Award" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "TrophyList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Trophy)))) |
data AwardingsSummary Source #
A summary of your Awardings
, returned after you have awarded an item